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)
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<? extends ModContainer> 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;
}
}