summaryrefslogtreecommitdiff
path: root/src/main/java/darkknight/jewelrycraft/thirdparty
diff options
context:
space:
mode:
authorbculkin2442 <bjculkin@mix.wvu.edu>2018-05-24 15:50:07 -0400
committerbculkin2442 <bjculkin@mix.wvu.edu>2018-05-24 15:50:07 -0400
commit4f7ad220df0438b6f3382110577b53f29da46453 (patch)
tree07d5e7c812721753cdbe3df7226dad5dc3802c29 /src/main/java/darkknight/jewelrycraft/thirdparty
parent01c8701b68986ccfa83e902515716838d6829311 (diff)
Update of all changes
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/thirdparty')
-rw-r--r--src/main/java/darkknight/jewelrycraft/thirdparty/Alpaca.java28
-rwxr-xr-x[-rw-r--r--]src/main/java/darkknight/jewelrycraft/thirdparty/EE3.java89
-rwxr-xr-x[-rw-r--r--]src/main/java/darkknight/jewelrycraft/thirdparty/IRegistryListener.java9
-rwxr-xr-x[-rw-r--r--]src/main/java/darkknight/jewelrycraft/thirdparty/IThirdParty.java26
-rwxr-xr-x[-rw-r--r--]src/main/java/darkknight/jewelrycraft/thirdparty/ModIds.java48
-rwxr-xr-x[-rw-r--r--]src/main/java/darkknight/jewelrycraft/thirdparty/NEI.java22
-rwxr-xr-x[-rw-r--r--]src/main/java/darkknight/jewelrycraft/thirdparty/ThirdPartyManager.java289
-rw-r--r--src/main/java/darkknight/jewelrycraft/thirdparty/WailaHandler.java59
8 files changed, 280 insertions, 290 deletions
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
index af764ff..e9bb21f 100644..100755
--- 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
index 703a226..850fc35 100644..100755
--- 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
index 8aaba72..fe555ca 100644..100755
--- 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
index b4a64c9..7bda520 100644..100755
--- 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
index 2371137..feb6e6f 100644..100755
--- 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
index c45bd12..612d23d 100644..100755
--- 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<IThirdParty> thirdPartyMods = new ArrayList<IThirdParty>();
-
- public static ThirdPartyManager instance(){
- return INSTANCE;
- }
-
- public void index(){
- Map<String, Class<? extends IThirdParty>> thirdPartyClasses = new HashMap<String, Class<? extends IThirdParty>>();
- thirdPartyClasses.put(ModIds.EE3, EE3.class);
- thirdPartyClasses.put(ModIds.NEI, NEI.class);
- thirdPartyClasses.put(ModIds.ALPACA, Alpaca.class);
-
- List<String> enabledThirdParty = new ArrayList<String>();
- 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<String, Class<? extends IThirdParty>> 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<IThirdParty> thirdPartyMods =
+ new ArrayList<>();
+
+ public static ThirdPartyManager instance() {
+ return INSTANCE;
+ }
+
+ public void index() {
+ Map<String, Class<? extends IThirdParty>> thirdPartyClasses =
+ new HashMap<>();
+
+ thirdPartyClasses.put(ModIds.EE3, EE3.class);
+ thirdPartyClasses.put(ModIds.NEI, NEI.class);
+
+ List<String> 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<String,
+ Class<? extends IThirdParty>> 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<String> getWailaHead(ItemStack itemStack, List<String> 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<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
- return currenttip;
- }
-
- @Override
- public List<String> getWailaTail(ItemStack itemStack, List<String> 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;
- }
-
-}