UpdatedToNewForgeVersion

This commit is contained in:
DarkGuardsman 2013-09-23 12:09:59 -04:00
parent c590609db2
commit 91cb7c22a2
29 changed files with 61 additions and 331 deletions

View file

@ -1,192 +0,0 @@
package universalelectricity.prefab;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.common.Configuration;
import cpw.mods.fml.common.registry.GameRegistry;
/**
* This class is used to replace recipes that are already added in the existing recipe pool for
* crafting and smelting. All recipe functions take account of the Forge Ore Dictionary. It also
* includes some recipe helper functions to shorten some of your function calls.
*
* @author Calclavia
*
*/
public class RecipeHelper
{
public static List<IRecipe> getRecipesByOutput(ItemStack output)
{
List<IRecipe> list = new ArrayList<IRecipe>();
for (Object obj : CraftingManager.getInstance().getRecipeList())
{
if (obj instanceof IRecipe)
{
if (((IRecipe) obj).getRecipeOutput() == output)
{
list.add((IRecipe) obj);
}
}
}
return list;
}
/**
* Replaces a recipe with a new IRecipe.
*
* @return True if successful
*/
public static boolean replaceRecipe(IRecipe recipe, IRecipe newRecipe)
{
for (Object obj : CraftingManager.getInstance().getRecipeList())
{
if (obj instanceof IRecipe)
{
if (((IRecipe) obj).equals(recipe) || obj == recipe)
{
CraftingManager.getInstance().getRecipeList().remove(obj);
CraftingManager.getInstance().getRecipeList().add(newRecipe);
return true;
}
}
}
return false;
}
/**
* Replaces a recipe with the resulting ItemStack with a new IRecipe.
*
* @return True if successful
*/
public static boolean replaceRecipe(ItemStack recipe, IRecipe newRecipe)
{
if (removeRecipe(recipe))
{
CraftingManager.getInstance().getRecipeList().add(newRecipe);
return true;
}
return false;
}
/**
* Removes a recipe by its IRecipe class.
*
* @return True if successful
*/
public static boolean removeRecipe(IRecipe recipe)
{
for (Object obj : CraftingManager.getInstance().getRecipeList())
{
if (obj != null)
{
if (obj instanceof IRecipe)
{
if (((IRecipe) obj).equals(recipe) || obj == recipe)
{
CraftingManager.getInstance().getRecipeList().remove(obj);
return true;
}
}
}
}
return false;
}
/**
* Removes the first recipe found by its output.
*
* @return True if successful
*/
public static boolean removeRecipe(ItemStack stack)
{
for (Object obj : CraftingManager.getInstance().getRecipeList())
{
if (obj != null)
{
if (obj instanceof IRecipe)
{
if (((IRecipe) obj).getRecipeOutput() != null)
{
if (((IRecipe) obj).getRecipeOutput().isItemEqual(stack))
{
CraftingManager.getInstance().getRecipeList().remove(obj);
return true;
}
}
}
}
}
return false;
}
/**
* Removes all recipes found that has this output. You may use this with Forge Ore Dictionary to
* remove all recipes with the FoD ID.
*
* @return True if successful
*/
public static boolean removeRecipes(ItemStack... itemStacks)
{
boolean didRemove = false;
for (Iterator itr = CraftingManager.getInstance().getRecipeList().iterator(); itr.hasNext();)
{
Object obj = itr.next();
if (obj != null)
{
if (obj instanceof IRecipe)
{
if (((IRecipe) obj).getRecipeOutput() != null)
{
for (ItemStack itemStack : itemStacks)
{
if (((IRecipe) obj).getRecipeOutput().isItemEqual(itemStack))
{
itr.remove();
didRemove = true;
break;
}
}
}
}
}
}
return didRemove;
}
/**
* Use this function if you want to check if the recipe is allowed in the configuration file.
*/
public static void addRecipe(IRecipe recipe, String name, Configuration configuration, boolean defaultBoolean)
{
if (configuration != null)
{
configuration.load();
if (configuration.get("Crafting", "Allow " + name + " Crafting", defaultBoolean).getBoolean(defaultBoolean))
{
GameRegistry.addRecipe(recipe);
}
configuration.save();
}
}
public static void addRecipe(IRecipe recipe, Configuration config, boolean defaultBoolean)
{
addRecipe(recipe, recipe.getRecipeOutput().getItemName(), config, defaultBoolean);
}
}

View file

@ -5,11 +5,12 @@ import java.util.HashMap;
import java.util.List;
import java.util.Random;
import com.builtbroken.common.Pair;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import dark.core.prefab.helpers.AutoCraftingManager;
import dark.core.prefab.helpers.Pair;
/** Recipes for ore processor machines
*

View file

@ -19,7 +19,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import dark.core.common.DarkMain;
/** Based off Thaumcraft's Beam Renderer.
*
*
* @author Calclavia, Azanor */
@SideOnly(Side.CLIENT)
public class FXBeam extends EntityFX
@ -165,7 +165,7 @@ public class FXBeam extends EntityFX
}
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation(this.texture));
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(this.texture));
GL11.glTexParameterf(3553, 10242, 10497.0F);
GL11.glTexParameterf(3553, 10243, 10497.0F);
@ -230,6 +230,6 @@ public class FXBeam extends EntityFX
tessellator.startDrawingQuads();
this.prevSize = size;
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("/particles.png"));
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("/particles.png"));
}
}

View file

@ -50,7 +50,7 @@ public class GuiBatteryBox extends GuiContainer
@Override
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
{
this.mc.renderEngine.func_110577_a(batteryBoxTexture);
this.mc.renderEngine.bindTexture(batteryBoxTexture);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.containerWidth = (this.width - this.xSize) / 2;

View file

@ -62,7 +62,7 @@ public class GuiCoalGenerator extends GuiContainer
@Override
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
{
this.mc.renderEngine.func_110577_a(coalGeneratorTexture);
this.mc.renderEngine.bindTexture(coalGeneratorTexture);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
containerWidth = (this.width - this.xSize) / 2;

View file

@ -59,7 +59,7 @@ public class GuiElectricFurnace extends GuiContainer
@Override
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
{
this.mc.renderEngine.func_110577_a(electricFurnaceTexture);
this.mc.renderEngine.bindTexture(electricFurnaceTexture);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
containerWidth = (this.width - this.xSize) / 2;

View file

@ -49,7 +49,7 @@ public class BlockRenderInfo
}
if (par1Icon == null)
{
icon = ((TextureMap) Minecraft.getMinecraft().func_110434_K().func_110581_b(TextureMap.field_110575_b)).func_110572_b("missingno");
icon = ((TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture(TextureMap.locationBlocksTexture)).getAtlasSprite("missingno");
}
return icon;
}

View file

@ -30,7 +30,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
GL11.glPushMatrix();
if (CoreRecipeLoader.blockSolar != null && block.blockID == CoreRecipeLoader.blockSolar.blockID)
{
FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation(DarkMain.getInstance().DOMAIN, ModPrefab.MODEL_DIRECTORY + "solarPanel.png"));
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(DarkMain.getInstance().DOMAIN, ModPrefab.MODEL_DIRECTORY + "solarPanel.png"));
GL11.glTranslatef(0.0F, 1.5F, 0.0F);
GL11.glRotatef(180f, 0f, 0f, 1f);
solarPanelModel.render(0.0625F);

View file

@ -18,11 +18,6 @@ public class RenderBlockEntity extends Render
public static RenderBlockEntity INSTANCE = new RenderBlockEntity();
@Override
protected ResourceLocation func_110775_a(Entity entity)
{
throw new UnsupportedOperationException("Not supported yet.");
}
private RenderBlockEntity()
{
@ -43,7 +38,7 @@ public class RenderBlockEntity extends Render
World world = entity.worldObj;
BlockRenderInfo util = new BlockRenderInfo();
util.texture = entity.texture;
func_110776_a(TextureMap.field_110575_b);
this.bindTexture(TextureMap.locationBlocksTexture);
for (int iBase = 0; iBase < entity.iSize; ++iBase)
{
@ -191,4 +186,10 @@ public class RenderBlockEntity extends Render
tessellator.draw();
}
}
@Override
protected ResourceLocation getEntityTexture(Entity entity)
{
throw new UnsupportedOperationException("Not supported yet.");
}
}

View file

@ -18,7 +18,7 @@ import org.lwjgl.opengl.GL11;
public class RenderBlockFluid
{
private static final ResourceLocation BLOCK_TEXTURE = TextureMap.field_110575_b;
private static final ResourceLocation BLOCK_TEXTURE = TextureMap.locationBlocksTexture;
private static Map<Fluid, int[]> flowingRenderCache = new HashMap<Fluid, int[]>();
private static Map<Fluid, int[]> stillRenderCache = new HashMap<Fluid, int[]>();
@ -41,7 +41,7 @@ public class RenderBlockFluid
Icon icon = flowing ? fluid.getFlowingIcon() : fluid.getStillIcon();
if (icon == null)
{
icon = ((TextureMap) Minecraft.getMinecraft().func_110434_K().func_110581_b(TextureMap.field_110575_b)).func_110572_b("missingno");
icon = ((TextureMap) Minecraft.getMinecraft().getTextureManager().getTexture(TextureMap.locationBlocksTexture)).getAtlasSprite("missingno");
}
return icon;
}

View file

@ -15,16 +15,16 @@ public abstract class RenderTileMachine extends TileEntitySpecialRenderer
}
/** Sudo method for setting the texture for current render
*
*
* @param name */
public void bindTextureByName(String domain, String name)
{
func_110628_a(new ResourceLocation(domain, name));
this.bindTexture(new ResourceLocation(domain, name));
}
public void bindTextureByName(ResourceLocation name)
{
func_110628_a(name);
this.bindTexture(name);
}
/** Gets the texture based on block and metadata mainly used by item/block inv render */

View file

@ -1,13 +1,14 @@
package dark.core.common;
import com.builtbroken.common.Pair;
import com.builtbroken.common.Triple;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;
import cpw.mods.fml.common.registry.GameRegistry;
import dark.core.prefab.helpers.Pair;
import dark.core.prefab.helpers.Triple;
public abstract class RecipeLoader
{

View file

@ -3,6 +3,8 @@ package dark.core.common.blocks;
import java.util.List;
import java.util.Set;
import com.builtbroken.common.Pair;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
@ -21,7 +23,6 @@ import dark.core.common.DarkMain;
import dark.core.common.items.EnumMaterial;
import dark.core.prefab.IExtraInfo.IExtraBlockInfo;
import dark.core.prefab.ModPrefab;
import dark.core.prefab.helpers.Pair;
public class BlockOre extends Block implements IExtraBlockInfo
{

View file

@ -3,6 +3,8 @@ package dark.core.common.debug;
import java.util.List;
import java.util.Set;
import com.builtbroken.common.Pair;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
@ -15,7 +17,6 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.core.common.DMCreativeTab;
import dark.core.common.DarkMain;
import dark.core.prefab.helpers.Pair;
import dark.core.prefab.machine.BlockMachine;
import dark.core.registration.ModObjectRegistry.BlockBuildData;

View file

@ -106,7 +106,7 @@ public class ItemTools extends ItemBasic
output = output.substring(0, 100);
}
output.trim();
player.sendChatToPlayer(ChatMessageComponent.func_111066_d("ReadOut> " + output));
player.sendChatToPlayer(ChatMessageComponent.createFromText("ReadOut> " + output));
return true;
}
}
@ -117,10 +117,10 @@ public class ItemTools extends ItemBasic
FluidTankInfo[] tanks = ((IFluidHandler) tileEntity).getTankInfo(ForgeDirection.getOrientation(side));
if (tanks != null)
{
player.sendChatToPlayer(ChatMessageComponent.func_111066_d("FluidHandler> Side:" + ForgeDirection.getOrientation(side).toString() + " Tanks:" + tanks.length));
player.sendChatToPlayer(ChatMessageComponent.createFromText("FluidHandler> Side:" + ForgeDirection.getOrientation(side).toString() + " Tanks:" + tanks.length));
for (FluidStack stack : FluidHelper.getFluidList(tanks))
{
player.sendChatToPlayer(ChatMessageComponent.func_111066_d("Fluid>" + stack.amount + "mb of " + stack.getFluid().getName()));
player.sendChatToPlayer(ChatMessageComponent.createFromText("Fluid>" + stack.amount + "mb of " + stack.getFluid().getName()));
}
return true;
}
@ -130,45 +130,45 @@ public class ItemTools extends ItemBasic
if (tool == EnumTools.MULTI_METER)
{
//TODO filter all units threw UE unit helper to created nicer looking output text
player.sendChatToPlayer(ChatMessageComponent.func_111066_d("Side>" + ForgeDirection.getOrientation(side).toString()));
player.sendChatToPlayer(ChatMessageComponent.createFromText("Side>" + ForgeDirection.getOrientation(side).toString()));
boolean out = false;
// Output electrical info
if (tileEntity instanceof IElectrical)
{
player.sendChatToPlayer(ChatMessageComponent.func_111066_d(" Voltage> " + ElectricityDisplay.getDisplay(((IElectrical) tileEntity).getVoltage(), ElectricUnit.VOLTAGE, 2, true)));
player.sendChatToPlayer(ChatMessageComponent.createFromText(" Voltage> " + ElectricityDisplay.getDisplay(((IElectrical) tileEntity).getVoltage(), ElectricUnit.VOLTAGE, 2, true)));
if (((IElectrical) tileEntity).getRequest(ForgeDirection.getOrientation(side).getOpposite()) > 0)
{
player.sendChatToPlayer(ChatMessageComponent.func_111066_d(" RequiredWatts> " + ElectricityDisplay.getDisplay(((IElectrical) tileEntity).getRequest(ForgeDirection.getOrientation(side).getOpposite()), ElectricUnit.WATT, 2, true)));
player.sendChatToPlayer(ChatMessageComponent.createFromText(" RequiredWatts> " + ElectricityDisplay.getDisplay(((IElectrical) tileEntity).getRequest(ForgeDirection.getOrientation(side).getOpposite()), ElectricUnit.WATT, 2, true)));
}
if (((IElectrical) tileEntity).getProvide(ForgeDirection.getOrientation(side).getOpposite()) > 0)
{
player.sendChatToPlayer(ChatMessageComponent.func_111066_d(" AvailableWatts> " + ElectricityDisplay.getDisplay(((IElectrical) tileEntity).getProvide(ForgeDirection.getOrientation(side).getOpposite()), ElectricUnit.WATT, 2, true)));
player.sendChatToPlayer(ChatMessageComponent.createFromText(" AvailableWatts> " + ElectricityDisplay.getDisplay(((IElectrical) tileEntity).getProvide(ForgeDirection.getOrientation(side).getOpposite()), ElectricUnit.WATT, 2, true)));
}
out = true;
}
//Output battery info
if (tileEntity instanceof IElectricalStorage)
{
player.sendChatToPlayer(ChatMessageComponent.func_111066_d(" EnergyStored> " + ElectricityDisplay.getDisplay(((IElectricalStorage) tileEntity).getEnergyStored(), ElectricUnit.WATT, 2, true) + " out of " + ElectricityDisplay.getDisplay(((IElectricalStorage) tileEntity).getMaxEnergyStored(), ElectricUnit.WATT, 2, true) + " Max"));
player.sendChatToPlayer(ChatMessageComponent.createFromText(" EnergyStored> " + ElectricityDisplay.getDisplay(((IElectricalStorage) tileEntity).getEnergyStored(), ElectricUnit.WATT, 2, true) + " out of " + ElectricityDisplay.getDisplay(((IElectricalStorage) tileEntity).getMaxEnergyStored(), ElectricUnit.WATT, 2, true) + " Max"));
out = true;
}
//Output wire info
if (tileEntity instanceof IConductor)
{
out = true;
player.sendChatToPlayer(ChatMessageComponent.func_111066_d(" Resistance> " + ElectricityDisplay.getDisplay(((IConductor) tileEntity).getResistance(), ElectricUnit.RESISTANCE, 2, true) + " | " + "AmpMax> " + ElectricityDisplay.getDisplay(((IConductor) tileEntity).getCurrentCapacity(), ElectricUnit.AMPERE, 2, true)));
player.sendChatToPlayer(ChatMessageComponent.createFromText(" Resistance> " + ElectricityDisplay.getDisplay(((IConductor) tileEntity).getResistance(), ElectricUnit.RESISTANCE, 2, true) + " | " + "AmpMax> " + ElectricityDisplay.getDisplay(((IConductor) tileEntity).getCurrentCapacity(), ElectricUnit.AMPERE, 2, true)));
if (((IConductor) tileEntity).getNetwork() != null)
{
player.sendChatToPlayer(ChatMessageComponent.func_111066_d(" Network>" + ((IConductor) tileEntity).getNetwork().toString()));
player.sendChatToPlayer(ChatMessageComponent.createFromText(" Network>" + ((IConductor) tileEntity).getNetwork().toString()));
player.sendChatToPlayer(ChatMessageComponent.func_111066_d(String.format(" Network>WattRequired> " + (((IConductor) tileEntity).getNetwork().getRequest() != null ? ElectricityDisplay.getDisplay(((IConductor) tileEntity).getNetwork().getRequest().getWatts(), ElectricUnit.WATT, 2, true) : "Error") + " | " + "TotalResistance> " + ElectricityDisplay.getDisplay(((IConductor) tileEntity).getNetwork().getTotalResistance(), ElectricUnit.RESISTANCE, 2, true))));
player.sendChatToPlayer(ChatMessageComponent.createFromText(String.format(" Network>WattRequired> " + (((IConductor) tileEntity).getNetwork().getRequest() != null ? ElectricityDisplay.getDisplay(((IConductor) tileEntity).getNetwork().getRequest().getWatts(), ElectricUnit.WATT, 2, true) : "Error") + " | " + "TotalResistance> " + ElectricityDisplay.getDisplay(((IConductor) tileEntity).getNetwork().getTotalResistance(), ElectricUnit.RESISTANCE, 2, true))));
}
}
//If no ouput was created suggest that the block is not valid for connection
if (!out)
{
player.sendChatToPlayer(ChatMessageComponent.func_111066_d(" Error failed to connect to block"));
player.sendChatToPlayer(ChatMessageComponent.createFromText(" Error failed to connect to block"));
}
}

View file

@ -22,7 +22,7 @@ public class ItemWrench extends ItemBasic implements IToolWrench
this.setMaxStackSize(1);
this.setMaxDamage(500 + config.get("general", "AddedWrenchUses", 500).getInt());
this.setCreativeTab(CreativeTabs.tabTools);
this.func_111206_d(DarkMain.getInstance().PREFIX + "wrench");
this.setTextureName(DarkMain.getInstance().PREFIX + "wrench");
}
@Override

View file

@ -4,6 +4,8 @@ import java.util.List;
import java.util.Random;
import java.util.Set;
import com.builtbroken.common.Pair;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
@ -16,7 +18,6 @@ import universalelectricity.core.UniversalElectricity;
import dark.core.common.CommonProxy;
import dark.core.common.DMCreativeTab;
import dark.core.common.DarkMain;
import dark.core.prefab.helpers.Pair;
import dark.core.prefab.machine.BlockMachine;
import dark.core.registration.ModObjectRegistry.BlockBuildData;

View file

@ -2,6 +2,8 @@ package dark.core.common.machines;
import java.util.Set;
import com.builtbroken.common.Pair;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
@ -10,7 +12,6 @@ import net.minecraftforge.oredict.OreDictionary;
import universalelectricity.core.UniversalElectricity;
import dark.core.client.renders.BlockRenderingHandler;
import dark.core.common.DMCreativeTab;
import dark.core.prefab.helpers.Pair;
import dark.core.prefab.machine.BlockMachine;
import dark.core.registration.ModObjectRegistry.BlockBuildData;

View file

@ -3,6 +3,8 @@ package dark.core.common.transmit;
import java.util.List;
import java.util.Set;
import com.builtbroken.common.Pair;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
@ -17,7 +19,6 @@ import universalelectricity.core.vector.Vector3;
import universalelectricity.prefab.tile.TileEntityConductor;
import dark.core.common.DMCreativeTab;
import dark.core.common.DarkMain;
import dark.core.prefab.helpers.Pair;
import dark.core.prefab.machine.BlockMachine;
import dark.core.registration.ModObjectRegistry.BlockBuildData;

View file

