Update for MCP updates with MC1.4.7

This commit is contained in:
Christian 2012-12-28 15:29:35 -05:00
parent 1126b3c7d3
commit 424329f164
24 changed files with 114 additions and 114 deletions

View file

@ -382,11 +382,11 @@ public class BuildCraftTransport {
new BptBlockPipe(genericPipeBlock.blockID);
BuildCraftCore.itemBptProps[pipeItemsWood.shiftedIndex] = new BptItemPipeWooden();
BuildCraftCore.itemBptProps[pipeLiquidsWood.shiftedIndex] = new BptItemPipeWooden();
BuildCraftCore.itemBptProps[pipeItemsIron.shiftedIndex] = new BptItemPipeIron();
BuildCraftCore.itemBptProps[pipeLiquidsIron.shiftedIndex] = new BptItemPipeIron();
BuildCraftCore.itemBptProps[pipeItemsDiamond.shiftedIndex] = new BptItemPipeDiamond();
BuildCraftCore.itemBptProps[pipeItemsWood.itemID] = new BptItemPipeWooden();
BuildCraftCore.itemBptProps[pipeLiquidsWood.itemID] = new BptItemPipeWooden();
BuildCraftCore.itemBptProps[pipeItemsIron.itemID] = new BptItemPipeIron();
BuildCraftCore.itemBptProps[pipeLiquidsIron.itemID] = new BptItemPipeIron();
BuildCraftCore.itemBptProps[pipeItemsDiamond.itemID] = new BptItemPipeDiamond();
ActionManager.registerTriggerProvider(new PipeTriggerProvider());

View file

@ -12,7 +12,7 @@ public class BlueprintManager {
public static ItemSignature getItemSignature(Item item) {
ItemSignature sig = new ItemSignature();
if (item.shiftedIndex >= Block.blocksList.length + BuildCraftAPI.LAST_ORIGINAL_ITEM) {
if (item.itemID >= Block.blocksList.length + BuildCraftAPI.LAST_ORIGINAL_ITEM) {
sig.itemClassName = item.getClass().getSimpleName();
}

View file

@ -102,7 +102,7 @@ public class BptBlock {
if (stack.stackSize == 0 && stack.getItem().getContainerItem() != null) {
Item container = stack.getItem().getContainerItem();
stack.itemID = container.shiftedIndex;
stack.itemID = container.itemID;
stack.stackSize = 1;
stack.setItemDamage(0);
}

View file

@ -157,8 +157,8 @@ public class BlockMarker extends BlockContainer {
}
@Override
public int func_85104_a(World world, int x, int y, int z, int side, float par6, float par7, float par8, int meta) {
super.func_85104_a(world, x, y, z, side, par6, par7, par8, meta);
public int onBlockPlaced(World world, int x, int y, int z, int side, float par6, float par7, float par8, int meta) {
super.onBlockPlaced(world, x, y, z, side, par6, par7, par8, meta);
if (side == 1 && BuildersProxy.canPlaceTorch(world, x, y - 1, z)) {
meta = 5;

View file

@ -49,8 +49,8 @@ public class ContainerBlueprintLibrary extends BuildCraftContainer {
}
@Override
public void updateCraftingResults() {
super.updateCraftingResults();
public void detectAndSendChanges() {
super.detectAndSendChanges();
for (int i = 0; i < crafters.size(); i++) {
ICrafting icrafting = (ICrafting) crafters.get(i);
if (progressIn != library.progressIn) {

View file

@ -49,8 +49,8 @@ public class ContainerTemplate extends BuildCraftContainer {
*/
@Override
public void updateCraftingResults() {
super.updateCraftingResults();
public void detectAndSendChanges() {
super.detectAndSendChanges();
for (int i = 0; i < crafters.size(); i++) {
ICrafting icrafting = (ICrafting) crafters.get(i);
if (computingTime != template.computingTime) {

View file

@ -57,7 +57,7 @@ public class RenderingEntityBlocks implements ISimpleBlockRenderingHandler {
Tessellator tessellator = Tessellator.instance;
block.setBlockBounds(Utils.pipeMinPos, 0.0F, Utils.pipeMinPos, Utils.pipeMaxPos, 1.0F, Utils.pipeMaxPos);
renderer.updateCustomBlockBounds(block);
renderer.setRenderBoundsFromBlock(block);
block.setBlockBoundsForItemRender();
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
tessellator.startDrawingQuads();
@ -120,42 +120,42 @@ public class RenderingEntityBlocks implements ISimpleBlockRenderingHandler {
float maxSize = Utils.pipeMaxPos;
block.setBlockBounds(minSize, minSize, minSize, maxSize, maxSize, maxSize);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, i, j, k);
if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i - 1, j, k)) {
block.setBlockBounds(0.0F, minSize, minSize, minSize, maxSize, maxSize);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, i, j, k);
}
if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i + 1, j, k)) {
block.setBlockBounds(maxSize, minSize, minSize, 1.0F, maxSize, maxSize);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, i, j, k);
}
if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i, j - 1, k)) {
block.setBlockBounds(minSize, 0.0F, minSize, maxSize, minSize, maxSize);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, i, j, k);
}
if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i, j + 1, k)) {
block.setBlockBounds(minSize, maxSize, minSize, maxSize, 1.0F, maxSize);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, i, j, k);
}
if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i, j, k - 1)) {
block.setBlockBounds(minSize, minSize, 0.0F, maxSize, maxSize, minSize);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, i, j, k);
}
if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i, j, k + 1)) {
block.setBlockBounds(minSize, minSize, maxSize, maxSize, maxSize, 1.0F);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, i, j, k);
}

