From 4f7ad220df0438b6f3382110577b53f29da46453 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Thu, 24 May 2018 15:50:07 -0400 Subject: Update of all changes --- .../darkknight/jewelrycraft/thirdparty/Alpaca.java | 28 -- .../darkknight/jewelrycraft/thirdparty/EE3.java | 89 ++++--- .../jewelrycraft/thirdparty/IRegistryListener.java | 9 +- .../jewelrycraft/thirdparty/IThirdParty.java | 26 +- .../darkknight/jewelrycraft/thirdparty/ModIds.java | 48 ++-- .../darkknight/jewelrycraft/thirdparty/NEI.java | 22 +- .../jewelrycraft/thirdparty/ThirdPartyManager.java | 289 ++++++++++++--------- .../jewelrycraft/thirdparty/WailaHandler.java | 59 ----- 8 files changed, 280 insertions(+), 290 deletions(-) delete mode 100644 src/main/java/darkknight/jewelrycraft/thirdparty/Alpaca.java mode change 100644 => 100755 src/main/java/darkknight/jewelrycraft/thirdparty/EE3.java mode change 100644 => 100755 src/main/java/darkknight/jewelrycraft/thirdparty/IRegistryListener.java mode change 100644 => 100755 src/main/java/darkknight/jewelrycraft/thirdparty/IThirdParty.java mode change 100644 => 100755 src/main/java/darkknight/jewelrycraft/thirdparty/ModIds.java mode change 100644 => 100755 src/main/java/darkknight/jewelrycraft/thirdparty/NEI.java mode change 100644 => 100755 src/main/java/darkknight/jewelrycraft/thirdparty/ThirdPartyManager.java delete mode 100644 src/main/java/darkknight/jewelrycraft/thirdparty/WailaHandler.java (limited to 'src/main/java/darkknight/jewelrycraft/thirdparty') diff --git a/src/main/java/darkknight/jewelrycraft/thirdparty/Alpaca.java b/src/main/java/darkknight/jewelrycraft/thirdparty/Alpaca.java deleted file mode 100644 index aee56dd..0000000 --- a/src/main/java/darkknight/jewelrycraft/thirdparty/Alpaca.java +++ /dev/null @@ -1,28 +0,0 @@ -package darkknight.jewelrycraft.thirdparty; - -/** - * @author Sorin - */ -public class Alpaca implements IThirdParty -{ - @Override - public void preInit() - {} - - @Override - public void init() - {} - - @Override - public void postInit() - { - } - - @Override - public void clientSide() - {} - - @Override - public void clientInit() - {} -} diff --git a/src/main/java/darkknight/jewelrycraft/thirdparty/EE3.java b/src/main/java/darkknight/jewelrycraft/thirdparty/EE3.java old mode 100644 new mode 100755 index af764ff..e9bb21f --- a/src/main/java/darkknight/jewelrycraft/thirdparty/EE3.java +++ b/src/main/java/darkknight/jewelrycraft/thirdparty/EE3.java @@ -3,6 +3,7 @@ package darkknight.jewelrycraft.thirdparty; import com.pahimar.ee3.api.exchange.EnergyValueRegistryProxy; import com.pahimar.ee3.init.ModItems; import com.pahimar.ee3.reference.Names; + import darkknight.jewelrycraft.block.BlockCrystal; import darkknight.jewelrycraft.block.BlockList; import darkknight.jewelrycraft.item.ItemClayMolds; @@ -11,35 +12,61 @@ import darkknight.jewelrycraft.item.ItemMolds; import darkknight.jewelrycraft.util.JewelrycraftUtil; import net.minecraft.item.ItemStack; -public class EE3 implements IThirdParty -{ - @Override - public void preInit() - {} - - @Override - public void init() - {} - - @Override - public void postInit() - { - EnergyValueRegistryProxy.addPostAssignedEnergyValue(new ItemStack(BlockList.shadowOre), 4096); - EnergyValueRegistryProxy.addPostAssignedEnergyValue(new ItemStack(BlockList.shadowBlock), 36864); - EnergyValueRegistryProxy.addPostAssignedEnergyValue(new ItemStack(ItemList.shadowIngot), 4096); - EnergyValueRegistryProxy.addPostAssignedEnergyValue(new ItemStack(BlockList.jewelCraftingTable), 16640); - EnergyValueRegistryProxy.addPostAssignedEnergyValue(new ItemStack(ItemList.guide), 288); - for(int i = 0; i < ItemClayMolds.moldsItemNames.length; i++) EnergyValueRegistryProxy.addPostAssignedEnergyValue(new ItemStack(ItemList.clayMolds, 1, i), 128); - for(int i = 0; i < ItemMolds.moldsItemNames.length; i++) EnergyValueRegistryProxy.addPostAssignedEnergyValue(new ItemStack(ItemList.molds, 1, i), 128); - for(int i = 0; i < BlockCrystal.colors.length; i++) EnergyValueRegistryProxy.addPostAssignedEnergyValue(new ItemStack(BlockList.crystal, 1, i), 64); - for(int i = 0; i < Names.Items.GEM_SUBTYPES.length; i++) JewelrycraftUtil.gem.add(new ItemStack(ModItems.gem, 1, i)); - } - - @Override - public void clientSide() - {} - - @Override - public void clientInit() - {} +public class EE3 implements IThirdParty { + @Override + public void preInit() { + // Do nothing + } + + @Override + public void init() { + // Do nothing + } + + @Override + public void postInit() { + EnergyValueRegistryProxy.addPostAssignedEnergyValue( + new ItemStack(BlockList.shadowOre), 4096); + + EnergyValueRegistryProxy.addPostAssignedEnergyValue( + new ItemStack(BlockList.shadowBlock), 36864); + + EnergyValueRegistryProxy.addPostAssignedEnergyValue( + new ItemStack(ItemList.shadowIngot), 4096); + + EnergyValueRegistryProxy.addPostAssignedEnergyValue( + new ItemStack(BlockList.jewelCraftingTable), 16640); + + EnergyValueRegistryProxy.addPostAssignedEnergyValue( + new ItemStack(ItemList.guide), 288); + + for (int i = 0; i < ItemClayMolds.moldsItemNames.length; i++) { + EnergyValueRegistryProxy.addPostAssignedEnergyValue( + new ItemStack(ItemList.clayMolds, 1, i), 128); + } + + for (int i = 0; i < ItemMolds.moldsItemNames.length; i++) { + EnergyValueRegistryProxy.addPostAssignedEnergyValue( + new ItemStack(ItemList.molds, 1, i), 128); + } + + for (int i = 0; i < BlockCrystal.colors.length; i++) { + EnergyValueRegistryProxy.addPostAssignedEnergyValue( + new ItemStack(BlockList.crystal, 1, i), 64); + } + + for (int i = 0; i < Names.Items.GEM_SUBTYPES.length; i++) { + JewelrycraftUtil.gem.add(new ItemStack(ModItems.gem, 1, i)); + } + } + + @Override + public void clientSide() { + // Do nothing + } + + @Override + public void clientInit() { + // Do nothing + } } \ No newline at end of file diff --git a/src/main/java/darkknight/jewelrycraft/thirdparty/IRegistryListener.java b/src/main/java/darkknight/jewelrycraft/thirdparty/IRegistryListener.java old mode 100644 new mode 100755 index 703a226..850fc35 --- a/src/main/java/darkknight/jewelrycraft/thirdparty/IRegistryListener.java +++ b/src/main/java/darkknight/jewelrycraft/thirdparty/IRegistryListener.java @@ -2,11 +2,12 @@ package darkknight.jewelrycraft.thirdparty; import net.minecraft.block.Block; import net.minecraft.item.Item; -/** + +/** * @author MineMarteen from Pneumaticraft */ -public interface IRegistryListener{ - public void onItemRegistry(Item item); +public interface IRegistryListener { + public void onItemRegistry(Item item); - public void onBlockRegistry(Block block); + public void onBlockRegistry(Block block); } \ No newline at end of file diff --git a/src/main/java/darkknight/jewelrycraft/thirdparty/IThirdParty.java b/src/main/java/darkknight/jewelrycraft/thirdparty/IThirdParty.java old mode 100644 new mode 100755 index 8aaba72..fe555ca --- a/src/main/java/darkknight/jewelrycraft/thirdparty/IThirdParty.java +++ b/src/main/java/darkknight/jewelrycraft/thirdparty/IThirdParty.java @@ -1,23 +1,23 @@ package darkknight.jewelrycraft.thirdparty; -/** +/** * @author MineMarteen from Pneumaticraft */ -public interface IThirdParty{ +public interface IThirdParty { - public void preInit(); + public void preInit(); - public void init(); + public void init(); - public void postInit(); + public void postInit(); - /** - * Gets called from the ClientProxy in the preInit. - */ - public void clientSide(); + /** + * Gets called from the ClientProxy in the preInit. + */ + public void clientSide(); - /** - * Gets called from the ClientProxy in the Init. - */ - public void clientInit(); + /** + * Gets called from the ClientProxy in the Init. + */ + public void clientInit(); } \ No newline at end of file diff --git a/src/main/java/darkknight/jewelrycraft/thirdparty/ModIds.java b/src/main/java/darkknight/jewelrycraft/thirdparty/ModIds.java old mode 100644 new mode 100755 index b4a64c9..7bda520 --- a/src/main/java/darkknight/jewelrycraft/thirdparty/ModIds.java +++ b/src/main/java/darkknight/jewelrycraft/thirdparty/ModIds.java @@ -1,29 +1,29 @@ package darkknight.jewelrycraft.thirdparty; -/** +/** * @author MineMarteen from Pneumaticraft */ -public class ModIds{ - public static final String BUILDCRAFT = "BuildCraft|Core"; - public static final String COMPUTERCRAFT = "ComputerCraft"; - public static final String INDUSTRIALCRAFT = "IC2"; - public static final String IGWMOD = "IGWMod"; - public static final String FMP = "ForgeMultipart"; - public static final String WAILA = "Waila"; - public static final String TE = "ThermalExpansion"; - public static final String HC = "HydCraft"; - public static final String NEI = "NotEnoughItems"; - public static final String THAUMCRAFT = "Thaumcraft"; - public static final String BLOOD_MAGIC = "AWWayofTime"; - public static final String AE2 = "appliedenergistics2"; - public static final String CHISEL = "chisel"; - public static final String FORESTRY = "Forestry"; - public static final String MFR = "MineFactoryReloaded"; - public static final String OPEN_BLOCKS = "OpenBlocks"; - public static final String COFH_CORE = "CoFHCore"; - public static final String NOT_ENOUGH_KEYS = "notenoughkeys"; - public static final String OPEN_COMPUTERS = "OpenComputers|Core"; - public static final String EE3 = "EE3"; - public static final String PENUMATICRAFT = "PneumaticCraft"; - public static final String ALPACA = "alpaca"; +public class ModIds { + public static final String BUILDCRAFT = "BuildCraft|Core"; + public static final String COMPUTERCRAFT = "ComputerCraft"; + public static final String INDUSTRIALCRAFT = "IC2"; + public static final String IGWMOD = "IGWMod"; + public static final String FMP = "ForgeMultipart"; + public static final String WAILA = "Waila"; + public static final String TE = "ThermalExpansion"; + public static final String HC = "HydCraft"; + public static final String NEI = "NotEnoughItems"; + public static final String THAUMCRAFT = "Thaumcraft"; + public static final String BLOOD_MAGIC = "AWWayofTime"; + public static final String AE2 = "appliedenergistics2"; + public static final String CHISEL = "chisel"; + public static final String FORESTRY = "Forestry"; + public static final String MFR = "MineFactoryReloaded"; + public static final String OPEN_BLOCKS = "OpenBlocks"; + public static final String COFH_CORE = "CoFHCore"; + public static final String NOT_ENOUGH_KEYS = "notenoughkeys"; + public static final String OPEN_COMPUTERS = "OpenComputers|Core"; + public static final String EE3 = "EE3"; + public static final String PENUMATICRAFT = "PneumaticCraft"; + public static final String ALPACA = "alpaca"; } \ No newline at end of file diff --git a/src/main/java/darkknight/jewelrycraft/thirdparty/NEI.java b/src/main/java/darkknight/jewelrycraft/thirdparty/NEI.java old mode 100644 new mode 100755 index 2371137..feb6e6f --- a/src/main/java/darkknight/jewelrycraft/thirdparty/NEI.java +++ b/src/main/java/darkknight/jewelrycraft/thirdparty/NEI.java @@ -7,23 +7,33 @@ import net.minecraft.item.ItemStack; public class NEI implements IThirdParty { @Override - public void preInit() {} + public void preInit() { + // Do nothing + } @Override - public void init() {} + public void init() { + // Do nothing + } @Override public void postInit() { for (int i = 0; i < Curse.getCurseList().size(); i++) - codechicken.nei.api.API.hideItem(new ItemStack(ItemList.testItem, 1, i)); + codechicken.nei.api.API + .hideItem(new ItemStack(ItemList.testItem, 1, i)); codechicken.nei.api.API.hideItem(new ItemStack(ItemList.goldObj)); - codechicken.nei.api.API.hideItem(new ItemStack(BlockList.midasTouchBlock)); + codechicken.nei.api.API + .hideItem(new ItemStack(BlockList.midasTouchBlock)); codechicken.nei.api.API.hideItem(new ItemStack(ItemList.metal)); } @Override - public void clientSide() {} + public void clientSide() { + // Do nothing + } @Override - public void clientInit() {} + public void clientInit() { + // Do nothing + } } diff --git a/src/main/java/darkknight/jewelrycraft/thirdparty/ThirdPartyManager.java b/src/main/java/darkknight/jewelrycraft/thirdparty/ThirdPartyManager.java old mode 100644 new mode 100755 index c45bd12..612d23d --- a/src/main/java/darkknight/jewelrycraft/thirdparty/ThirdPartyManager.java +++ b/src/main/java/darkknight/jewelrycraft/thirdparty/ThirdPartyManager.java @@ -4,7 +4,9 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.logging.log4j.Level; + import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.network.IGuiHandler; import darkknight.jewelrycraft.JewelrycraftMod; @@ -14,132 +16,169 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.world.World; -/** +/** * @author MineMarteen from Pneumaticraft */ -public class ThirdPartyManager implements IGuiHandler{ - - private static ThirdPartyManager INSTANCE = new ThirdPartyManager(); - private final List thirdPartyMods = new ArrayList(); - - public static ThirdPartyManager instance(){ - return INSTANCE; - } - - public void index(){ - Map> thirdPartyClasses = new HashMap>(); - thirdPartyClasses.put(ModIds.EE3, EE3.class); - thirdPartyClasses.put(ModIds.NEI, NEI.class); - thirdPartyClasses.put(ModIds.ALPACA, Alpaca.class); - - List enabledThirdParty = new ArrayList(); - ConfigHandler.config.addCustomCategoryComment("third_party_enabling", "With these options you can disable third party content by mod. Useful if something in the mod changes and causes crashes."); - for(String modid : thirdPartyClasses.keySet()) { - if(ConfigHandler.config.get("Third_Party_Enabling", modid, true).getBoolean()) { - enabledThirdParty.add(modid); - } - } - ConfigHandler.config.save(); - - for(Map.Entry> entry : thirdPartyClasses.entrySet()) { - if(enabledThirdParty.contains(entry.getKey()) && Loader.isModLoaded(entry.getKey())) { - try { - thirdPartyMods.add(entry.getValue().newInstance()); - } catch(Exception e) { - JewelrycraftMod.logger.log(Level.ERROR, "Failed to instantiate third party handler!"); - e.printStackTrace(); - } - } - } - } - - public void onItemRegistry(Item item){ - for(IThirdParty thirdParty : thirdPartyMods) { - if(thirdParty instanceof IRegistryListener) ((IRegistryListener)thirdParty).onItemRegistry(item); - } - } - - public void onBlockRegistry(Block block){ - for(IThirdParty thirdParty : thirdPartyMods) { - if(thirdParty instanceof IRegistryListener) ((IRegistryListener)thirdParty).onBlockRegistry(block); - } - } - - public void preInit(){ - for(IThirdParty thirdParty : thirdPartyMods) { - try { - thirdParty.preInit(); - } catch(Throwable e) { - JewelrycraftMod.logger.log(Level.ERROR, "Jewelrycraft wasn't able to load third party content from the third party class " + thirdParty.getClass() + " in the PreInit phase!"); - e.printStackTrace(); - } - } - } - - public void init(){ - for(IThirdParty thirdParty : thirdPartyMods) { - try { - thirdParty.init(); - } catch(Throwable e) { - JewelrycraftMod.logger.log(Level.ERROR, "Jewelrycraft wasn't able to load third party content from the third party class " + thirdParty.getClass() + " in the Init phase!"); - e.printStackTrace(); - } - } - } - - public void postInit(){ - for(IThirdParty thirdParty : thirdPartyMods) { - try { - thirdParty.postInit(); - } catch(Throwable e) { - JewelrycraftMod.logger.log(Level.ERROR, "Jewelrycraft wasn't able to load third party content from the third party class " + thirdParty.getClass() + " in the PostInit phase!"); - e.printStackTrace(); - } - } - } - - public void clientSide(){ - for(IThirdParty thirdParty : thirdPartyMods) { - try { - thirdParty.clientSide(); - } catch(Throwable e) { - JewelrycraftMod.logger.log(Level.ERROR, "Jewelrycraft wasn't able to load third party content from the third party class " + thirdParty.getClass() + " client side!"); - e.printStackTrace(); - } - } - } - - public void clientInit(){ - for(IThirdParty thirdParty : thirdPartyMods) { - try { - thirdParty.clientInit(); - } catch(Throwable e) { - JewelrycraftMod.logger.log(Level.ERROR, "Jewelrycraft wasn't able to load third party content from the third party class " + thirdParty.getClass() + " client side on the init!"); - e.printStackTrace(); - } - } - } - - @Override - public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z){ - for(IThirdParty thirdParty : thirdPartyMods) { - if(thirdParty instanceof IGuiHandler) { - Object obj = ((IGuiHandler)thirdParty).getServerGuiElement(ID, player, world, x, y, z); - if(obj != null) return obj; - } - } - return null; - } - - @Override - public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z){ - for(IThirdParty thirdParty : thirdPartyMods) { - if(thirdParty instanceof IGuiHandler) { - Object obj = ((IGuiHandler)thirdParty).getClientGuiElement(ID, player, world, x, y, z); - if(obj != null) return obj; - } - } - return null; - } +public class ThirdPartyManager implements IGuiHandler { + + private static ThirdPartyManager INSTANCE = + new ThirdPartyManager(); + private final List thirdPartyMods = + new ArrayList<>(); + + public static ThirdPartyManager instance() { + return INSTANCE; + } + + public void index() { + Map> thirdPartyClasses = + new HashMap<>(); + + thirdPartyClasses.put(ModIds.EE3, EE3.class); + thirdPartyClasses.put(ModIds.NEI, NEI.class); + + List enabledThirdParty = new ArrayList<>(); + + ConfigHandler.config.addCustomCategoryComment( + "third_party_enabling", + "With these options you can disable third party content by mod." + + " Useful if something in the mod changes and causes crashes."); + + for (String modid : thirdPartyClasses.keySet()) { + if (ConfigHandler.config + .get("Third_Party_Enabling", modid, true) + .getBoolean()) { + enabledThirdParty.add(modid); + } + } + + ConfigHandler.config.save(); + + for (Map.Entry> entry : thirdPartyClasses + .entrySet()) { + if (enabledThirdParty.contains(entry.getKey()) + && Loader.isModLoaded(entry.getKey())) { + try { + thirdPartyMods.add(entry.getValue().newInstance()); + } catch (Exception e) { + JewelrycraftMod.logger.log(Level.ERROR, + "Failed to instantiate third party handler!"); + e.printStackTrace(); + } + } + } + } + + public void onItemRegistry(Item item) { + for (IThirdParty thirdParty : thirdPartyMods) { + if (thirdParty instanceof IRegistryListener) + ((IRegistryListener) thirdParty).onItemRegistry(item); + } + } + + public void onBlockRegistry(Block block) { + for (IThirdParty thirdParty : thirdPartyMods) { + if (thirdParty instanceof IRegistryListener) + ((IRegistryListener) thirdParty).onBlockRegistry(block); + } + } + + public void preInit() { + for (IThirdParty thirdParty : thirdPartyMods) { + try { + thirdParty.preInit(); + } catch (Throwable e) { + JewelrycraftMod.logger.log(Level.ERROR, + "Jewelrycraft wasn't able to load third party content from the third party class " + + thirdParty.getClass() + + " in the PreInit phase!"); + e.printStackTrace(); + } + } + } + + public void init() { + for (IThirdParty thirdParty : thirdPartyMods) { + try { + thirdParty.init(); + } catch (Throwable e) { + JewelrycraftMod.logger.log(Level.ERROR, + "Jewelrycraft wasn't able to load third party content from the third party class " + + thirdParty.getClass() + + " in the Init phase!"); + e.printStackTrace(); + } + } + } + + public void postInit() { + for (IThirdParty thirdParty : thirdPartyMods) { + try { + thirdParty.postInit(); + } catch (Throwable e) { + JewelrycraftMod.logger.log(Level.ERROR, + "Jewelrycraft wasn't able to load third party content from the third party class " + + thirdParty.getClass() + + " in the PostInit phase!"); + e.printStackTrace(); + } + } + } + + public void clientSide() { + for (IThirdParty thirdParty : thirdPartyMods) { + try { + thirdParty.clientSide(); + } catch (Throwable e) { + JewelrycraftMod.logger.log(Level.ERROR, + "Jewelrycraft wasn't able to load third party content from the third party class " + + thirdParty.getClass() + " client side!"); + e.printStackTrace(); + } + } + } + + public void clientInit() { + for (IThirdParty thirdParty : thirdPartyMods) { + try { + thirdParty.clientInit(); + } catch (Throwable e) { + JewelrycraftMod.logger.log(Level.ERROR, + "Jewelrycraft wasn't able to load third party content from the third party class " + + thirdParty.getClass() + + " client side on the init!"); + e.printStackTrace(); + } + } + } + + @Override + public Object getServerGuiElement(int ID, EntityPlayer player, + World world, int x, int y, int z) { + for (IThirdParty thirdParty : thirdPartyMods) { + if (thirdParty instanceof IGuiHandler) { + Object obj = ((IGuiHandler) thirdParty) + .getServerGuiElement(ID, player, world, x, y, z); + if (obj != null) + return obj; + } + } + return null; + } + + @Override + public Object getClientGuiElement(int ID, EntityPlayer player, + World world, int x, int y, int z) { + for (IThirdParty thirdParty : thirdPartyMods) { + if (thirdParty instanceof IGuiHandler) { + Object obj = ((IGuiHandler) thirdParty) + .getClientGuiElement(ID, player, world, x, y, z); + if (obj != null) + return obj; + } + } + return null; + } } \ No newline at end of file diff --git a/src/main/java/darkknight/jewelrycraft/thirdparty/WailaHandler.java b/src/main/java/darkknight/jewelrycraft/thirdparty/WailaHandler.java deleted file mode 100644 index 4352867..0000000 --- a/src/main/java/darkknight/jewelrycraft/thirdparty/WailaHandler.java +++ /dev/null @@ -1,59 +0,0 @@ -package darkknight.jewelrycraft.thirdparty; - -import java.util.List; -import darkknight.jewelrycraft.item.ItemList; -import darkknight.jewelrycraft.tileentity.TileEntityMoltenMetal; -import darkknight.jewelrycraft.util.JewelryNBT; -import mcp.mobius.waila.api.IWailaConfigHandler; -import mcp.mobius.waila.api.IWailaDataAccessor; -import mcp.mobius.waila.api.IWailaDataProvider; -import mcp.mobius.waila.api.IWailaRegistrar; -import mcp.mobius.waila.api.SpecialChars; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.StatCollector; -import net.minecraft.world.World; - -public class WailaHandler implements IWailaDataProvider{ - - @Override - public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) { - TileEntityMoltenMetal te = (TileEntityMoltenMetal)accessor.getTileEntity(); - ItemStack is = new ItemStack(ItemList.metal); - JewelryNBT.addMetal(is, te.getMetal()); - return is; - } - - @Override - public List getWailaHead(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { - TileEntityMoltenMetal te = (TileEntityMoltenMetal)accessor.getTileEntity(); - String metalName = SpecialChars.WHITE + StatCollector.translateToLocal("tile.jewelrycraft2.moltenMetal.name") + " " + te.getMetal().getDisplayName(); - currenttip.remove(0); - currenttip.add(0, metalName); - return currenttip; - } - - @Override - public List getWailaBody(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { - return currenttip; - } - - @Override - public List getWailaTail(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) { - return currenttip; - } - - public static void registration(IWailaRegistrar registrar){ - registrar.registerStackProvider(new WailaHandler(), TileEntityMoltenMetal.class); - registrar.registerHeadProvider(new WailaHandler(), TileEntityMoltenMetal.class); - } - - @Override - public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound nbt, World world, int x, int y, int z) - { - return null; - } - -} -- cgit v1.2.3