Update for MCP updates with MC1.4.7
This commit is contained in:
parent
1126b3c7d3
commit
424329f164
24 changed files with 114 additions and 114 deletions
|
@ -382,11 +382,11 @@ public class BuildCraftTransport {
|
||||||
|
|
||||||
new BptBlockPipe(genericPipeBlock.blockID);
|
new BptBlockPipe(genericPipeBlock.blockID);
|
||||||
|
|
||||||
BuildCraftCore.itemBptProps[pipeItemsWood.shiftedIndex] = new BptItemPipeWooden();
|
BuildCraftCore.itemBptProps[pipeItemsWood.itemID] = new BptItemPipeWooden();
|
||||||
BuildCraftCore.itemBptProps[pipeLiquidsWood.shiftedIndex] = new BptItemPipeWooden();
|
BuildCraftCore.itemBptProps[pipeLiquidsWood.itemID] = new BptItemPipeWooden();
|
||||||
BuildCraftCore.itemBptProps[pipeItemsIron.shiftedIndex] = new BptItemPipeIron();
|
BuildCraftCore.itemBptProps[pipeItemsIron.itemID] = new BptItemPipeIron();
|
||||||
BuildCraftCore.itemBptProps[pipeLiquidsIron.shiftedIndex] = new BptItemPipeIron();
|
BuildCraftCore.itemBptProps[pipeLiquidsIron.itemID] = new BptItemPipeIron();
|
||||||
BuildCraftCore.itemBptProps[pipeItemsDiamond.shiftedIndex] = new BptItemPipeDiamond();
|
BuildCraftCore.itemBptProps[pipeItemsDiamond.itemID] = new BptItemPipeDiamond();
|
||||||
|
|
||||||
ActionManager.registerTriggerProvider(new PipeTriggerProvider());
|
ActionManager.registerTriggerProvider(new PipeTriggerProvider());
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ public class BlueprintManager {
|
||||||
public static ItemSignature getItemSignature(Item item) {
|
public static ItemSignature getItemSignature(Item item) {
|
||||||
ItemSignature sig = new ItemSignature();
|
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();
|
sig.itemClassName = item.getClass().getSimpleName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@ public class BptBlock {
|
||||||
if (stack.stackSize == 0 && stack.getItem().getContainerItem() != null) {
|
if (stack.stackSize == 0 && stack.getItem().getContainerItem() != null) {
|
||||||
Item container = stack.getItem().getContainerItem();
|
Item container = stack.getItem().getContainerItem();
|
||||||
|
|
||||||
stack.itemID = container.shiftedIndex;
|
stack.itemID = container.itemID;
|
||||||
stack.stackSize = 1;
|
stack.stackSize = 1;
|
||||||
stack.setItemDamage(0);
|
stack.setItemDamage(0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -157,8 +157,8 @@ public class BlockMarker extends BlockContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int func_85104_a(World world, int x, int y, int z, int side, float par6, float par7, float par8, int meta) {
|
public int onBlockPlaced(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);
|
super.onBlockPlaced(world, x, y, z, side, par6, par7, par8, meta);
|
||||||
|
|
||||||
if (side == 1 && BuildersProxy.canPlaceTorch(world, x, y - 1, z)) {
|
if (side == 1 && BuildersProxy.canPlaceTorch(world, x, y - 1, z)) {
|
||||||
meta = 5;
|
meta = 5;
|
||||||
|
|
|
@ -49,8 +49,8 @@ public class ContainerBlueprintLibrary extends BuildCraftContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateCraftingResults() {
|
public void detectAndSendChanges() {
|
||||||
super.updateCraftingResults();
|
super.detectAndSendChanges();
|
||||||
for (int i = 0; i < crafters.size(); i++) {
|
for (int i = 0; i < crafters.size(); i++) {
|
||||||
ICrafting icrafting = (ICrafting) crafters.get(i);
|
ICrafting icrafting = (ICrafting) crafters.get(i);
|
||||||
if (progressIn != library.progressIn) {
|
if (progressIn != library.progressIn) {
|
||||||
|
|
|
@ -49,8 +49,8 @@ public class ContainerTemplate extends BuildCraftContainer {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateCraftingResults() {
|
public void detectAndSendChanges() {
|
||||||
super.updateCraftingResults();
|
super.detectAndSendChanges();
|
||||||
for (int i = 0; i < crafters.size(); i++) {
|
for (int i = 0; i < crafters.size(); i++) {
|
||||||
ICrafting icrafting = (ICrafting) crafters.get(i);
|
ICrafting icrafting = (ICrafting) crafters.get(i);
|
||||||
if (computingTime != template.computingTime) {
|
if (computingTime != template.computingTime) {
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class RenderingEntityBlocks implements ISimpleBlockRenderingHandler {
|
||||||
Tessellator tessellator = Tessellator.instance;
|
Tessellator tessellator = Tessellator.instance;
|
||||||
|
|
||||||
block.setBlockBounds(Utils.pipeMinPos, 0.0F, Utils.pipeMinPos, Utils.pipeMaxPos, 1.0F, Utils.pipeMaxPos);
|
block.setBlockBounds(Utils.pipeMinPos, 0.0F, Utils.pipeMinPos, Utils.pipeMaxPos, 1.0F, Utils.pipeMaxPos);
|
||||||
renderer.updateCustomBlockBounds(block);
|
renderer.setRenderBoundsFromBlock(block);
|
||||||
block.setBlockBoundsForItemRender();
|
block.setBlockBoundsForItemRender();
|
||||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
|
@ -120,42 +120,42 @@ public class RenderingEntityBlocks implements ISimpleBlockRenderingHandler {
|
||||||
float maxSize = Utils.pipeMaxPos;
|
float maxSize = Utils.pipeMaxPos;
|
||||||
|
|
||||||
block.setBlockBounds(minSize, minSize, minSize, maxSize, maxSize, maxSize);
|
block.setBlockBounds(minSize, minSize, minSize, maxSize, maxSize, maxSize);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, i, j, k);
|
renderblocks.renderStandardBlock(block, i, j, k);
|
||||||
|
|
||||||
if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i - 1, j, k)) {
|
if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i - 1, j, k)) {
|
||||||
block.setBlockBounds(0.0F, minSize, minSize, minSize, maxSize, maxSize);
|
block.setBlockBounds(0.0F, minSize, minSize, minSize, maxSize, maxSize);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, i, j, k);
|
renderblocks.renderStandardBlock(block, i, j, k);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i + 1, j, k)) {
|
if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i + 1, j, k)) {
|
||||||
block.setBlockBounds(maxSize, minSize, minSize, 1.0F, maxSize, maxSize);
|
block.setBlockBounds(maxSize, minSize, minSize, 1.0F, maxSize, maxSize);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, i, j, k);
|
renderblocks.renderStandardBlock(block, i, j, k);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i, j - 1, k)) {
|
if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i, j - 1, k)) {
|
||||||
block.setBlockBounds(minSize, 0.0F, minSize, maxSize, minSize, maxSize);
|
block.setBlockBounds(minSize, 0.0F, minSize, maxSize, minSize, maxSize);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, i, j, k);
|
renderblocks.renderStandardBlock(block, i, j, k);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i, j + 1, k)) {
|
if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i, j + 1, k)) {
|
||||||
block.setBlockBounds(minSize, maxSize, minSize, maxSize, 1.0F, maxSize);
|
block.setBlockBounds(minSize, maxSize, minSize, maxSize, 1.0F, maxSize);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, i, j, k);
|
renderblocks.renderStandardBlock(block, i, j, k);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i, j, k - 1)) {
|
if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i, j, k - 1)) {
|
||||||
block.setBlockBounds(minSize, minSize, 0.0F, maxSize, maxSize, minSize);
|
block.setBlockBounds(minSize, minSize, 0.0F, maxSize, maxSize, minSize);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, i, j, k);
|
renderblocks.renderStandardBlock(block, i, j, k);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i, j, k + 1)) {
|
if (Utils.checkLegacyPipesConnections(iblockaccess, i, j, k, i, j, k + 1)) {
|
||||||
block.setBlockBounds(minSize, minSize, maxSize, maxSize, maxSize, 1.0F);
|
block.setBlockBounds(minSize, minSize, maxSize, maxSize, maxSize, 1.0F);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, i, j, k);
|
renderblocks.renderStandardBlock(block, i, j, k);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,7 @@ public class BlockEngine extends BlockContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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);
|
TileEngine tile = (TileEngine) world.getBlockTileEntity(x, y, z);
|
||||||
tile.orientation = ForgeDirection.UP.ordinal();
|
tile.orientation = ForgeDirection.UP.ordinal();
|
||||||
tile.switchOrientation();
|
tile.switchOrientation();
|
||||||
|
|
|
@ -45,8 +45,8 @@ public class ContainerEngine extends BuildCraftContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateCraftingResults() {
|
public void detectAndSendChanges() {
|
||||||
super.updateCraftingResults();
|
super.detectAndSendChanges();
|
||||||
|
|
||||||
for (int i = 0; i < crafters.size(); i++) {
|
for (int i = 0; i < crafters.size(); i++) {
|
||||||
engine.engine.sendGUINetworkData(this, (ICrafting) crafters.get(i));
|
engine.engine.sendGUINetworkData(this, (ICrafting) crafters.get(i));
|
||||||
|
|
|
@ -50,19 +50,19 @@ public class ContainerAutoWorkbench extends BuildCraftContainer {
|
||||||
CoreProxy.proxy.onCraftingPickup(thePlayer.worldObj, thePlayer, itemstack);
|
CoreProxy.proxy.onCraftingPickup(thePlayer.worldObj, thePlayer, itemstack);
|
||||||
if (itemstack.itemID == Block.workbench.blockID) {
|
if (itemstack.itemID == Block.workbench.blockID) {
|
||||||
thePlayer.addStat(AchievementList.buildWorkBench, 1);
|
thePlayer.addStat(AchievementList.buildWorkBench, 1);
|
||||||
} else if (itemstack.itemID == Item.pickaxeWood.shiftedIndex) {
|
} else if (itemstack.itemID == Item.pickaxeWood.itemID) {
|
||||||
thePlayer.addStat(AchievementList.buildPickaxe, 1);
|
thePlayer.addStat(AchievementList.buildPickaxe, 1);
|
||||||
} else if (itemstack.itemID == Block.stoneOvenIdle.blockID) {
|
} else if (itemstack.itemID == Block.stoneOvenIdle.blockID) {
|
||||||
thePlayer.addStat(AchievementList.buildFurnace, 1);
|
thePlayer.addStat(AchievementList.buildFurnace, 1);
|
||||||
} else if (itemstack.itemID == Item.hoeWood.shiftedIndex) {
|
} else if (itemstack.itemID == Item.hoeWood.itemID) {
|
||||||
thePlayer.addStat(AchievementList.buildHoe, 1);
|
thePlayer.addStat(AchievementList.buildHoe, 1);
|
||||||
} else if (itemstack.itemID == Item.bread.shiftedIndex) {
|
} else if (itemstack.itemID == Item.bread.itemID) {
|
||||||
thePlayer.addStat(AchievementList.makeBread, 1);
|
thePlayer.addStat(AchievementList.makeBread, 1);
|
||||||
} else if (itemstack.itemID == Item.cake.shiftedIndex) {
|
} else if (itemstack.itemID == Item.cake.itemID) {
|
||||||
thePlayer.addStat(AchievementList.bakeCake, 1);
|
thePlayer.addStat(AchievementList.bakeCake, 1);
|
||||||
} else if (itemstack.itemID == Item.pickaxeStone.shiftedIndex) {
|
} else if (itemstack.itemID == Item.pickaxeStone.itemID) {
|
||||||
thePlayer.addStat(AchievementList.buildBetterPickaxe, 1);
|
thePlayer.addStat(AchievementList.buildBetterPickaxe, 1);
|
||||||
} else if (itemstack.itemID == Item.swordWood.shiftedIndex) {
|
} else if (itemstack.itemID == Item.swordWood.itemID) {
|
||||||
thePlayer.addStat(AchievementList.buildSword, 1);
|
thePlayer.addStat(AchievementList.buildSword, 1);
|
||||||
} else if (itemstack.itemID == Block.enchantmentTable.blockID) {
|
} else if (itemstack.itemID == Block.enchantmentTable.blockID) {
|
||||||
thePlayer.addStat(AchievementList.enchantments, 1);
|
thePlayer.addStat(AchievementList.enchantments, 1);
|
||||||
|
@ -106,8 +106,8 @@ public class ContainerAutoWorkbench extends BuildCraftContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateCraftingResults() {
|
public void detectAndSendChanges() {
|
||||||
super.updateCraftingResults();
|
super.detectAndSendChanges();
|
||||||
craftResult.setInventorySlotContents(0, tile.findRecipe());
|
craftResult.setInventorySlotContents(0, tile.findRecipe());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,8 +80,8 @@ public class ContainerRefinery extends BuildCraftContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateCraftingResults() {
|
public void detectAndSendChanges() {
|
||||||
super.updateCraftingResults();
|
super.detectAndSendChanges();
|
||||||
for (int i = 0; i < crafters.size(); i++) {
|
for (int i = 0; i < crafters.size(); i++) {
|
||||||
refinery.sendGUINetworkData(this, (ICrafting) crafters.get(i));
|
refinery.sendGUINetworkData(this, (ICrafting) crafters.get(i));
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,8 +69,8 @@ public class BlockLaser extends BlockContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int func_85104_a(World world, int x, int y, int z, int side, float par6, float par7, float par8, int meta) {
|
public int onBlockPlaced(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);
|
super.onBlockPlaced(world, x, y, z, side, par6, par7, par8, meta);
|
||||||
|
|
||||||
if (side <= 6) {
|
if (side <= 6) {
|
||||||
meta = side;
|
meta = side;
|
||||||
|
|
|
@ -43,11 +43,11 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler {
|
||||||
renderblocks.uvRotateBottom = 2;
|
renderblocks.uvRotateBottom = 2;
|
||||||
|
|
||||||
block.setBlockBounds(0.0F, 0.0F, 0.0F, 4F / 16F, 1, 1);
|
block.setBlockBounds(0.0F, 0.0F, 0.0F, 4F / 16F, 1, 1);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, x, y, z);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
|
|
||||||
block.setBlockBounds(4F / 16F, 5F / 16F, 5F / 16F, 13F / 16F, 11F / 16F, 11F / 16F);
|
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);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
} else if (meta == ForgeDirection.WEST.ordinal()) {
|
} else if (meta == ForgeDirection.WEST.ordinal()) {
|
||||||
renderblocks.uvRotateEast = 1;
|
renderblocks.uvRotateEast = 1;
|
||||||
|
@ -56,22 +56,22 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler {
|
||||||
renderblocks.uvRotateBottom = 1;
|
renderblocks.uvRotateBottom = 1;
|
||||||
|
|
||||||
block.setBlockBounds(1F - 4F / 16F, 0.0F, 0.0F, 1, 1, 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);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
|
|
||||||
block.setBlockBounds(1F - 13F / 16F, 5F / 16F, 5F / 16F, 1F - 4F / 16F, 11F / 16F, 11F / 16F);
|
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);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
} else if (meta == ForgeDirection.NORTH.ordinal()) {
|
} else if (meta == ForgeDirection.NORTH.ordinal()) {
|
||||||
renderblocks.uvRotateSouth = 1;
|
renderblocks.uvRotateSouth = 1;
|
||||||
renderblocks.uvRotateNorth = 2;
|
renderblocks.uvRotateNorth = 2;
|
||||||
|
|
||||||
block.setBlockBounds(0.0F, 0.0F, 1F - 4F / 16F, 1, 1, 1);
|
block.setBlockBounds(0.0F, 0.0F, 1F - 4F / 16F, 1, 1, 1);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, x, y, z);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
|
|
||||||
block.setBlockBounds(5F / 16F, 5F / 16F, 1F - 13F / 16F, 11F / 16F, 11F / 16F, 1F - 4F / 16F);
|
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);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
} else if (meta == ForgeDirection.SOUTH.ordinal()) {
|
} else if (meta == ForgeDirection.SOUTH.ordinal()) {
|
||||||
renderblocks.uvRotateSouth = 2;
|
renderblocks.uvRotateSouth = 2;
|
||||||
|
@ -80,11 +80,11 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler {
|
||||||
renderblocks.uvRotateBottom = 3;
|
renderblocks.uvRotateBottom = 3;
|
||||||
|
|
||||||
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1, 1, 4F / 16F);
|
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1, 1, 4F / 16F);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, x, y, z);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
|
|
||||||
block.setBlockBounds(5F / 16F, 5F / 16F, 4F / 16F, 11F / 16F, 11F / 16F, 13F / 16F);
|
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);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
} else if (meta == ForgeDirection.DOWN.ordinal()) {
|
} else if (meta == ForgeDirection.DOWN.ordinal()) {
|
||||||
renderblocks.uvRotateEast = 3;
|
renderblocks.uvRotateEast = 3;
|
||||||
|
@ -93,19 +93,19 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler {
|
||||||
renderblocks.uvRotateNorth = 3;
|
renderblocks.uvRotateNorth = 3;
|
||||||
|
|
||||||
block.setBlockBounds(0.0F, 1.0F - 4F / 16F, 0.0F, 1.0F, 1.0F, 1.0F);
|
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);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
|
|
||||||
block.setBlockBounds(5F / 16F, 1F - 13F / 16F, 5F / 16F, 11F / 16F, 1F - 4F / 16F, 11F / 16F);
|
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);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
} else if (meta == ForgeDirection.UP.ordinal()) {
|
} else if (meta == ForgeDirection.UP.ordinal()) {
|
||||||
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1, 4F / 16F, 1);
|
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1, 4F / 16F, 1);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, x, y, z);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
|
|
||||||
block.setBlockBounds(5F / 16F, 4F / 16F, 5F / 16F, 11F / 16F, 13F / 16F, 11F / 16F);
|
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);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,11 +127,11 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler {
|
||||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||||
|
|
||||||
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1, 4F / 16F, 1);
|
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1, 4F / 16F, 1);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderBlockInInv(renderblocks, block, 0);
|
renderBlockInInv(renderblocks, block, 0);
|
||||||
|
|
||||||
block.setBlockBounds(5F / 16F, 4F / 16F, 5F / 16F, 11F / 16F, 13F / 16F, 11F / 16F);
|
block.setBlockBounds(5F / 16F, 4F / 16F, 5F / 16F, 11F / 16F, 13F / 16F, 11F / 16F);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderBlockInInv(renderblocks, block, 1);
|
renderBlockInInv(renderblocks, block, 1);
|
||||||
|
|
||||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||||
|
|
|
@ -47,8 +47,8 @@ public class ContainerAssemblyAdvancedWorkbench extends BuildCraftContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateCraftingResults() {
|
public void detectAndSendChanges() {
|
||||||
super.updateCraftingResults();
|
super.detectAndSendChanges();
|
||||||
for (int i = 0; i < workbench.getCraftingSlots().getSizeInventory(); i++) {
|
for (int i = 0; i < workbench.getCraftingSlots().getSizeInventory(); i++) {
|
||||||
Iterator var4 = this.crafters.iterator();
|
Iterator var4 = this.crafters.iterator();
|
||||||
|
|
||||||
|
|
|
@ -63,8 +63,8 @@ public class ContainerAssemblyTable extends BuildCraftContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateCraftingResults() {
|
public void detectAndSendChanges() {
|
||||||
super.updateCraftingResults();
|
super.detectAndSendChanges();
|
||||||
|
|
||||||
for (int i = 0; i < crafters.size(); i++) {
|
for (int i = 0; i < crafters.size(); i++) {
|
||||||
table.sendGUINetworkData(this, (ICrafting) crafters.get(i));
|
table.sendGUINetworkData(this, (ICrafting) crafters.get(i));
|
||||||
|
|
|
@ -352,8 +352,8 @@ public class BlockGenericPipe extends BlockContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int func_85104_a(World world, int x, int y, int z, int side, float par6, float par7, float par8, int meta) {
|
public int onBlockPlaced(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);
|
super.onBlockPlaced(world, x, y, z, side, par6, par7, par8, meta);
|
||||||
Pipe pipe = getPipe(world, x, y, z);
|
Pipe pipe = getPipe(world, x, y, z);
|
||||||
|
|
||||||
if (isValid(pipe)) {
|
if (isValid(pipe)) {
|
||||||
|
@ -384,7 +384,7 @@ public class BlockGenericPipe extends BlockContainer {
|
||||||
} else if (entityplayer.getCurrentEquippedItem() == null) {
|
} else if (entityplayer.getCurrentEquippedItem() == null) {
|
||||||
|
|
||||||
// Fall through the end of the test
|
// 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
|
// Sign will be placed anyway, so lets show the sign gui
|
||||||
return false;
|
return false;
|
||||||
else if (entityplayer.getCurrentEquippedItem().getItem() instanceof ItemPipe)
|
else if (entityplayer.getCurrentEquippedItem().getItem() instanceof ItemPipe)
|
||||||
|
@ -433,8 +433,8 @@ public class BlockGenericPipe extends BlockContainer {
|
||||||
pipe.container.scheduleNeighborChange();
|
pipe.container.scheduleNeighborChange();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else if (entityplayer.getCurrentEquippedItem().itemID == BuildCraftTransport.pipeGate.shiftedIndex
|
} else if (entityplayer.getCurrentEquippedItem().itemID == BuildCraftTransport.pipeGate.itemID
|
||||||
|| entityplayer.getCurrentEquippedItem().itemID == BuildCraftTransport.pipeGateAutarchic.shiftedIndex)
|
|| entityplayer.getCurrentEquippedItem().itemID == BuildCraftTransport.pipeGateAutarchic.itemID)
|
||||||
if (!pipe.hasInterface()) {
|
if (!pipe.hasInterface()) {
|
||||||
|
|
||||||
pipe.gate = new GateVanilla(pipe, entityplayer.getCurrentEquippedItem());
|
pipe.gate = new GateVanilla(pipe, entityplayer.getCurrentEquippedItem());
|
||||||
|
@ -541,7 +541,7 @@ public class BlockGenericPipe extends BlockContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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);
|
Pipe pipe = getPipe(world, x, y, z);
|
||||||
|
|
||||||
if (isValid(pipe))
|
if (isValid(pipe))
|
||||||
|
@ -595,9 +595,9 @@ public class BlockGenericPipe extends BlockContainer {
|
||||||
public static ItemPipe registerPipe(int key, Class<? extends Pipe> clas) {
|
public static ItemPipe registerPipe(int key, Class<? extends Pipe> clas) {
|
||||||
ItemPipe item = new ItemPipe(key);
|
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) {
|
if (dummyPipe != null) {
|
||||||
item.setTextureFile(dummyPipe.getTextureFile());
|
item.setTextureFile(dummyPipe.getTextureFile());
|
||||||
item.setTextureIndex(dummyPipe.getTextureIndexForItem());
|
item.setTextureIndex(dummyPipe.getTextureIndexForItem());
|
||||||
|
|
|
@ -101,7 +101,7 @@ public abstract class Gate {
|
||||||
public abstract String getGuiFile();
|
public abstract String getGuiFile();
|
||||||
|
|
||||||
public static boolean isGateItem(ItemStack stack) {
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class GateVanilla extends Gate {
|
||||||
public GateVanilla(Pipe pipe, ItemStack stack) {
|
public GateVanilla(Pipe pipe, ItemStack stack) {
|
||||||
super(pipe, stack);
|
super(pipe, stack);
|
||||||
|
|
||||||
if (stack.itemID == BuildCraftTransport.pipeGateAutarchic.shiftedIndex) {
|
if (stack.itemID == BuildCraftTransport.pipeGateAutarchic.itemID) {
|
||||||
addEnergyPulser(pipe);
|
addEnergyPulser(pipe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class ItemPipe extends ItemBuildCraft implements IItemPipe {
|
||||||
return false;
|
return false;
|
||||||
if (entityplayer.canCurrentToolHarvestBlock(i, j, k) && world.canPlaceEntityOnSide(blockID, i, j, k, false, side, entityplayer)) {
|
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)) {
|
if (BlockGenericPipe.placePipe(pipe, world, i, j, k, blockID, 0)) {
|
||||||
|
|
||||||
Block.blocksList[blockID].onBlockPlacedBy(world, i, j, k, entityplayer);
|
Block.blocksList[blockID].onBlockPlacedBy(world, i, j, k, entityplayer);
|
||||||
|
|
|
@ -26,31 +26,31 @@ public class TransportProxyClient extends TransportProxy {
|
||||||
@Override
|
@Override
|
||||||
public void registerRenderers() {
|
public void registerRenderers() {
|
||||||
|
|
||||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsWood.shiftedIndex, pipeItemRenderer);
|
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsWood.itemID, pipeItemRenderer);
|
||||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsCobblestone.shiftedIndex, pipeItemRenderer);
|
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsCobblestone.itemID, pipeItemRenderer);
|
||||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsStone.shiftedIndex, pipeItemRenderer);
|
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsStone.itemID, pipeItemRenderer);
|
||||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsIron.shiftedIndex, pipeItemRenderer);
|
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsIron.itemID, pipeItemRenderer);
|
||||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsGold.shiftedIndex, pipeItemRenderer);
|
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsGold.itemID, pipeItemRenderer);
|
||||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsDiamond.shiftedIndex, pipeItemRenderer);
|
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsDiamond.itemID, pipeItemRenderer);
|
||||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsObsidian.shiftedIndex, pipeItemRenderer);
|
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsObsidian.itemID, pipeItemRenderer);
|
||||||
|
|
||||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsWood.shiftedIndex, pipeItemRenderer);
|
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsWood.itemID, pipeItemRenderer);
|
||||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsCobblestone.shiftedIndex, pipeItemRenderer);
|
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsCobblestone.itemID, pipeItemRenderer);
|
||||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsStone.shiftedIndex, pipeItemRenderer);
|
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsStone.itemID, pipeItemRenderer);
|
||||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsIron.shiftedIndex, pipeItemRenderer);
|
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsIron.itemID, pipeItemRenderer);
|
||||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsGold.shiftedIndex, pipeItemRenderer);
|
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsGold.itemID, pipeItemRenderer);
|
||||||
|
|
||||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerWood.shiftedIndex, pipeItemRenderer);
|
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerWood.itemID, pipeItemRenderer);
|
||||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerStone.shiftedIndex, pipeItemRenderer);
|
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerStone.itemID, pipeItemRenderer);
|
||||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerGold.shiftedIndex, pipeItemRenderer);
|
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerGold.itemID, pipeItemRenderer);
|
||||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeStructureCobblestone.shiftedIndex, pipeItemRenderer);
|
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeStructureCobblestone.itemID, pipeItemRenderer);
|
||||||
// MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsStipes.shiftedIndex, pipeItemRenderer);
|
// MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsStipes.shiftedIndex, pipeItemRenderer);
|
||||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsVoid.shiftedIndex, pipeItemRenderer);
|
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsVoid.itemID, pipeItemRenderer);
|
||||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsVoid.shiftedIndex, pipeItemRenderer);
|
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsVoid.itemID, pipeItemRenderer);
|
||||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsSandstone.shiftedIndex, pipeItemRenderer);
|
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsSandstone.itemID, pipeItemRenderer);
|
||||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsSandstone.shiftedIndex, pipeItemRenderer);
|
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsSandstone.itemID, pipeItemRenderer);
|
||||||
|
|
||||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.facadeItem.shiftedIndex, facadeItemRenderer);
|
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.facadeItem.itemID, facadeItemRenderer);
|
||||||
TransportProxy.pipeModel = RenderingRegistry.getNextAvailableRenderId();
|
TransportProxy.pipeModel = RenderingRegistry.getNextAvailableRenderId();
|
||||||
|
|
||||||
RenderingRegistry.registerBlockHandler(pipeWorldRenderer);
|
RenderingRegistry.registerBlockHandler(pipeWorldRenderer);
|
||||||
|
|
|
@ -246,8 +246,8 @@ public class ContainerGateInterface extends BuildCraftContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateCraftingResults() {
|
public void detectAndSendChanges() {
|
||||||
super.updateCraftingResults();
|
super.detectAndSendChanges();
|
||||||
int state = calculateTriggerState();
|
int state = calculateTriggerState();
|
||||||
if (state != lastTriggerState) {
|
if (state != lastTriggerState) {
|
||||||
for (int i = 0; i < this.crafters.size(); i++) {
|
for (int i = 0; i < this.crafters.size(); i++) {
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class FacadeItemRenderer implements IItemRenderer {
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
ForgeHooksClient.bindTexture(block.getTextureFile(), 0);
|
ForgeHooksClient.bindTexture(block.getTextureFile(), 0);
|
||||||
block.setBlockBounds(0F, 0F, 1F - 1F / 16F, 1F, 1F, 1F);
|
block.setBlockBounds(0F, 0F, 1F - 1F / 16F, 1F, 1F, 1F);
|
||||||
render.updateCustomBlockBounds(block);
|
render.setRenderBoundsFromBlock(block);
|
||||||
GL11.glTranslatef(translateX, translateY, translateZ);
|
GL11.glTranslatef(translateX, translateY, translateZ);
|
||||||
|
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
|
@ -67,7 +67,7 @@ public class FacadeItemRenderer implements IItemRenderer {
|
||||||
int textureID = 7 * 16 + 13; // Structure pipe
|
int textureID = 7 * 16 + 13; // Structure pipe
|
||||||
block.setBlockBounds(Utils.pipeMinPos, Utils.pipeMinPos, Utils.pipeMinPos, Utils.pipeMaxPos, Utils.pipeMaxPos, Utils.pipeMaxPos - 1F / 16F);
|
block.setBlockBounds(Utils.pipeMinPos, Utils.pipeMinPos, Utils.pipeMinPos, Utils.pipeMaxPos, Utils.pipeMaxPos, Utils.pipeMaxPos - 1F / 16F);
|
||||||
block.setBlockBoundsForItemRender();
|
block.setBlockBoundsForItemRender();
|
||||||
render.updateCustomBlockBounds(block);
|
render.setRenderBoundsFromBlock(block);
|
||||||
GL11.glTranslatef(translateX, translateY, translateZ + 0.25F);
|
GL11.glTranslatef(translateX, translateY, translateZ + 0.25F);
|
||||||
|
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class PipeItemRenderer implements IItemRenderer {
|
||||||
|
|
||||||
block.setBlockBounds(Utils.pipeMinPos, 0.0F, Utils.pipeMinPos, Utils.pipeMaxPos, 1.0F, Utils.pipeMaxPos);
|
block.setBlockBounds(Utils.pipeMinPos, 0.0F, Utils.pipeMinPos, Utils.pipeMaxPos, 1.0F, Utils.pipeMaxPos);
|
||||||
block.setBlockBoundsForItemRender();
|
block.setBlockBoundsForItemRender();
|
||||||
render.updateCustomBlockBounds(block);
|
render.setRenderBoundsFromBlock(block);
|
||||||
|
|
||||||
GL11.glTranslatef(translateX, translateY, translateZ);
|
GL11.glTranslatef(translateX, translateY, translateZ);
|
||||||
tessellator.startDrawingQuads();
|
tessellator.startDrawingQuads();
|
||||||
|
|
|
@ -85,48 +85,48 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
|
||||||
|
|
||||||
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.UNKNOWN);
|
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.UNKNOWN);
|
||||||
block.setBlockBounds(minSize, minSize, minSize, maxSize, maxSize, maxSize);
|
block.setBlockBounds(minSize, minSize, minSize, maxSize, maxSize, maxSize);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, x, y, z);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
|
|
||||||
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.WEST)) {
|
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.WEST)) {
|
||||||
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.WEST);
|
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.WEST);
|
||||||
block.setBlockBounds(0.0F, minSize, minSize, minSize, maxSize, maxSize);
|
block.setBlockBounds(0.0F, minSize, minSize, minSize, maxSize, maxSize);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, x, y, z);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.EAST)) {
|
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.EAST)) {
|
||||||
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.EAST);
|
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.EAST);
|
||||||
block.setBlockBounds(maxSize, minSize, minSize, 1.0F, maxSize, maxSize);
|
block.setBlockBounds(maxSize, minSize, minSize, 1.0F, maxSize, maxSize);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, x, y, z);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.DOWN)) {
|
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.DOWN)) {
|
||||||
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.DOWN);
|
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.DOWN);
|
||||||
block.setBlockBounds(minSize, 0.0F, minSize, maxSize, minSize, maxSize);
|
block.setBlockBounds(minSize, 0.0F, minSize, maxSize, minSize, maxSize);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, x, y, z);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.UP)) {
|
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.UP)) {
|
||||||
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.UP);
|
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.UP);
|
||||||
block.setBlockBounds(minSize, maxSize, minSize, maxSize, 1.0F, maxSize);
|
block.setBlockBounds(minSize, maxSize, minSize, maxSize, 1.0F, maxSize);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, x, y, z);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.NORTH)) {
|
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.NORTH)) {
|
||||||
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.NORTH);
|
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.NORTH);
|
||||||
block.setBlockBounds(minSize, minSize, 0.0F, maxSize, maxSize, minSize);
|
block.setBlockBounds(minSize, minSize, 0.0F, maxSize, maxSize, minSize);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, x, y, z);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.SOUTH)) {
|
if (state.pipeConnectionMatrix.isConnected(ForgeDirection.SOUTH)) {
|
||||||
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.SOUTH);
|
state.currentTextureIndex = state.textureMatrix.getTextureIndex(ForgeDirection.SOUTH);
|
||||||
block.setBlockBounds(minSize, minSize, maxSize, maxSize, maxSize, 1.0F);
|
block.setBlockBounds(minSize, minSize, maxSize, maxSize, maxSize, 1.0F);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, x, y, z);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
|
||||||
rotated[1][0] -= zFightOffset / 2;
|
rotated[1][0] -= zFightOffset / 2;
|
||||||
transform(rotated, direction);
|
transform(rotated, direction);
|
||||||
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
|
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);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
|
|
||||||
rotated = deepClone(zeroState);
|
rotated = deepClone(zeroState);
|
||||||
|
@ -198,7 +198,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
|
||||||
rotated[1][0] -= zFightOffset / 2;
|
rotated[1][0] -= zFightOffset / 2;
|
||||||
transform(rotated, direction);
|
transform(rotated, direction);
|
||||||
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
|
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);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
|
|
||||||
rotated = deepClone(zeroState);
|
rotated = deepClone(zeroState);
|
||||||
|
@ -207,7 +207,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
|
||||||
rotated[1][1] -= zFightOffset;
|
rotated[1][1] -= zFightOffset;
|
||||||
transform(rotated, direction);
|
transform(rotated, direction);
|
||||||
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
|
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);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
|
|
||||||
rotated = deepClone(zeroState);
|
rotated = deepClone(zeroState);
|
||||||
|
@ -216,13 +216,13 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
|
||||||
rotated[1][1] -= zFightOffset;
|
rotated[1][1] -= zFightOffset;
|
||||||
transform(rotated, direction);
|
transform(rotated, direction);
|
||||||
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
|
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);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
} else { // Solid facade
|
} else { // Solid facade
|
||||||
float[][] rotated = deepClone(zeroState);
|
float[][] rotated = deepClone(zeroState);
|
||||||
transform(rotated, direction);
|
transform(rotated, direction);
|
||||||
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
|
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);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -247,7 +247,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
|
||||||
transform(rotated, direction);
|
transform(rotated, direction);
|
||||||
|
|
||||||
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
|
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);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -441,7 +441,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
|
||||||
if (minZ != Utils.pipeMinPos || maxZ != Utils.pipeMaxPos || !found) {
|
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
|
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);
|
: cx + 0.05F, cy == Utils.pipeMinPos ? cy : cy + 0.05F, maxZ);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, x, y, z);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -450,7 +450,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
|
||||||
if (minX != Utils.pipeMinPos || maxX != Utils.pipeMaxPos || !found) {
|
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
|
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);
|
: cy + 0.05F, cz == Utils.pipeMinPos ? cz : cz + 0.05F);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, x, y, z);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -459,14 +459,14 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
|
||||||
if (minY != Utils.pipeMinPos || maxY != Utils.pipeMaxPos || !found) {
|
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
|
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);
|
: cx + 0.05F, maxY, cz == Utils.pipeMinPos ? cz : cz + 0.05F);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, x, y, z);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (center || !found) {
|
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,
|
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);
|
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);
|
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)) {
|
if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.WEST) && !state.facadeMatrix.isConnected(ForgeDirection.WEST)) {
|
||||||
block.setBlockBounds(Utils.pipeMinPos - 0.10F, min, min, Utils.pipeMinPos, max, max);
|
block.setBlockBounds(Utils.pipeMinPos - 0.10F, min, min, Utils.pipeMinPos, max, max);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, x, y, z);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.EAST) && !state.facadeMatrix.isConnected(ForgeDirection.EAST)) {
|
if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.EAST) && !state.facadeMatrix.isConnected(ForgeDirection.EAST)) {
|
||||||
block.setBlockBounds(Utils.pipeMaxPos, min, min, Utils.pipeMaxPos + 0.10F, max, max);
|
block.setBlockBounds(Utils.pipeMaxPos, min, min, Utils.pipeMaxPos + 0.10F, max, max);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, x, y, z);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.DOWN) && !state.facadeMatrix.isConnected(ForgeDirection.DOWN)) {
|
if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.DOWN) && !state.facadeMatrix.isConnected(ForgeDirection.DOWN)) {
|
||||||
block.setBlockBounds(min, Utils.pipeMinPos - 0.10F, min, max, Utils.pipeMinPos, max);
|
block.setBlockBounds(min, Utils.pipeMinPos - 0.10F, min, max, Utils.pipeMinPos, max);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, x, y, z);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.UP) && !state.facadeMatrix.isConnected(ForgeDirection.UP)) {
|
if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.UP) && !state.facadeMatrix.isConnected(ForgeDirection.UP)) {
|
||||||
block.setBlockBounds(min, Utils.pipeMaxPos, min, max, Utils.pipeMaxPos + 0.10F, max);
|
block.setBlockBounds(min, Utils.pipeMaxPos, min, max, Utils.pipeMaxPos + 0.10F, max);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, x, y, z);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.NORTH) && !state.facadeMatrix.isConnected(ForgeDirection.NORTH)) {
|
if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.NORTH) && !state.facadeMatrix.isConnected(ForgeDirection.NORTH)) {
|
||||||
block.setBlockBounds(min, min, Utils.pipeMinPos - 0.10F, max, max, Utils.pipeMinPos);
|
block.setBlockBounds(min, min, Utils.pipeMinPos - 0.10F, max, max, Utils.pipeMinPos);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, x, y, z);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.SOUTH) && !state.facadeMatrix.isConnected(ForgeDirection.SOUTH)) {
|
if (!state.pipeConnectionMatrix.isConnected(ForgeDirection.SOUTH) && !state.facadeMatrix.isConnected(ForgeDirection.SOUTH)) {
|
||||||
block.setBlockBounds(min, min, Utils.pipeMaxPos, max, max, Utils.pipeMaxPos + 0.10F);
|
block.setBlockBounds(min, min, Utils.pipeMaxPos, max, max, Utils.pipeMaxPos + 0.10F);
|
||||||
renderblocks.updateCustomBlockBounds(block);
|
renderblocks.setRenderBoundsFromBlock(block);
|
||||||
renderblocks.renderStandardBlock(block, x, y, z);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue