parent
012223e34c
commit
c3d6965cd0
23 changed files with 66 additions and 77 deletions
|
@ -84,27 +84,27 @@ public class BasicRenderingHandler implements ISimpleBlockRenderingHandler
|
||||||
Tessellator tessellator = Tessellator.instance;
|
Tessellator tessellator = Tessellator.instance;
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(0.0F, -1.0F, 0.0F);
|
tessellator.setNormal(0.0F, -1.0F, 0.0F);
|
||||||
renderer.renderBottomFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, metadata));
|
renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
||||||
renderer.renderTopFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, metadata));
|
renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(0.0F, 0.0F, -1.0F);
|
tessellator.setNormal(0.0F, 0.0F, -1.0F);
|
||||||
renderer.renderEastFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, metadata));
|
renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
||||||
renderer.renderWestFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, metadata));
|
renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(-1.0F, 0.0F, 0.0F);
|
tessellator.setNormal(-1.0F, 0.0F, 0.0F);
|
||||||
renderer.renderNorthFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, metadata));
|
renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
||||||
renderer.renderSouthFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, metadata));
|
renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,27 +127,27 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
|
||||||
Tessellator tessellator = Tessellator.instance;
|
Tessellator tessellator = Tessellator.instance;
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(0.0F, -1.0F, 0.0F);
|
tessellator.setNormal(0.0F, -1.0F, 0.0F);
|
||||||
renderer.renderBottomFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, metadata));
|
renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
||||||
renderer.renderTopFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, metadata));
|
renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(0.0F, 0.0F, -1.0F);
|
tessellator.setNormal(0.0F, 0.0F, -1.0F);
|
||||||
renderer.renderEastFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, metadata));
|
renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
||||||
renderer.renderWestFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, metadata));
|
renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(-1.0F, 0.0F, 0.0F);
|
tessellator.setNormal(-1.0F, 0.0F, 0.0F);
|
||||||
renderer.renderNorthFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, metadata));
|
renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
||||||
renderer.renderSouthFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, metadata));
|
renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,9 +52,6 @@ public class ItemRenderingHandler implements IItemRenderer
|
||||||
}
|
}
|
||||||
else if(item.getItemDamage() == MachineType.ELECTRIC_CHEST.meta)
|
else if(item.getItemDamage() == MachineType.ELECTRIC_CHEST.meta)
|
||||||
{
|
{
|
||||||
int performanceToFps = EntityRenderer.performanceToFps(Minecraft.getMinecraft().gameSettings.limitFramerate);
|
|
||||||
float partialTick = System.nanoTime() + (long)(1000000000 / performanceToFps);
|
|
||||||
|
|
||||||
IElectricChest chest = (IElectricChest)item.getItem();
|
IElectricChest chest = (IElectricChest)item.getItem();
|
||||||
ModelChest electricChest = new ModelChest();
|
ModelChest electricChest = new ModelChest();
|
||||||
|
|
||||||
|
@ -102,27 +99,27 @@ public class ItemRenderingHandler implements IItemRenderer
|
||||||
Tessellator tessellator = Tessellator.instance;
|
Tessellator tessellator = Tessellator.instance;
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(0.0F, -1.0F, 0.0F);
|
tessellator.setNormal(0.0F, -1.0F, 0.0F);
|
||||||
renderer.renderBottomFace(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 0, metadata));
|
renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
||||||
renderer.renderTopFace(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 1, metadata));
|
renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(0.0F, 0.0F, -1.0F);
|
tessellator.setNormal(0.0F, 0.0F, -1.0F);
|
||||||
renderer.renderEastFace(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 2, metadata));
|
renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
||||||
renderer.renderWestFace(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 5, metadata));
|
renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(-1.0F, 0.0F, 0.0F);
|
tessellator.setNormal(-1.0F, 0.0F, 0.0F);
|
||||||
renderer.renderNorthFace(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 4, metadata));
|
renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
||||||
renderer.renderSouthFace(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 3, metadata));
|
renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class ObjectRenderer
|
||||||
tessellator.setColorOpaque_F(f * f5, f * f5, f * f5);
|
tessellator.setColorOpaque_F(f * f5, f * f5, f * f5);
|
||||||
}
|
}
|
||||||
|
|
||||||
renderBlocks.renderBottomFace(null, 0, 0, 0, object.getBlockTextureFromSide(0));
|
renderBlocks.renderFaceYNeg(null, 0, 0, 0, object.getBlockTextureFromSide(0));
|
||||||
|
|
||||||
if(doLight)
|
if(doLight)
|
||||||
{
|
{
|
||||||
|
@ -96,7 +96,7 @@ public class ObjectRenderer
|
||||||
tessellator.setColorOpaque_F(f1 * f5, f1 * f5, f1 * f5);
|
tessellator.setColorOpaque_F(f1 * f5, f1 * f5, f1 * f5);
|
||||||
}
|
}
|
||||||
|
|
||||||
renderBlocks.renderTopFace(null, 0, 0, 0, object.getBlockTextureFromSide(1));
|
renderBlocks.renderFaceYPos(null, 0, 0, 0, object.getBlockTextureFromSide(1));
|
||||||
|
|
||||||
if(doLight)
|
if(doLight)
|
||||||
{
|
{
|
||||||
|
@ -110,7 +110,7 @@ public class ObjectRenderer
|
||||||
tessellator.setColorOpaque_F(f2 * f5, f2 * f5, f2 * f5);
|
tessellator.setColorOpaque_F(f2 * f5, f2 * f5, f2 * f5);
|
||||||
}
|
}
|
||||||
|
|
||||||
renderBlocks.renderEastFace(null, 0, 0, 0, object.getBlockTextureFromSide(2));
|
renderBlocks.renderFaceZNeg(null, 0, 0, 0, object.getBlockTextureFromSide(2));
|
||||||
|
|
||||||
if(doLight)
|
if(doLight)
|
||||||
{
|
{
|
||||||
|
@ -124,7 +124,7 @@ public class ObjectRenderer
|
||||||
tessellator.setColorOpaque_F(f2 * f5, f2 * f5, f2 * f5);
|
tessellator.setColorOpaque_F(f2 * f5, f2 * f5, f2 * f5);
|
||||||
}
|
}
|
||||||
|
|
||||||
renderBlocks.renderWestFace(null, 0, 0, 0, object.getBlockTextureFromSide(3));
|
renderBlocks.renderFaceZPos(null, 0, 0, 0, object.getBlockTextureFromSide(3));
|
||||||
|
|
||||||
if(doLight)
|
if(doLight)
|
||||||
{
|
{
|
||||||
|
@ -138,7 +138,7 @@ public class ObjectRenderer
|
||||||
tessellator.setColorOpaque_F(f3 * f5, f3 * f5, f3 * f5);
|
tessellator.setColorOpaque_F(f3 * f5, f3 * f5, f3 * f5);
|
||||||
}
|
}
|
||||||
|
|
||||||
renderBlocks.renderNorthFace(null, 0, 0, 0, object.getBlockTextureFromSide(4));
|
renderBlocks.renderFaceXNeg(null, 0, 0, 0, object.getBlockTextureFromSide(4));
|
||||||
|
|
||||||
if(doLight)
|
if(doLight)
|
||||||
{
|
{
|
||||||
|
@ -152,7 +152,7 @@ public class ObjectRenderer
|
||||||
tessellator.setColorOpaque_F(f3 * f5, f3 * f5, f3 * f5);
|
tessellator.setColorOpaque_F(f3 * f5, f3 * f5, f3 * f5);
|
||||||
}
|
}
|
||||||
|
|
||||||
renderBlocks.renderSouthFace(null, 0, 0, 0, object.getBlockTextureFromSide(5));
|
renderBlocks.renderFaceXPos(null, 0, 0, 0, object.getBlockTextureFromSide(5));
|
||||||
|
|
||||||
if(doTessellating)
|
if(doTessellating)
|
||||||
{
|
{
|
||||||
|
|
|
@ -132,6 +132,11 @@ public class SoundHandler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a sound object from a specific TileEntity, null if there is none.
|
||||||
|
* @param tileEntity - the holder of the sound
|
||||||
|
* @return Sound instance
|
||||||
|
*/
|
||||||
public Sound getFrom(TileEntity tileEntity)
|
public Sound getFrom(TileEntity tileEntity)
|
||||||
{
|
{
|
||||||
synchronized(sounds)
|
synchronized(sounds)
|
||||||
|
|
|
@ -90,7 +90,10 @@ public class Mekanism
|
||||||
/** Map of infuse objects */
|
/** Map of infuse objects */
|
||||||
public static Map<ItemStack, InfuseObject> infusions = new HashMap<ItemStack, InfuseObject>();
|
public static Map<ItemStack, InfuseObject> infusions = new HashMap<ItemStack, InfuseObject>();
|
||||||
|
|
||||||
|
/** A map containing references to all dynamic tank inventory caches. */
|
||||||
public static Map<Integer, DynamicTankCache> dynamicInventories = new HashMap<Integer, DynamicTankCache>();
|
public static Map<Integer, DynamicTankCache> dynamicInventories = new HashMap<Integer, DynamicTankCache>();
|
||||||
|
|
||||||
|
/** A map containing references to all locations corresponding to a specific inventory ID. */
|
||||||
public static Map<Integer, HashSet<Object3D>> inventoryLocations = new HashMap<Integer, HashSet<Object3D>>();
|
public static Map<Integer, HashSet<Object3D>> inventoryLocations = new HashMap<Integer, HashSet<Object3D>>();
|
||||||
|
|
||||||
/** Mekanism creative tab */
|
/** Mekanism creative tab */
|
||||||
|
|
|
@ -314,7 +314,7 @@ public abstract class TileEntityAdvancedElectricMachine extends TileEntityBasicM
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean func_102008_b(int slotID, ItemStack itemstack, int side)
|
public boolean canExtractItem(int slotID, ItemStack itemstack, int side)
|
||||||
{
|
{
|
||||||
if(slotID == 3)
|
if(slotID == 3)
|
||||||
{
|
{
|
||||||
|
|
|
@ -313,7 +313,7 @@ public abstract class TileEntityBasicMachine extends TileEntityElectricBlock imp
|
||||||
public void detach(IComputerAccess computer) {}
|
public void detach(IComputerAccess computer) {}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getSizeInventorySide(int side)
|
public int[] getAccessibleSlotsFromSide(int side)
|
||||||
{
|
{
|
||||||
return sideOutputs.get(sideConfig[MekanismUtils.getBaseOrientation(side, facing)]).availableSlots;
|
return sideOutputs.get(sideConfig[MekanismUtils.getBaseOrientation(side, facing)]).availableSlots;
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,19 +181,19 @@ public abstract class TileEntityContainerBlock extends TileEntityBasicBlock impl
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean func_102007_a(int slotID, ItemStack itemstack, int side)
|
public boolean canInsertItem(int slotID, ItemStack itemstack, int side)
|
||||||
{
|
{
|
||||||
return isStackValidForSlot(slotID, itemstack);
|
return isStackValidForSlot(slotID, itemstack);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getSizeInventorySide(int side)
|
public int[] getAccessibleSlotsFromSide(int side)
|
||||||
{
|
{
|
||||||
return new int[0];
|
return new int[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean func_102008_b(int slotID, ItemStack itemstack, int side)
|
public boolean canExtractItem(int slotID, ItemStack itemstack, int side)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,7 @@ public class TileEntityElectricChest extends TileEntityElectricBlock
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getSizeInventorySide(int side)
|
public int[] getAccessibleSlotsFromSide(int side)
|
||||||
{
|
{
|
||||||
if(side == 0)
|
if(side == 0)
|
||||||
{
|
{
|
||||||
|
@ -160,7 +160,7 @@ public class TileEntityElectricChest extends TileEntityElectricBlock
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean func_102008_b(int slotID, ItemStack itemstack, int side)
|
public boolean canExtractItem(int slotID, ItemStack itemstack, int side)
|
||||||
{
|
{
|
||||||
if(slotID == 54)
|
if(slotID == 54)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
package mekanism.common;
|
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraftforge.liquids.LiquidTank;
|
|
||||||
|
|
||||||
public class TileEntityElectricDisperser extends TileEntityElectricBlock
|
|
||||||
{
|
|
||||||
public LiquidTank liquidTank;
|
|
||||||
|
|
||||||
public TileEntityElectricDisperser()
|
|
||||||
{
|
|
||||||
super("Electric Disperser", 10000);
|
|
||||||
liquidTank = new LiquidTank(10000);
|
|
||||||
inventory = new ItemStack[3];
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -197,7 +197,7 @@ public abstract class TileEntityElectricMachine extends TileEntityBasicMachine
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean func_102008_b(int slotID, ItemStack itemstack, int side)
|
public boolean canExtractItem(int slotID, ItemStack itemstack, int side)
|
||||||
{
|
{
|
||||||
if(slotID == 1)
|
if(slotID == 1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -414,7 +414,7 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean func_102008_b(int slotID, ItemStack itemstack, int side)
|
public boolean canExtractItem(int slotID, ItemStack itemstack, int side)
|
||||||
{
|
{
|
||||||
if(slotID == 2)
|
if(slotID == 2)
|
||||||
{
|
{
|
||||||
|
@ -510,7 +510,7 @@ public class TileEntityElectricPump extends TileEntityElectricBlock implements I
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getSizeInventorySide(int side)
|
public int[] getAccessibleSlotsFromSide(int side)
|
||||||
{
|
{
|
||||||
if(side == 1)
|
if(side == 1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -259,13 +259,13 @@ public class TileEntityEnergyCube extends TileEntityElectricBlock implements IEn
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getSizeInventorySide(int side)
|
public int[] getAccessibleSlotsFromSide(int side)
|
||||||
{
|
{
|
||||||
return side == 1 ? new int[] {0} : new int[] {1};
|
return side == 1 ? new int[] {0} : new int[] {1};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean func_102008_b(int slotID, ItemStack itemstack, int side)
|
public boolean canExtractItem(int slotID, ItemStack itemstack, int side)
|
||||||
{
|
{
|
||||||
if(slotID == 1)
|
if(slotID == 1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -280,7 +280,7 @@ public class TileEntityFactory extends TileEntityElectricBlock implements IEnerg
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean func_102008_b(int slotID, ItemStack itemstack, int side)
|
public boolean canExtractItem(int slotID, ItemStack itemstack, int side)
|
||||||
{
|
{
|
||||||
if(slotID == 1)
|
if(slotID == 1)
|
||||||
{
|
{
|
||||||
|
@ -719,7 +719,7 @@ public class TileEntityFactory extends TileEntityElectricBlock implements IEnerg
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getSizeInventorySide(int side)
|
public int[] getAccessibleSlotsFromSide(int side)
|
||||||
{
|
{
|
||||||
return sideOutputs.get(sideConfig[MekanismUtils.getBaseOrientation(side, facing)]).availableSlots;
|
return sideOutputs.get(sideConfig[MekanismUtils.getBaseOrientation(side, facing)]).availableSlots;
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,7 +136,7 @@ public class TileEntityGasTank extends TileEntityContainerBlock implements IGasS
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean func_102008_b(int slotID, ItemStack itemstack, int side)
|
public boolean canExtractItem(int slotID, ItemStack itemstack, int side)
|
||||||
{
|
{
|
||||||
if(slotID == 1)
|
if(slotID == 1)
|
||||||
{
|
{
|
||||||
|
@ -166,7 +166,7 @@ public class TileEntityGasTank extends TileEntityContainerBlock implements IGasS
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getSizeInventorySide(int side)
|
public int[] getAccessibleSlotsFromSide(int side)
|
||||||
{
|
{
|
||||||
return side == 1 ? new int[] {0} : new int[] {1};
|
return side == 1 ? new int[] {0} : new int[] {1};
|
||||||
}
|
}
|
||||||
|
|
|
@ -212,7 +212,7 @@ public class TileEntityMetallurgicInfuser extends TileEntityElectricBlock implem
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean func_102008_b(int slotID, ItemStack itemstack, int side)
|
public boolean canExtractItem(int slotID, ItemStack itemstack, int side)
|
||||||
{
|
{
|
||||||
if(slotID == 4)
|
if(slotID == 4)
|
||||||
{
|
{
|
||||||
|
@ -523,7 +523,7 @@ public class TileEntityMetallurgicInfuser extends TileEntityElectricBlock implem
|
||||||
public void detach(IComputerAccess computer) {}
|
public void detach(IComputerAccess computer) {}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getSizeInventorySide(int side)
|
public int[] getAccessibleSlotsFromSide(int side)
|
||||||
{
|
{
|
||||||
return sideOutputs.get(sideConfig[MekanismUtils.getBaseOrientation(side, facing)]).availableSlots;
|
return sideOutputs.get(sideConfig[MekanismUtils.getBaseOrientation(side, facing)]).availableSlots;
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IEn
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getSizeInventorySide(int side)
|
public int[] getAccessibleSlotsFromSide(int side)
|
||||||
{
|
{
|
||||||
return new int[] {0};
|
return new int[] {0};
|
||||||
}
|
}
|
||||||
|
@ -365,7 +365,7 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements IEn
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean func_102008_b(int slotID, ItemStack itemstack, int side)
|
public boolean canExtractItem(int slotID, ItemStack itemstack, int side)
|
||||||
{
|
{
|
||||||
return (itemstack.getItem() instanceof IItemElectric && ((IItemElectric)itemstack.getItem()).getProvideRequest(itemstack).getWatts() == 0) ||
|
return (itemstack.getItem() instanceof IItemElectric && ((IItemElectric)itemstack.getItem()).getProvideRequest(itemstack).getWatts() == 0) ||
|
||||||
(itemstack.getItem() instanceof IElectricItem && (!(itemstack.getItem() instanceof IItemElectric) ||
|
(itemstack.getItem() instanceof IElectricItem && (!(itemstack.getItem() instanceof IItemElectric) ||
|
||||||
|
|
|
@ -151,27 +151,27 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
|
||||||
Tessellator tessellator = Tessellator.instance;
|
Tessellator tessellator = Tessellator.instance;
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(0.0F, -1.0F, 0.0F);
|
tessellator.setNormal(0.0F, -1.0F, 0.0F);
|
||||||
renderer.renderBottomFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, metadata));
|
renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
||||||
renderer.renderTopFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, metadata));
|
renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(0.0F, 0.0F, -1.0F);
|
tessellator.setNormal(0.0F, 0.0F, -1.0F);
|
||||||
renderer.renderEastFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, metadata));
|
renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
||||||
renderer.renderWestFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, metadata));
|
renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(-1.0F, 0.0F, 0.0F);
|
tessellator.setNormal(-1.0F, 0.0F, 0.0F);
|
||||||
renderer.renderNorthFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, metadata));
|
renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
||||||
renderer.renderSouthFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, metadata));
|
renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, metadata));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||||
}
|
}
|
||||||
|
|
|
@ -232,7 +232,7 @@ public class TileEntityElectrolyticSeparator extends TileEntityElectricBlock imp
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean func_102008_b(int slotID, ItemStack itemstack, int side)
|
public boolean canExtractItem(int slotID, ItemStack itemstack, int side)
|
||||||
{
|
{
|
||||||
if(slotID == 3)
|
if(slotID == 3)
|
||||||
{
|
{
|
||||||
|
@ -282,7 +282,7 @@ public class TileEntityElectrolyticSeparator extends TileEntityElectricBlock imp
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getSizeInventorySide(int side)
|
public int[] getAccessibleSlotsFromSide(int side)
|
||||||
{
|
{
|
||||||
if(ForgeDirection.getOrientation(side) == MekanismUtils.getLeft(facing))
|
if(ForgeDirection.getOrientation(side) == MekanismUtils.getLeft(facing))
|
||||||
{
|
{
|
||||||
|
|
|
@ -149,7 +149,7 @@ public class TileEntityHeatGenerator extends TileEntityGenerator implements ITan
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean func_102008_b(int slotID, ItemStack itemstack, int side)
|
public boolean canExtractItem(int slotID, ItemStack itemstack, int side)
|
||||||
{
|
{
|
||||||
if(slotID == 1)
|
if(slotID == 1)
|
||||||
{
|
{
|
||||||
|
@ -197,7 +197,7 @@ public class TileEntityHeatGenerator extends TileEntityGenerator implements ITan
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getSizeInventorySide(int side)
|
public int[] getAccessibleSlotsFromSide(int side)
|
||||||
{
|
{
|
||||||
return ForgeDirection.getOrientation(side) == MekanismUtils.getRight(facing) ? new int[] {1} : new int[] {0};
|
return ForgeDirection.getOrientation(side) == MekanismUtils.getRight(facing) ? new int[] {1} : new int[] {0};
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,7 @@ public class TileEntityHydrogenGenerator extends TileEntityGenerator implements
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean func_102008_b(int slotID, ItemStack itemstack, int side)
|
public boolean canExtractItem(int slotID, ItemStack itemstack, int side)
|
||||||
{
|
{
|
||||||
if(slotID == 1)
|
if(slotID == 1)
|
||||||
{
|
{
|
||||||
|
@ -114,7 +114,7 @@ public class TileEntityHydrogenGenerator extends TileEntityGenerator implements
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getSizeInventorySide(int side)
|
public int[] getAccessibleSlotsFromSide(int side)
|
||||||
{
|
{
|
||||||
return ForgeDirection.getOrientation(side) == MekanismUtils.getRight(facing) ? new int[] {1} : new int[] {0};
|
return ForgeDirection.getOrientation(side) == MekanismUtils.getRight(facing) ? new int[] {1} : new int[] {0};
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class TileEntitySolarGenerator extends TileEntityGenerator
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getSizeInventorySide(int side)
|
public int[] getAccessibleSlotsFromSide(int side)
|
||||||
{
|
{
|
||||||
return new int[] {0};
|
return new int[] {0};
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ public class TileEntitySolarGenerator extends TileEntityGenerator
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean func_102008_b(int slotID, ItemStack itemstack, int side)
|
public boolean canExtractItem(int slotID, ItemStack itemstack, int side)
|
||||||
{
|
{
|
||||||
if(slotID == 0)
|
if(slotID == 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue