From 2b204e764ba0802e52ad4e130526512f3b5f310d Mon Sep 17 00:00:00 2001 From: Micle Date: Thu, 3 Nov 2022 17:53:10 +0000 Subject: [PATCH] TotemOfReviving: - Made proxy field private, created getter for it. - Fixed typo. - Removed unused stuff. --- .../totemofreviving/TotemOfReviving.java | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/src/main/java/dev/micle/totemofreviving/TotemOfReviving.java b/src/main/java/dev/micle/totemofreviving/TotemOfReviving.java index 67b7210..121e1fb 100755 --- a/src/main/java/dev/micle/totemofreviving/TotemOfReviving.java +++ b/src/main/java/dev/micle/totemofreviving/TotemOfReviving.java @@ -17,29 +17,28 @@ import java.util.Random; @Mod(TotemOfReviving.MOD_ID) public final class TotemOfReviving { public static final String MOD_ID = "totemofreviving"; - public static final String MOD_NAME = "Micle's Totem of Reviving"; public static final CreativeModeTab ITEM_GROUP = new CreativeModeTab(MOD_ID) { @Override public ItemStack makeIcon() { return new ItemStack(ModItems.STRAW_TOTEM.get()); } }; - - public static final String RESOURCE_PREFIX = MOD_ID + ':'; - - public static final Random RANDOM = new Random(); - public static final Logger LOGGER = LogManager.getLogger(MOD_NAME); - - public static TotemOfReviving INSTANCE; - public static ISideProxy PROXY; + + private static ISideProxy proxy; public TotemOfReviving() { - INSTANCE = this; - PROXY = DistExecutor.safeRunForDist( + proxy = DistExecutor.safeRunForDist( () -> SideProxy.Client::new, () -> SideProxy.Server::new ); } + + public static ResourceLocation createResourceLocation(String name) { + if (name.contains(":")) { + throw new IllegalArgumentException("Name contains namespace"); + } + return new ResourceLocation(MOD_ID, name); + } public static String getVersion() { Optional optional = ModList.get().getModContainerById(MOD_ID); @@ -48,11 +47,8 @@ public final class TotemOfReviving { } return "0.0.0"; } - - public static ResourceLocation createResourceLocation(String name) { - if (name.contains(":")) { - throw new IllegalArgumentException("name containes namespace"); - } - return new ResourceLocation(MOD_ID, name); + + public static ISideProxy getProxy() { + return proxy; } }