View file

@ -111,7 +111,7 @@ public class BlockEngine extends BlockContainer {
}
@Override
public void func_85105_g(World world, int x, int y, int z, int par5) {
public void onPostBlockPlaced(World world, int x, int y, int z, int par5) {
TileEngine tile = (TileEngine) world.getBlockTileEntity(x, y, z);
tile.orientation = ForgeDirection.UP.ordinal();
tile.switchOrientation();

View file

@ -45,8 +45,8 @@ public class ContainerEngine extends BuildCraftContainer {
}
@Override
public void updateCraftingResults() {
super.updateCraftingResults();
public void detectAndSendChanges() {
super.detectAndSendChanges();
for (int i = 0; i < crafters.size(); i++) {
engine.engine.sendGUINetworkData(this, (ICrafting) crafters.get(i));

View file

@ -50,19 +50,19 @@ public class ContainerAutoWorkbench extends BuildCraftContainer {
CoreProxy.proxy.onCraftingPickup(thePlayer.worldObj, thePlayer, itemstack);
if (itemstack.itemID == Block.workbench.blockID) {
thePlayer.addStat(AchievementList.buildWorkBench, 1);
} else if (itemstack.itemID == Item.pickaxeWood.shiftedIndex) {
} else if (itemstack.itemID == Item.pickaxeWood.itemID) {
thePlayer.addStat(AchievementList.buildPickaxe, 1);
} else if (itemstack.itemID == Block.stoneOvenIdle.blockID) {
thePlayer.addStat(AchievementList.buildFurnace, 1);
} else if (itemstack.itemID == Item.hoeWood.shiftedIndex) {
} else if (itemstack.itemID == Item.hoeWood.itemID) {
thePlayer.addStat(AchievementList.buildHoe, 1);
} else if (itemstack.itemID == Item.bread.shiftedIndex) {
} else if (itemstack.itemID == Item.bread.itemID) {
thePlayer.addStat(AchievementList.makeBread, 1);
} else if (itemstack.itemID == Item.cake.shiftedIndex) {
} else if (itemstack.itemID == Item.cake.itemID) {
thePlayer.addStat(AchievementList.bakeCake, 1);
} else if (itemstack.itemID == Item.pickaxeStone.shiftedIndex) {
} else if (itemstack.itemID == Item.pickaxeStone.itemID) {
thePlayer.addStat(AchievementList.buildBetterPickaxe, 1);
} else if (itemstack.itemID == Item.swordWood.shiftedIndex) {
} else if (itemstack.itemID == Item.swordWood.itemID) {
thePlayer.addStat(AchievementList.buildSword, 1);
} else if (itemstack.itemID == Block.enchantmentTable.blockID) {
thePlayer.addStat(AchievementList.enchantments, 1);
@ -106,8 +106,8 @@ public class ContainerAutoWorkbench extends BuildCraftContainer {
}
@Override
public void updateCraftingResults() {
super.updateCraftingResults();
public void detectAndSendChanges() {
super.detectAndSendChanges();
craftResult.setInventorySlotContents(0, tile.findRecipe());
}

View file

@ -80,8 +80,8 @@ public class ContainerRefinery extends BuildCraftContainer {
}
@Override
public void updateCraftingResults() {
super.updateCraftingResults();
public void detectAndSendChanges() {
super.detectAndSendChanges();
for (int i = 0; i < crafters.size(); i++) {
refinery.sendGUINetworkData(this, (ICrafting) crafters.get(i));
}

View file

@ -69,8 +69,8 @@ public class BlockLaser extends BlockContainer {
}
@Override
public int func_85104_a(World world, int x, int y, int z, int side, float par6, float par7, float par8, int meta) {
super.func_85104_a(world, x, y, z, side, par6, par7, par8, meta);
public int onBlockPlaced(World world, int x, int y, int z, int side, float par6, float par7, float par8, int meta) {
super.onBlockPlaced(world, x, y, z, side, par6, par7, par8, meta);
if (side <= 6) {
meta = side;

View file

@ -43,11 +43,11 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler {
renderblocks.uvRotateBottom = 2;
block.setBlockBounds(0.0F, 0.0F, 0.0F, 4F / 16F, 1, 1);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
block.setBlockBounds(4F / 16F, 5F / 16F, 5F / 16F, 13F / 16F, 11F / 16F, 11F / 16F);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
} else if (meta == ForgeDirection.WEST.ordinal()) {
renderblocks.uvRotateEast = 1;
@ -56,22 +56,22 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler {
renderblocks.uvRotateBottom = 1;
block.setBlockBounds(1F - 4F / 16F, 0.0F, 0.0F, 1, 1, 1);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
block.setBlockBounds(1F - 13F / 16F, 5F / 16F, 5F / 16F, 1F - 4F / 16F, 11F / 16F, 11F / 16F);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
} else if (meta == ForgeDirection.NORTH.ordinal()) {
renderblocks.uvRotateSouth = 1;
renderblocks.uvRotateNorth = 2;
block.setBlockBounds(0.0F, 0.0F, 1F - 4F / 16F, 1, 1, 1);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
block.setBlockBounds(5F / 16F, 5F / 16F, 1F - 13F / 16F, 11F / 16F, 11F / 16F, 1F - 4F / 16F);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
} else if (meta == ForgeDirection.SOUTH.ordinal()) {
renderblocks.uvRotateSouth = 2;
@ -80,11 +80,11 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler {
renderblocks.uvRotateBottom = 3;
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1, 1, 4F / 16F);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
block.setBlockBounds(5F / 16F, 5F / 16F, 4F / 16F, 11F / 16F, 11F / 16F, 13F / 16F);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
} else if (meta == ForgeDirection.DOWN.ordinal()) {
renderblocks.uvRotateEast = 3;
@ -93,19 +93,19 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler {
renderblocks.uvRotateNorth = 3;
block.setBlockBounds(0.0F, 1.0F - 4F / 16F, 0.0F, 1.0F, 1.0F, 1.0F);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
block.setBlockBounds(5F / 16F, 1F - 13F / 16F, 5F / 16F, 11F / 16F, 1F - 4F / 16F, 11F / 16F);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
} else if (meta == ForgeDirection.UP.ordinal()) {
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1, 4F / 16F, 1);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
block.setBlockBounds(5F / 16F, 4F / 16F, 5F / 16F, 11F / 16F, 13F / 16F, 11F / 16F);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
}
@ -127,11 +127,11 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler {
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1, 4F / 16F, 1);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderBlockInInv(renderblocks, block, 0);
block.setBlockBounds(5F / 16F, 4F / 16F, 5F / 16F, 11F / 16F, 13F / 16F, 11F / 16F);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderBlockInInv(renderblocks, block, 1);
GL11.glTranslatef(0.5F, 0.5F, 0.5F);

View file

@ -47,8 +47,8 @@ public class ContainerAssemblyAdvancedWorkbench extends BuildCraftContainer {
}
@Override
public void updateCraftingResults() {
super.updateCraftingResults();
public void detectAndSendChanges() {
super.detectAndSendChanges();
for (int i = 0; i < workbench.getCraftingSlots().getSizeInventory(); i++) {
Iterator var4 = this.crafters.iterator();

View file

@ -63,8 +63,8 @@ public class ContainerAssemblyTable extends BuildCraftContainer {
}
@Override
public void updateCraftingResults() {
super.updateCraftingResults();
public void detectAndSendChanges() {
super.detectAndSendChanges();
for (int i = 0; i < crafters.size(); i++) {
table.sendGUINetworkData(this, (ICrafting) crafters.get(i));

View file

@ -352,8 +352,8 @@ public class BlockGenericPipe extends BlockContainer {
}
@Override
public int func_85104_a(World world, int x, int y, int z, int side, float par6, float par7, float par8, int meta) {
super.func_85104_a(world, x, y, z, side, par6, par7, par8, meta);
public int onBlockPlaced(World world, int x, int y, int z, int side, float par6, float par7, float par8, int meta) {
super.onBlockPlaced(world, x, y, z, side, par6, par7, par8, meta);
Pipe pipe = getPipe(world, x, y, z);
if (isValid(pipe)) {
@ -384,7 +384,7 @@ public class BlockGenericPipe extends BlockContainer {
} else if (entityplayer.getCurrentEquippedItem() == null) {
// Fall through the end of the test
} else if (entityplayer.getCurrentEquippedItem().itemID == Item.sign.shiftedIndex)
} else if (entityplayer.getCurrentEquippedItem().itemID == Item.sign.itemID)
// Sign will be placed anyway, so lets show the sign gui
return false;
else if (entityplayer.getCurrentEquippedItem().getItem() instanceof ItemPipe)
@ -433,8 +433,8 @@ public class BlockGenericPipe extends BlockContainer {
pipe.container.scheduleNeighborChange();
return true;
}
} else if (entityplayer.getCurrentEquippedItem().itemID == BuildCraftTransport.pipeGate.shiftedIndex
|| entityplayer.getCurrentEquippedItem().itemID == BuildCraftTransport.pipeGateAutarchic.shiftedIndex)
} else if (entityplayer.getCurrentEquippedItem().itemID == BuildCraftTransport.pipeGate.itemID
|| entityplayer.getCurrentEquippedItem().itemID == BuildCraftTransport.pipeGateAutarchic.itemID)
if (!pipe.hasInterface()) {
pipe.gate = new GateVanilla(pipe, entityplayer.getCurrentEquippedItem());
@ -541,7 +541,7 @@ public class BlockGenericPipe extends BlockContainer {
}
@Override
public boolean canConnectRedstone(IBlockAccess world, int x, int y, int z, int side) {
public boolean canMakeRedstoneConnectionOnSide(IBlockAccess world, int x, int y, int z, int side) {
Pipe pipe = getPipe(world, x, y, z);
if (isValid(pipe))
@ -595,9 +595,9 @@ public class BlockGenericPipe extends BlockContainer {
public static ItemPipe registerPipe(int key, Class<? extends Pipe> clas) {
ItemPipe item = new ItemPipe(key);
pipes.put(item.shiftedIndex, clas);
pipes.put(item.itemID, clas);
Pipe dummyPipe = createPipe(item.shiftedIndex);
Pipe dummyPipe = createPipe(item.itemID);
if (dummyPipe != null) {
item.setTextureFile(dummyPipe.getTextureFile());
item.setTextureIndex(dummyPipe.getTextureIndexForItem());

View file

@ -101,7 +101,7 @@ public abstract class Gate {
public abstract String getGuiFile();
public static boolean isGateItem(ItemStack stack) {
return stack.itemID == BuildCraftTransport.pipeGate.shiftedIndex || stack.itemID == BuildCraftTransport.pipeGateAutarchic.shiftedIndex;
return stack.itemID == BuildCraftTransport.pipeGate.itemID || stack.itemID == BuildCraftTransport.pipeGateAutarchic.itemID;
}
}

View file

@ -31,7 +31,7 @@ public class GateVanilla extends Gate {
public GateVanilla(Pipe pipe, ItemStack stack) {
super(pipe, stack);
if (stack.itemID == BuildCraftTransport.pipeGateAutarchic.shiftedIndex) {
if (stack.itemID == BuildCraftTransport.pipeGateAutarchic.itemID) {
addEnergyPulser(pipe);
}
}

View file

@ -66,7 +66,7 @@ public class ItemPipe extends ItemBuildCraft implements IItemPipe {
return false;
if (entityplayer.canCurrentToolHarvestBlock(i, j, k) && world.canPlaceEntityOnSide(blockID, i, j, k, false, side, entityplayer)) {
Pipe pipe = BlockGenericPipe.createPipe(shiftedIndex);
Pipe pipe = BlockGenericPipe.createPipe(itemID);
if (BlockGenericPipe.placePipe(pipe, world, i, j, k, blockID, 0)) {
Block.blocksList[blockID].onBlockPlacedBy(world, i, j, k, entityplayer);

View file

@ -26,31 +26,31 @@ public class TransportProxyClient extends TransportProxy {
@Override
public void registerRenderers() {
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsWood.shiftedIndex, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsCobblestone.shiftedIndex, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsStone.shiftedIndex, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsIron.shiftedIndex, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsGold.shiftedIndex, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsDiamond.shiftedIndex, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsObsidian.shiftedIndex, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsWood.itemID, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsCobblestone.itemID, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsStone.itemID, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsIron.itemID, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsGold.itemID, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsDiamond.itemID, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsObsidian.itemID, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsWood.shiftedIndex, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsCobblestone.shiftedIndex, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsStone.shiftedIndex, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsIron.shiftedIndex, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsGold.shiftedIndex, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsWood.itemID, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsCobblestone.itemID, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsStone.itemID, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsIron.itemID, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsGold.itemID, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerWood.shiftedIndex, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerStone.shiftedIndex, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerGold.shiftedIndex, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeStructureCobblestone.shiftedIndex, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerWood.itemID, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerStone.itemID, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerGold.itemID, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeStructureCobblestone.itemID, pipeItemRenderer);
// MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsStipes.shiftedIndex, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsVoid.shiftedIndex, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsVoid.shiftedIndex, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsSandstone.shiftedIndex, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsSandstone.shiftedIndex, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsVoid.itemID, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsVoid.itemID, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsSandstone.itemID, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsSandstone.itemID, pipeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.facadeItem.shiftedIndex, facadeItemRenderer);
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.facadeItem.itemID, facadeItemRenderer);
TransportProxy.pipeModel = RenderingRegistry.getNextAvailableRenderId();
RenderingRegistry.registerBlockHandler(pipeWorldRenderer);

View file

@ -246,8 +246,8 @@ public class ContainerGateInterface extends BuildCraftContainer {
}
@Override
public void updateCraftingResults() {
super.updateCraftingResults();
public void detectAndSendChanges() {
super.detectAndSendChanges();
int state = calculateTriggerState();
if (state != lastTriggerState) {
for (int i = 0; i < this.crafters.size(); i++) {

View file

@ -31,7 +31,7 @@ public class FacadeItemRenderer implements IItemRenderer {
GL11.glPushMatrix();
ForgeHooksClient.bindTexture(block.getTextureFile(), 0);
block.setBlockBounds(0F, 0F, 1F - 1F / 16F, 1F, 1F, 1F);
render.updateCustomBlockBounds(block);
render.setRenderBoundsFromBlock(block);
GL11.glTranslatef(translateX, translateY, translateZ);
tessellator.startDrawingQuads();
@ -67,7 +67,7 @@ public class FacadeItemRenderer implements IItemRenderer {
int textureID = 7 * 16 + 13; // Structure pipe
block.setBlockBounds(Utils.pipeMinPos, Utils.pipeMinPos, Utils.pipeMinPos, Utils.pipeMaxPos, Utils.pipeMaxPos, Utils.pipeMaxPos - 1F / 16F);
block.setBlockBoundsForItemRender();
render.updateCustomBlockBounds(block);
render.setRenderBoundsFromBlock(block);
GL11.glTranslatef(translateX, translateY, translateZ + 0.25F);
tessellator.startDrawingQuads();

View file

@ -28,7 +28,7 @@ public class PipeItemRenderer implements IItemRenderer {
block.setBlockBounds(Utils.pipeMinPos, 0.0F, Utils.pipeMinPos, Utils.pipeMaxPos, 1.0F, Utils.pipeMaxPos);
block.setBlockBoundsForItemRender();
render.updateCustomBlockBounds(block);
render.setRenderBoundsFromBlock(block);
GL11.glTranslatef(translateX, translateY, translateZ);
tessellator.startDrawingQuads();

View file

@ -85,48 +85,48 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.UNKNOWN);
block.setBlockBounds(minSize, minSize, minSize, maxSize, maxSize, maxSize);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.WEST)) {
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.WEST);
block.setBlockBounds(0.0F, minSize, minSize, minSize, maxSize, maxSize);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
}
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.EAST)) {
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.EAST);
block.setBlockBounds(maxSize, minSize, minSize, 1.0F, maxSize, maxSize);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
}
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.DOWN)) {
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.DOWN);
block.setBlockBounds(minSize, 0.0F, minSize, maxSize, minSize, maxSize);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
}
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.UP)) {
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.UP);
block.setBlockBounds(minSize, maxSize, minSize, maxSize, 1.0F, maxSize);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
}
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.NORTH)) {
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.NORTH);
block.setBlockBounds(minSize, minSize, 0.0F, maxSize, maxSize, minSize);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
}
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.SOUTH)) {
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.SOUTH);
block.setBlockBounds(minSize, minSize, maxSize, maxSize, maxSize, 1.0F);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
}
@ -190,7 +190,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
rotated[1][0] -= zFightOffset / 2;
transform(rotated, direction);
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
rotated = deepClone(zeroState);
@ -198,7 +198,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
rotated[1][0] -= zFightOffset / 2;
transform(rotated, direction);
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
rotated = deepClone(zeroState);
@ -207,7 +207,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
rotated[1][1] -= zFightOffset;
transform(rotated, direction);
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
rotated = deepClone(zeroState);
@ -216,13 +216,13 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
rotated[1][1] -= zFightOffset;
transform(rotated, direction);
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
} else { // Solid facade
float[][] rotated = deepClone(zeroState);
transform(rotated, direction);
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
}
}
@ -247,7 +247,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
transform(rotated, direction);
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
}
}
@ -441,7 +441,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
if (minZ != Utils.pipeMinPos || maxZ != Utils.pipeMaxPos || !found) {
block.setBlockBounds(cx == Utils.pipeMinPos ? cx - 0.05F : cx, cy == Utils.pipeMinPos ? cy - 0.05F : cy, minZ, cx == Utils.pipeMinPos ? cx
: cx + 0.05F, cy == Utils.pipeMinPos ? cy : cy + 0.05F, maxZ);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
}
@ -450,7 +450,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
if (minX != Utils.pipeMinPos || maxX != Utils.pipeMaxPos || !found) {
block.setBlockBounds(minX, cy == Utils.pipeMinPos ? cy - 0.05F : cy, cz == Utils.pipeMinPos ? cz - 0.05F : cz, maxX, cy == Utils.pipeMinPos ? cy
: cy + 0.05F, cz == Utils.pipeMinPos ? cz : cz + 0.05F);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
}
@ -459,14 +459,14 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
if (minY != Utils.pipeMinPos || maxY != Utils.pipeMaxPos || !found) {
block.setBlockBounds(cx == Utils.pipeMinPos ? cx - 0.05F : cx, minY, cz == Utils.pipeMinPos ? cz - 0.05F : cz, cx == Utils.pipeMinPos ? cx
: cx + 0.05F, maxY, cz == Utils.pipeMinPos ? cz : cz + 0.05F);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
}
if (center || !found) {
block.setBlockBounds(cx == Utils.pipeMinPos ? cx - 0.05F : cx, cy == Utils.pipeMinPos ? cy - 0.05F : cy, cz == Utils.pipeMinPos ? cz - 0.05F : cz,
cx == Utils.pipeMinPos ? cx : cx + 0.05F, cy == Utils.pipeMinPos ? cy : cy + 0.05F, cz == Utils.pipeMinPos ? cz : cz + 0.05F);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
}
@ -481,37 +481,37 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.WEST) && !state.facadeMatrix.isConnected(ForgeDirection.WEST)) {
block.setBlockBounds(Utils.pipeMinPos - 0.10F, min, min, Utils.pipeMinPos, max, max);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
}
if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.EAST) && !state.facadeMatrix.isConnected(ForgeDirection.EAST)) {
block.setBlockBounds(Utils.pipeMaxPos, min, min, Utils.pipeMaxPos + 0.10F, max, max);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
}
if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.DOWN) && !state.facadeMatrix.isConnected(ForgeDirection.DOWN)) {
block.setBlockBounds(min, Utils.pipeMinPos - 0.10F, min, max, Utils.pipeMinPos, max);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
}
if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.UP) && !state.facadeMatrix.isConnected(ForgeDirection.UP)) {
block.setBlockBounds(min, Utils.pipeMaxPos, min, max, Utils.pipeMaxPos + 0.10F, max);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
}
if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.NORTH) && !state.facadeMatrix.isConnected(ForgeDirection.NORTH)) {
block.setBlockBounds(min, min, Utils.pipeMinPos - 0.10F, max, max, Utils.pipeMinPos);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
}
if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.SOUTH) && !state.facadeMatrix.isConnected(ForgeDirection.SOUTH)) {
block.setBlockBounds(min, min, Utils.pipeMaxPos, max, max, Utils.pipeMaxPos + 0.10F);
renderblocks.updateCustomBlockBounds(block);
renderblocks.setRenderBoundsFromBlock(block);
renderblocks.renderStandardBlock(block, x, y, z);
}
}