TotemOfReviving:

- Made proxy field private, created getter for it.
- Fixed typo.
- Removed unused stuff.
This commit is contained in:
Micle
2022-11-03 17:53:10 +00:00
parent b128279fc5
commit 2b204e764b

View File

@ -17,29 +17,28 @@ import java.util.Random;
@Mod(TotemOfReviving.MOD_ID) @Mod(TotemOfReviving.MOD_ID)
public final class TotemOfReviving { public final class TotemOfReviving {
public static final String MOD_ID = "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) { public static final CreativeModeTab ITEM_GROUP = new CreativeModeTab(MOD_ID) {
@Override @Override
public ItemStack makeIcon() { public ItemStack makeIcon() {
return new ItemStack(ModItems.STRAW_TOTEM.get()); return new ItemStack(ModItems.STRAW_TOTEM.get());
} }
}; };
public static final String RESOURCE_PREFIX = MOD_ID + ':'; private static ISideProxy proxy;
public static final Random RANDOM = new Random();
public static final Logger LOGGER = LogManager.getLogger(MOD_NAME);
public static TotemOfReviving INSTANCE;
public static ISideProxy PROXY;
public TotemOfReviving() { public TotemOfReviving() {
INSTANCE = this; proxy = DistExecutor.safeRunForDist(
PROXY = DistExecutor.safeRunForDist(
() -> SideProxy.Client::new, () -> SideProxy.Client::new,
() -> SideProxy.Server::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() { public static String getVersion() {
Optional<? extends ModContainer> optional = ModList.get().getModContainerById(MOD_ID); Optional<? extends ModContainer> optional = ModList.get().getModContainerById(MOD_ID);
@ -48,11 +47,8 @@ public final class TotemOfReviving {
} }
return "0.0.0"; return "0.0.0";
} }
public static ResourceLocation createResourceLocation(String name) { public static ISideProxy getProxy() {
if (name.contains(":")) { return proxy;
throw new IllegalArgumentException("name containes namespace");
}
return new ResourceLocation(MOD_ID, name);
} }
} }