@ -2,10 +2,11 @@ package dark.core.prefab;
import java.util.Set;
import com.builtbroken.common.Pair;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.Configuration;
import dark.core.prefab.helpers.Pair;
/** Used to handle info about the block that would normally be handled by the mod main class. Use the
* BlockRegistry in order for these methods to be called on load of the mod.

View file

@ -3,6 +3,8 @@ package dark.core.prefab.helpers;
import java.util.ArrayList;
import java.util.List;
import com.builtbroken.common.Pair;
import net.minecraft.block.Block;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;

View file

@ -24,6 +24,7 @@ import net.minecraftforge.fluids.IFluidBlock;
import net.minecraftforge.fluids.IFluidHandler;
import universalelectricity.core.vector.Vector3;
import com.builtbroken.common.Pair;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;

View file

@ -1,45 +0,0 @@
package dark.core.prefab.helpers;
public class Pair<L, R>
{
private final L left;
private final R right;
public Pair(L left, R right)
{
this.left = left;
this.right = right;
}
public L getKey()
{
return left;
}
public R getValue()
{
return right;
}
@Override
public int hashCode()
{
if (left == null || right == null)
{
super.hashCode();
}
return left.hashCode() ^ right.hashCode();
}
@Override
public boolean equals(Object o)
{
if (o == null)
return false;
if (!(o instanceof Pair))
return false;
Pair pairo = (Pair) o;
return this.left.equals(pairo.getKey()) && this.right.equals(pairo.getValue());
}
}

View file

@ -1,48 +0,0 @@
package dark.core.prefab.helpers;
public class Triple<A, B, C>
{
private final A aaa;
private final B bbb;
private final C ccc;
public Triple(A left, B right, C ccc)
{
this.aaa = left;
this.bbb = right;
this.ccc = ccc;
}
public A getA()
{
return aaa;
}
public B getB()
{
return bbb;
}
public C getC()
{
return ccc;
}
@Override
public int hashCode()
{
return aaa.hashCode() ^ bbb.hashCode() ^ ccc.hashCode();
}
@Override
public boolean equals(Object o)
{
if (o == null)
return false;
if (!(o instanceof Triple))
return false;
Triple pairo = (Triple) o;
return this.aaa.equals(pairo.getA()) && this.bbb.equals(pairo.getB()) && this.ccc.equals(pairo.getC());
}
}

View file

@ -28,7 +28,7 @@ public class GuiButtonArrow extends GuiButton
{
if (this.drawButton)
{
par1Minecraft.func_110434_K().func_110577_a(gui_pic);
par1Minecraft.renderEngine.bindTexture(gui_pic);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
boolean var4 = width >= this.xPosition && hight >= this.yPosition && width < this.xPosition + this.width && hight < this.yPosition + this.height;
int var5 = 106;

View file

@ -133,7 +133,7 @@ public class GuiGlobalList extends GuiContainer implements IScroll
protected void drawGuiContainerBackgroundLayer(float f, int i, int j)
{
ResourceLocation name = new ResourceLocation(ModPrefab.GUI_DIRECTORY + ":gui_access_base.png");
this.mc.renderEngine.func_110577_a(name);
this.mc.renderEngine.bindTexture(name);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
int containerWidth = (this.width - this.width) / 2;

View file

@ -2,6 +2,8 @@ package dark.core.prefab.machine;
import java.util.Set;
import com.builtbroken.common.Pair;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.tileentity.TileEntity;
@ -17,7 +19,6 @@ import dark.api.parts.INetworkPart;
import dark.core.common.DarkMain;
import dark.core.prefab.IExtraInfo.IExtraBlockInfo;
import dark.core.prefab.ModPrefab;
import dark.core.prefab.helpers.Pair;
import dark.core.registration.ModObjectRegistry.BlockBuildData;
/** Basic TileEntity Container class designed to be used by generic machines. It is suggested that

View file

@ -3,6 +3,8 @@ package dark.core.prefab.machine;
import java.util.Random;
import java.util.Set;
import com.builtbroken.common.Pair;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.client.renderer.texture.IconRegister;
@ -19,7 +21,6 @@ import cpw.mods.fml.relauncher.SideOnly;
import dark.core.common.DarkMain;
import dark.core.prefab.IExtraInfo.IExtraBlockInfo;
import dark.core.prefab.ModPrefab;
import dark.core.prefab.helpers.Pair;
public class BlockMulti extends BlockContainer implements IExtraBlockInfo
{

View file

@ -9,6 +9,8 @@ import java.lang.reflect.Type;
import java.util.HashSet;
import java.util.Set;
import com.builtbroken.common.Pair;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
@ -23,7 +25,6 @@ import dark.core.common.DarkMain;
import dark.core.prefab.IExtraInfo;
import dark.core.prefab.IExtraInfo.IExtraBlockInfo;
import dark.core.prefab.ModPrefab;
import dark.core.prefab.helpers.Pair;
import dark.core.prefab.machine.BlockMachine;
/** Handler to make registering all parts of a mod's objects that are loaded into the game by forge