diff --git a/build.gradle b/build.gradle index 3d82220..898461f 100644 --- a/build.gradle +++ b/build.gradle @@ -81,6 +81,8 @@ dependencies { deobfCompile "mezz.jei:jei_${mc_version}:${jei_version}" // compile "curse.maven:modularui-624243:3895901" + // AE2 Unofficial Extended Life +// deobfCompile "curse.maven:ae2-extended-life-570458:4094223" deobfCompile "curse.maven:applied-energistics-2-223794:2747063" deobfCompile "curse.maven:wireless-crafting-terminal-244559:2830252" compile "curse.maven:ae2wtlib-304024:2830114" diff --git a/gradle.properties b/gradle.properties index 07e0238..b93696d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ org.gradle.daemon=false # General Specifications mc_version=1.12.2 jei_version=4.16.1.302 -mod_version=2.0.0 +mod_version=2.0.1 forge_version=14.23.5.2847 mod_group=com.github.vfyjxf.neenergistics mod_id=neenergistics diff --git a/src/main/java/com/github/vfyjxf/nee/NotEnoughEnergistics.java b/src/main/java/com/github/vfyjxf/nee/NotEnoughEnergistics.java index 787d91b..cc8218f 100644 --- a/src/main/java/com/github/vfyjxf/nee/NotEnoughEnergistics.java +++ b/src/main/java/com/github/vfyjxf/nee/NotEnoughEnergistics.java @@ -2,7 +2,7 @@ import com.github.vfyjxf.nee.network.NEEGuiHandler; import com.github.vfyjxf.nee.proxy.CommonProxy; -import com.github.vfyjxf.nee.utils.Gobals; +import com.github.vfyjxf.nee.utils.Globals; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.SidedProxy; @@ -14,16 +14,16 @@ import org.apache.logging.log4j.Logger; -@Mod(modid = Gobals.MOD_ID, - version = Gobals.VERSION, - name = Gobals.NAME, - dependencies = Gobals.DEPENDENCIES, - guiFactory = Gobals.GUI_FACTORY, +@Mod(modid = Globals.MOD_ID, + version = Globals.VERSION, + name = Globals.NAME, + dependencies = Globals.DEPENDENCIES, + guiFactory = Globals.GUI_FACTORY, useMetadata = true) public class NotEnoughEnergistics { public static final Logger logger = LogManager.getLogger("NotEnoughEnergistics"); - @Mod.Instance(Gobals.MOD_ID) + @Mod.Instance(Globals.MOD_ID) public static NotEnoughEnergistics instance; @SidedProxy(clientSide = "com.github.vfyjxf.nee.proxy.ClientProxy", serverSide = "com.github.vfyjxf.nee.proxy.ServerProxy") diff --git a/src/main/java/com/github/vfyjxf/nee/asm/AppengHooks.java b/src/main/java/com/github/vfyjxf/nee/asm/AppengHooks.java index 6766808..5da8569 100644 --- a/src/main/java/com/github/vfyjxf/nee/asm/AppengHooks.java +++ b/src/main/java/com/github/vfyjxf/nee/asm/AppengHooks.java @@ -4,9 +4,12 @@ import appeng.client.gui.implementations.GuiMEMonitorable; import appeng.core.sync.AppEngPacket; import appeng.core.sync.network.INetworkInfo; +import com.github.vfyjxf.nee.utils.Globals; import mezz.jei.gui.recipes.RecipesGui; import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraftforge.fml.common.Optional; import p455w0rd.wct.client.gui.GuiWCT; import java.util.List; @@ -17,9 +20,11 @@ public class AppengHooks { /** * Before {@link appeng.core.sync.packets.PacketMEInventoryUpdate#clientPacketData(INetworkInfo, AppEngPacket, EntityPlayer)} Return */ - public static void updateMeInventory(GuiScreen screen, final List list) { - if (screen instanceof RecipesGui) { - GuiScreen parent = ((RecipesGui) screen).getParentScreen(); + public static void updateMeInventory(Object obj, final List list) { + if (obj instanceof Container) return; + + if (obj instanceof RecipesGui) { + GuiScreen parent = ((RecipesGui) obj).getParentScreen(); if (parent instanceof GuiMEMonitorable) { ((GuiMEMonitorable) parent).postUpdate(list); } @@ -29,7 +34,8 @@ public static void updateMeInventory(GuiScreen screen, final List /** * Before {@link appeng.client.gui.implementations.GuiMEMonitorable#postUpdate(List)} Return */ - public static void updateWirelessInventory(GuiScreen screen, final List list){ + @Optional.Method(modid = Globals.WCT) + public static void updateWirelessInventory(GuiScreen screen, final List list) { if (screen instanceof RecipesGui) { GuiScreen parent = ((RecipesGui) screen).getParentScreen(); if (parent instanceof GuiWCT) { diff --git a/src/main/java/com/github/vfyjxf/nee/asm/NEEClassTransformer.java b/src/main/java/com/github/vfyjxf/nee/asm/NEEClassTransformer.java index c1e065d..01279d6 100644 --- a/src/main/java/com/github/vfyjxf/nee/asm/NEEClassTransformer.java +++ b/src/main/java/com/github/vfyjxf/nee/asm/NEEClassTransformer.java @@ -1,6 +1,7 @@ package com.github.vfyjxf.nee.asm; import com.github.vfyjxf.nee.NotEnoughEnergistics; +import com.github.vfyjxf.nee.helper.ModChecker; import net.minecraft.launchwrapper.IClassTransformer; import org.objectweb.asm.ClassReader; import org.objectweb.asm.ClassWriter; @@ -48,6 +49,8 @@ public byte[] transform(String name, String transformedName, byte[] basicClass) return classWriter.toByteArray(); } if ("appeng/core/sync/packets/PacketMEInventoryUpdate".equals(internalName)) { + if (ModChecker.isUnofficialAppeng) return basicClass; + ClassNode classNode = new ClassNode(); ClassReader classReader = new ClassReader(basicClass); classReader.accept(classNode, 0); @@ -70,7 +73,7 @@ public byte[] transform(String name, String transformedName, byte[] basicClass) insnList.add(new MethodInsnNode(INVOKESTATIC, "com/github/vfyjxf/nee/asm/AppengHooks", "updateMeInventory", - "(Lnet/minecraft/client/gui/GuiScreen;Ljava/util/List;)V", + "(Ljava/lang/Object;Ljava/util/List;)V", false)); methodNode.instructions.insertBefore(instruction, insnList); } diff --git a/src/main/java/com/github/vfyjxf/nee/block/BlockPatternInterface.java b/src/main/java/com/github/vfyjxf/nee/block/BlockPatternInterface.java index 370589c..0cea253 100644 --- a/src/main/java/com/github/vfyjxf/nee/block/BlockPatternInterface.java +++ b/src/main/java/com/github/vfyjxf/nee/block/BlockPatternInterface.java @@ -5,7 +5,7 @@ import appeng.block.AEBaseTileBlock; import com.github.vfyjxf.nee.block.tile.TilePatternInterface; import com.github.vfyjxf.nee.network.NEEGuiHandler; -import com.github.vfyjxf.nee.utils.Gobals; +import com.github.vfyjxf.nee.utils.Globals; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; @@ -22,12 +22,12 @@ public class BlockPatternInterface extends AEBaseTileBlock { public static BlockPatternInterface BLOCK_INSTANCE = new BlockPatternInterface(); - public static Item ITEM_INSTANCE = new AEBaseItemBlock(BLOCK_INSTANCE).setRegistryName(Gobals.MOD_ID, "pattern_interface").setTranslationKey(Gobals.MOD_ID + "." + "pattern_interface"); + public static Item ITEM_INSTANCE = new AEBaseItemBlock(BLOCK_INSTANCE).setRegistryName(Globals.MOD_ID, "pattern_interface").setTranslationKey(Globals.MOD_ID + "." + "pattern_interface"); public BlockPatternInterface() { super(Material.IRON); - setRegistryName(Gobals.MOD_ID, "pattern_interface"); - setTranslationKey(Gobals.MOD_ID + "." + "pattern_interface"); + setRegistryName(Globals.MOD_ID, "pattern_interface"); + setTranslationKey(Globals.MOD_ID + "." + "pattern_interface"); setTileEntity(TilePatternInterface.class); } diff --git a/src/main/java/com/github/vfyjxf/nee/client/gui/CraftingAmountGui.java b/src/main/java/com/github/vfyjxf/nee/client/gui/CraftingAmountGui.java index 898c715..f47bb66 100644 --- a/src/main/java/com/github/vfyjxf/nee/client/gui/CraftingAmountGui.java +++ b/src/main/java/com/github/vfyjxf/nee/client/gui/CraftingAmountGui.java @@ -18,7 +18,7 @@ import com.github.vfyjxf.nee.container.ContainerCraftingAmount; import com.github.vfyjxf.nee.network.NEENetworkHandler; import com.github.vfyjxf.nee.network.packet.PacketCraftingRequest; -import com.github.vfyjxf.nee.utils.Gobals; +import com.github.vfyjxf.nee.utils.Globals; import com.github.vfyjxf.nee.utils.GuiUtils; import net.minecraft.client.gui.GuiButton; import net.minecraft.entity.player.InventoryPlayer; @@ -102,7 +102,7 @@ public void initGui() { this.originalGui = GuiBridge.GUI_CRAFTING_TERMINAL; } - if (Loader.isModLoaded(Gobals.WCT) && GuiUtils.isWirelessTerminalGuiObject(target) && this.wctObj != null) { + if (Loader.isModLoaded(Globals.WCT) && GuiUtils.isWirelessTerminalGuiObject(target) && this.wctObj != null) { myIcon = getIcon(); } @@ -191,7 +191,7 @@ protected void actionPerformed(@Nonnull final GuiButton btn) throws IOException if (btn == this.originalGuiBtn) { if (!this.isWirelessCrafting) { NetworkHandler.instance().sendToServer(new PacketSwitchGuis(this.originalGui)); - } else if (Loader.isModLoaded(Gobals.WCT)) { + } else if (Loader.isModLoaded(Globals.WCT)) { openWirelessTerminalGui(); } } @@ -251,7 +251,7 @@ private void addQty(final int i) { } } - @Optional.Method(modid = Gobals.WCT) + @Optional.Method(modid = Globals.WCT) private ItemStack getIcon() { if (wctObj instanceof ContainerWCT) { ContainerWCT wct = (ContainerWCT) this.wctObj; @@ -266,7 +266,7 @@ private ItemStack getIcon() { return null; } - @Optional.Method(modid = Gobals.WCT) + @Optional.Method(modid = Globals.WCT) private void openWirelessTerminalGui() { ModNetworking.instance().sendToServer(new p455w0rd.wct.sync.packets.PacketSwitchGuis(ModGuiHandler.GUI_WCT)); } diff --git a/src/main/java/com/github/vfyjxf/nee/client/gui/IngredientSwitcherWidget.java b/src/main/java/com/github/vfyjxf/nee/client/gui/IngredientSwitcherWidget.java index 8f9b443..4039fb5 100644 --- a/src/main/java/com/github/vfyjxf/nee/client/gui/IngredientSwitcherWidget.java +++ b/src/main/java/com/github/vfyjxf/nee/client/gui/IngredientSwitcherWidget.java @@ -8,7 +8,7 @@ import com.github.vfyjxf.nee.jei.PatternTransferHandler; import com.github.vfyjxf.nee.network.NEENetworkHandler; import com.github.vfyjxf.nee.network.packet.PacketSlotStackSwitch; -import com.github.vfyjxf.nee.utils.Gobals; +import com.github.vfyjxf.nee.utils.Globals; import com.github.vfyjxf.nee.utils.GuiUtils; import com.github.vfyjxf.nee.utils.ItemUtils; import net.minecraft.client.Minecraft; @@ -105,7 +105,7 @@ public void draw(Minecraft mc, int mouseX, int mouseY, float partialTicks) { RenderHelper.disableStandardItemLighting(); GlStateManager.disableDepth(); TextureManager textureManager = mc.getTextureManager(); - textureManager.bindTexture(new ResourceLocation(Gobals.MOD_ID, "textures/gui/ingredient_switcher_widget.png")); + textureManager.bindTexture(new ResourceLocation(Globals.MOD_ID, "textures/gui/ingredient_switcher_widget.png")); drawModalRectWithCustomSizedTexture(x, y, 0, 0, this.width, this.height, this.width, this.height); this.searchField.drawTextBox(); this.addButton.drawButton(mc, mouseX, mouseY, partialTicks); @@ -125,7 +125,7 @@ private void drawScrollBar(TextureManager textureManager) { if (maxScroll <= 0) return; int scrollBarLeft = x + width - 13; int scrollBarTop = y + 20; - textureManager.bindTexture(new ResourceLocation(Gobals.MOD_ID, "textures/gui/states.png")); + textureManager.bindTexture(new ResourceLocation(Globals.MOD_ID, "textures/gui/states.png")); GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f); if (this.scrollOffset == 0) { drawTexturedModalRect(scrollBarLeft, scrollBarTop, 4, 51, 7, 11); diff --git a/src/main/java/com/github/vfyjxf/nee/client/gui/PatternInterfaceGui.java b/src/main/java/com/github/vfyjxf/nee/client/gui/PatternInterfaceGui.java index b0d0be6..c8fa21e 100644 --- a/src/main/java/com/github/vfyjxf/nee/client/gui/PatternInterfaceGui.java +++ b/src/main/java/com/github/vfyjxf/nee/client/gui/PatternInterfaceGui.java @@ -7,7 +7,7 @@ import com.github.vfyjxf.nee.container.ContainerPatternInterface; import com.github.vfyjxf.nee.network.NEENetworkHandler; import com.github.vfyjxf.nee.network.packet.PacketValueConfigServer; -import com.github.vfyjxf.nee.utils.Gobals; +import com.github.vfyjxf.nee.utils.Globals; import net.minecraft.client.gui.GuiButton; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.ResourceLocation; @@ -66,6 +66,6 @@ protected void mouseClicked(int mouseX, int mouseY, int btn) throws IOException } private ResourceLocation getBackground() { - return new ResourceLocation(Gobals.MOD_ID, "textures/gui/pattern_interface.png"); + return new ResourceLocation(Globals.MOD_ID, "textures/gui/pattern_interface.png"); } } diff --git a/src/main/java/com/github/vfyjxf/nee/config/NEEConfig.java b/src/main/java/com/github/vfyjxf/nee/config/NEEConfig.java index f364a34..17fd91c 100644 --- a/src/main/java/com/github/vfyjxf/nee/config/NEEConfig.java +++ b/src/main/java/com/github/vfyjxf/nee/config/NEEConfig.java @@ -1,6 +1,6 @@ package com.github.vfyjxf.nee.config; -import com.github.vfyjxf.nee.utils.Gobals; +import com.github.vfyjxf.nee.utils.Globals; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.fml.client.event.ConfigChangedEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @@ -49,8 +49,8 @@ private NEEConfig() { private static boolean syncIngredientSwitcher = true; public static void preInit(FMLPreInitializationEvent event) { - File configDir = new File(event.getModConfigurationDirectory(), Gobals.MOD_ID); - modConfigFile = new File(configDir, Gobals.MOD_ID + ".cfg"); + File configDir = new File(event.getModConfigurationDirectory(), Globals.MOD_ID); + modConfigFile = new File(configDir, Globals.MOD_ID + ".cfg"); preferenceConfigFile = new File(configDir, "preference.ini"); blacklistFile = new File(configDir, "blacklist.ini"); config = new Configuration(modConfigFile); @@ -259,7 +259,7 @@ public static void setMergeBlacklist(String[] mergeBlacklist) { @SubscribeEvent public static void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) { - if (event.getModID().equals(Gobals.MOD_ID)) { + if (event.getModID().equals(Globals.MOD_ID)) { if (config.hasChanged()) { config.save(); } diff --git a/src/main/java/com/github/vfyjxf/nee/config/NEEConfigGuiFactory.java b/src/main/java/com/github/vfyjxf/nee/config/NEEConfigGuiFactory.java index cfed0d4..f1ac52e 100644 --- a/src/main/java/com/github/vfyjxf/nee/config/NEEConfigGuiFactory.java +++ b/src/main/java/com/github/vfyjxf/nee/config/NEEConfigGuiFactory.java @@ -1,6 +1,6 @@ package com.github.vfyjxf.nee.config; -import com.github.vfyjxf.nee.utils.Gobals; +import com.github.vfyjxf.nee.utils.Globals; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; import net.minecraftforge.common.config.ConfigElement; @@ -27,7 +27,7 @@ public boolean hasConfigGui() { @Override public GuiScreen createConfigGui(GuiScreen parentScreen) { - return new GuiConfig(parentScreen, getConfigElements(), Gobals.MOD_ID, false, false, Gobals.NAME); + return new GuiConfig(parentScreen, getConfigElements(), Globals.MOD_ID, false, false, Globals.NAME); } @Override diff --git a/src/main/java/com/github/vfyjxf/nee/helper/ModChecker.java b/src/main/java/com/github/vfyjxf/nee/helper/ModChecker.java new file mode 100644 index 0000000..54088c3 --- /dev/null +++ b/src/main/java/com/github/vfyjxf/nee/helper/ModChecker.java @@ -0,0 +1,23 @@ +package com.github.vfyjxf.nee.helper; + +/** + * Used to check the information of other mods to determine what mod they are. + */ +public class ModChecker { + + public static boolean isUnofficialAppeng = false; + + static { + checkUnofficial(); + } + + public static void checkUnofficial() { + try { + Class.forName("appeng.container.slot.IJEITargetSlot"); + isUnofficialAppeng = true; + } catch (ClassNotFoundException e) { + isUnofficialAppeng = false; + } + } + +} diff --git a/src/main/java/com/github/vfyjxf/nee/helper/RecipeAnalyzer.java b/src/main/java/com/github/vfyjxf/nee/helper/RecipeAnalyzer.java index 69a1d5f..30bcdf3 100644 --- a/src/main/java/com/github/vfyjxf/nee/helper/RecipeAnalyzer.java +++ b/src/main/java/com/github/vfyjxf/nee/helper/RecipeAnalyzer.java @@ -7,7 +7,7 @@ import appeng.client.me.ItemRepo; import appeng.util.item.AEItemStack; import com.github.vfyjxf.nee.config.NEEConfig; -import com.github.vfyjxf.nee.utils.Gobals; +import com.github.vfyjxf.nee.utils.Globals; import com.github.vfyjxf.nee.utils.IngredientStatus; import com.github.vfyjxf.nee.utils.ItemUtils; import mezz.jei.api.gui.IGuiIngredient; @@ -75,11 +75,14 @@ public RecipeAnalyzer(GuiCraftingTerm craftingTerm, boolean cleanCache) { if (allStacksCache.isEmpty()) allStacksCache = getStorage(); } - public RecipeAnalyzer(GuiWCT wirelessTerm) { + /** + *For some reason, we can't explicitly reference GuiWCT。 + */ + public RecipeAnalyzer(GuiContainer wirelessTerm) { this(wirelessTerm, shouldCleanCache); } - public RecipeAnalyzer(GuiWCT wirelessTerm, boolean cleanCache) { + public RecipeAnalyzer(GuiContainer wirelessTerm, boolean cleanCache) { this.term = wirelessTerm; this.craftableOnly = false; this.isWireless = true; @@ -282,7 +285,7 @@ private ItemRepo getRepo() { } } - @Optional.Method(modid = Gobals.WCT) + @Optional.Method(modid = Globals.WCT) private ItemRepo getWirelessRepo() { return getPrivateValue(GuiWCT.class, (GuiWCT) term, "repo"); } diff --git a/src/main/java/com/github/vfyjxf/nee/jei/CraftingTransferHandler.java b/src/main/java/com/github/vfyjxf/nee/jei/CraftingTransferHandler.java index 82bbdbd..8710fdf 100644 --- a/src/main/java/com/github/vfyjxf/nee/jei/CraftingTransferHandler.java +++ b/src/main/java/com/github/vfyjxf/nee/jei/CraftingTransferHandler.java @@ -14,7 +14,7 @@ import com.github.vfyjxf.nee.helper.CraftingHelper; import com.github.vfyjxf.nee.helper.IngredientRequester; import com.github.vfyjxf.nee.helper.RecipeAnalyzer; -import com.github.vfyjxf.nee.utils.Gobals; +import com.github.vfyjxf.nee.utils.Globals; import com.github.vfyjxf.nee.utils.GuiUtils; import mezz.jei.api.gui.IGuiIngredient; import mezz.jei.api.gui.IRecipeLayout; @@ -31,7 +31,6 @@ import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.Optional; import net.minecraftforge.items.IItemHandler; -import p455w0rd.wct.client.gui.GuiWCT; import p455w0rd.wct.init.ModNetworking; import javax.annotation.Nonnull; @@ -102,15 +101,15 @@ private RecipeAnalyzer createAnalyzer(@Nonnull GuiScreen screen) { if (screen instanceof GuiCraftingTerm) { return new RecipeAnalyzer(((GuiCraftingTerm) screen)); } - if (Loader.isModLoaded(Gobals.WCT)) { + if (Loader.isModLoaded(Globals.WCT)) { return createAnalyzer((GuiContainer) screen); } return null; } - @Optional.Method(modid = Gobals.WCT) + @Optional.Method(modid = Globals.WCT) private RecipeAnalyzer createAnalyzer(@Nonnull GuiContainer wirelessTerm) { - return new RecipeAnalyzer((GuiWCT) wirelessTerm); + return new RecipeAnalyzer(wirelessTerm); } /** @@ -241,7 +240,7 @@ private void openWirelessCraftingAmountGui(Container container, IRecipeLayout re */ - @Optional.Method(modid = Gobals.WCT) + @Optional.Method(modid = Globals.WCT) private void moveItemsForWirelessTerm(NBTTagCompound recipe) { try { ModNetworking.instance().sendToServer(new p455w0rd.wct.sync.packets.PacketJEIRecipe(recipe)); diff --git a/src/main/java/com/github/vfyjxf/nee/network/NEEGuiHandler.java b/src/main/java/com/github/vfyjxf/nee/network/NEEGuiHandler.java index ff25fc4..ea92afa 100644 --- a/src/main/java/com/github/vfyjxf/nee/network/NEEGuiHandler.java +++ b/src/main/java/com/github/vfyjxf/nee/network/NEEGuiHandler.java @@ -20,7 +20,7 @@ import com.github.vfyjxf.nee.container.ContainerCraftingConfirm; import com.github.vfyjxf.nee.container.ContainerPatternInterface; import com.github.vfyjxf.nee.container.WCTContainerCraftingConfirm; -import com.github.vfyjxf.nee.utils.Gobals; +import com.github.vfyjxf.nee.utils.Globals; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; import net.minecraft.item.ItemStack; @@ -98,7 +98,7 @@ public Object getServerGuiElement(int ordinal, EntityPlayer player, World world, } } } - } else if (Loader.isModLoaded(Gobals.WCT)) { + } else if (Loader.isModLoaded(Globals.WCT)) { final ITerminalHost craftingTerminal = getCraftingTerminal(player, ModGuiHandler.isBauble(), ModGuiHandler.getSlot()); if (craftingTerminal != null) { @@ -157,7 +157,7 @@ public Object getClientGuiElement(int ordinal, EntityPlayer player, World world, } } } - } else if (Loader.isModLoaded(Gobals.WCT)) { + } else if (Loader.isModLoaded(Globals.WCT)) { final ITerminalHost craftingTerminal = getCraftingTerminal(player, ModGuiHandler.isBauble(), ModGuiHandler.getSlot()); if (craftingTerminal != null) { Container container = player.openContainer; @@ -203,7 +203,7 @@ public static void openGui(EntityPlayer player, int id, World world) { } @SuppressWarnings("unchecked") - @Optional.Method(modid = Gobals.WCT) + @Optional.Method(modid = Globals.WCT) private ITerminalHost getCraftingTerminal(final EntityPlayer player, final boolean isBauble, final int slot) { ItemStack wirelessTerminal; if (slot >= 0) { diff --git a/src/main/java/com/github/vfyjxf/nee/network/NEENetworkHandler.java b/src/main/java/com/github/vfyjxf/nee/network/NEENetworkHandler.java index 074072c..3d175af 100644 --- a/src/main/java/com/github/vfyjxf/nee/network/NEENetworkHandler.java +++ b/src/main/java/com/github/vfyjxf/nee/network/NEENetworkHandler.java @@ -1,13 +1,13 @@ package com.github.vfyjxf.nee.network; import com.github.vfyjxf.nee.network.packet.*; -import com.github.vfyjxf.nee.utils.Gobals; +import com.github.vfyjxf.nee.utils.Globals; import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper; import net.minecraftforge.fml.relauncher.Side; public class NEENetworkHandler { - private static final SimpleNetworkWrapper INSTANCE = new SimpleNetworkWrapper(Gobals.MOD_ID); + private static final SimpleNetworkWrapper INSTANCE = new SimpleNetworkWrapper(Globals.MOD_ID); private static int packId = 0; public static SimpleNetworkWrapper getInstance() { diff --git a/src/main/java/com/github/vfyjxf/nee/network/packet/PacketCraftingRequest.java b/src/main/java/com/github/vfyjxf/nee/network/packet/PacketCraftingRequest.java index 52ae7e2..50b4cd8 100644 --- a/src/main/java/com/github/vfyjxf/nee/network/packet/PacketCraftingRequest.java +++ b/src/main/java/com/github/vfyjxf/nee/network/packet/PacketCraftingRequest.java @@ -25,7 +25,7 @@ import com.github.vfyjxf.nee.container.ContainerCraftingConfirm; import com.github.vfyjxf.nee.container.WCTContainerCraftingConfirm; import com.github.vfyjxf.nee.network.NEEGuiHandler; -import com.github.vfyjxf.nee.utils.Gobals; +import com.github.vfyjxf.nee.utils.Globals; import com.github.vfyjxf.nee.utils.GuiUtils; import io.netty.buffer.ByteBuf; import net.minecraft.entity.player.EntityPlayer; @@ -211,7 +211,7 @@ private void handlerCraftingAmountRequest(ContainerCraftingAmount container, Pac ccc.setPatternIndex(pair.getRight()); ccc.detectAndSendChanges(); } - } else if (Loader.isModLoaded(Gobals.WCT) && container.isWirelessTerm()) { + } else if (Loader.isModLoaded(Globals.WCT) && container.isWirelessTerm()) { NEEGuiHandler.openGui(player, NEEGuiHandler.WIRELESS_CRAFTING_CONFIRM_ID, player.world); diff --git a/src/main/java/com/github/vfyjxf/nee/proxy/ClientProxy.java b/src/main/java/com/github/vfyjxf/nee/proxy/ClientProxy.java index dc5c1d8..28fb55a 100644 --- a/src/main/java/com/github/vfyjxf/nee/proxy/ClientProxy.java +++ b/src/main/java/com/github/vfyjxf/nee/proxy/ClientProxy.java @@ -5,7 +5,7 @@ import com.github.vfyjxf.nee.config.KeyBindings; import com.github.vfyjxf.nee.config.NEEConfig; import com.github.vfyjxf.nee.network.NEENetworkHandler; -import com.github.vfyjxf.nee.utils.Gobals; +import com.github.vfyjxf.nee.utils.Globals; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraftforge.client.ClientCommandHandler; import net.minecraftforge.client.event.ModelRegistryEvent; @@ -19,7 +19,7 @@ import static com.github.vfyjxf.nee.block.BlockPatternInterface.ITEM_INSTANCE; -@Mod.EventBusSubscriber(modid = Gobals.MOD_ID) +@Mod.EventBusSubscriber(modid = Globals.MOD_ID) public class ClientProxy extends CommonProxy { @Override public void init(FMLInitializationEvent event) { diff --git a/src/main/java/com/github/vfyjxf/nee/proxy/CommonProxy.java b/src/main/java/com/github/vfyjxf/nee/proxy/CommonProxy.java index 1e641f9..c65e2f3 100644 --- a/src/main/java/com/github/vfyjxf/nee/proxy/CommonProxy.java +++ b/src/main/java/com/github/vfyjxf/nee/proxy/CommonProxy.java @@ -5,7 +5,7 @@ import appeng.tile.AEBaseTile; import com.github.vfyjxf.nee.block.BlockPatternInterface; import com.github.vfyjxf.nee.block.tile.TilePatternInterface; -import com.github.vfyjxf.nee.utils.Gobals; +import com.github.vfyjxf.nee.utils.Globals; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.util.ResourceLocation; @@ -16,7 +16,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.registry.GameRegistry; -@Mod.EventBusSubscriber(modid = Gobals.MOD_ID) +@Mod.EventBusSubscriber(modid = Globals.MOD_ID) public class CommonProxy { public void init(FMLInitializationEvent event) { @@ -36,7 +36,7 @@ public static void onItemRegister(RegistryEvent.Register event) { @SubscribeEvent public static void onBlockRegister(RegistryEvent.Register event) { event.getRegistry().register(BlockPatternInterface.BLOCK_INSTANCE); - GameRegistry.registerTileEntity(TilePatternInterface.class, new ResourceLocation(Gobals.MOD_ID, "patterninterface")); + GameRegistry.registerTileEntity(TilePatternInterface.class, new ResourceLocation(Globals.MOD_ID, "patterninterface")); } } diff --git a/src/main/java/com/github/vfyjxf/nee/utils/Gobals.java b/src/main/java/com/github/vfyjxf/nee/utils/Globals.java similarity index 95% rename from src/main/java/com/github/vfyjxf/nee/utils/Gobals.java rename to src/main/java/com/github/vfyjxf/nee/utils/Globals.java index 709d7d1..884ab4a 100644 --- a/src/main/java/com/github/vfyjxf/nee/utils/Gobals.java +++ b/src/main/java/com/github/vfyjxf/nee/utils/Globals.java @@ -1,6 +1,6 @@ package com.github.vfyjxf.nee.utils; -public class Gobals { +public class Globals { public static final String MOD_ID = "neenergistics"; public static final String NAME = "NotEnoughEnergistics"; public static final String VERSION = "@VERSION@";