From 36dad44a6aa13fe58155e9faa6715b7b74780d3e Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Thu, 10 Apr 2014 22:54:28 -0500 Subject: [PATCH 1/3] Fixed Hit Boxes on Import Bus, Interface, Storage Bus, P2P Tunnels --- fmp/CableBusPart.java | 1 - parts/automation/PartImportBus.java | 3 +-- parts/misc/PartInterface.java | 6 ++---- parts/misc/PartStorageBus.java | 3 +-- parts/p2p/PartP2PTunnel.java | 2 ++ 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/fmp/CableBusPart.java b/fmp/CableBusPart.java index 76478e8e..cc042b08 100644 --- a/fmp/CableBusPart.java +++ b/fmp/CableBusPart.java @@ -428,7 +428,6 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds @Override public void partChanged() { - AELog.info( "rebuildSlotMap" ); if ( tile() instanceof TIInventoryTile ) ((TIInventoryTile) tile()).rebuildSlotMap(); diff --git a/parts/automation/PartImportBus.java b/parts/automation/PartImportBus.java index 05e18b55..fbff58f9 100644 --- a/parts/automation/PartImportBus.java +++ b/parts/automation/PartImportBus.java @@ -124,8 +124,7 @@ public class PartImportBus extends PartSharedItemBus implements IGridTickable, I @Override public void getBoxes(IPartCollsionHelper bch) { - bch.addBox( 6, 6, 11, 10, 10, 12 ); - bch.addBox( 6, 6, 12, 10, 10, 13 ); + bch.addBox( 6, 6, 11, 10, 10, 13 ); bch.addBox( 5, 5, 13, 11, 11, 14 ); bch.addBox( 4, 4, 14, 12, 12, 16 ); } diff --git a/parts/misc/PartInterface.java b/parts/misc/PartInterface.java index e0c92664..178a5c7f 100644 --- a/parts/misc/PartInterface.java +++ b/parts/misc/PartInterface.java @@ -110,10 +110,8 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISeg @Override public void getBoxes(IPartCollsionHelper bch) { - bch.addBox( 3, 3, 15, 13, 13, 16 ); - bch.addBox( 2, 2, 14, 14, 14, 15 ); - bch.addBox( 5, 5, 12, 11, 11, 13 ); - bch.addBox( 5, 5, 13, 11, 11, 14 ); + bch.addBox( 2, 2, 14, 14, 14, 16 ); + bch.addBox( 5, 5, 12, 11, 11, 14 ); } @Override diff --git a/parts/misc/PartStorageBus.java b/parts/misc/PartStorageBus.java index 09a1d247..93a4abb1 100644 --- a/parts/misc/PartStorageBus.java +++ b/parts/misc/PartStorageBus.java @@ -328,8 +328,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC { bch.addBox( 3, 3, 15, 13, 13, 16 ); bch.addBox( 2, 2, 14, 14, 14, 15 ); - bch.addBox( 5, 5, 12, 11, 11, 13 ); - bch.addBox( 5, 5, 13, 11, 11, 14 ); + bch.addBox( 5, 5, 12, 11, 11, 14 ); } @Override diff --git a/parts/p2p/PartP2PTunnel.java b/parts/p2p/PartP2PTunnel.java index 8500d436..ac3c370a 100644 --- a/parts/p2p/PartP2PTunnel.java +++ b/parts/p2p/PartP2PTunnel.java @@ -332,6 +332,8 @@ public class PartP2PTunnel extends PartBasicState @Override public void getBoxes(IPartCollsionHelper bch) { + bch.addBox( 5, 5, 12, 11, 11, 13 ); + bch.addBox( 3, 3, 13, 13, 13, 14 ); bch.addBox( 2, 2, 14, 14, 14, 16 ); } From 9ae63b42db91cebd2d6b9d17e3ee97c3689f33eb Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Thu, 10 Apr 2014 23:41:16 -0500 Subject: [PATCH 2/3] mark dirty, is not a thing! --- fmp/CableBusPart.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/fmp/CableBusPart.java b/fmp/CableBusPart.java index cc042b08..a4a6af0f 100644 --- a/fmp/CableBusPart.java +++ b/fmp/CableBusPart.java @@ -484,11 +484,6 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IReds cb.onInputsChanged( world, x, y, z, side, inputValues ); } - public void markDirty() - { - markForSave(); - } - @Override public void onInputChanged(World world, int x, int y, int z, ForgeDirection side, int inputValue) { From 922ade793cbc9cf7bfea24e6cb9ee7e520592d2b Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Mon, 14 Apr 2014 02:39:14 -0500 Subject: [PATCH 3/3] Fixed Bug: #0315 - game crashes when ME controller is placed at bedrock level --- client/render/blocks/RenderBlockController.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/client/render/blocks/RenderBlockController.java b/client/render/blocks/RenderBlockController.java index 15717a36..d1b30d5d 100644 --- a/client/render/blocks/RenderBlockController.java +++ b/client/render/blocks/RenderBlockController.java @@ -2,6 +2,7 @@ package appeng.client.render.blocks; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; +import net.minecraft.tileentity.TileEntity; import net.minecraft.world.IBlockAccess; import appeng.block.AEBaseBlock; import appeng.client.render.BaseBlockRender; @@ -19,9 +20,9 @@ public class RenderBlockController extends BaseBlockRender public boolean renderInWorld(AEBaseBlock blk, IBlockAccess world, int x, int y, int z, RenderBlocks renderer) { - boolean xx = world.getTileEntity( x - 1, y, z ) instanceof TileController && world.getTileEntity( x + 1, y, z ) instanceof TileController; - boolean yy = world.getTileEntity( x, y - 1, z ) instanceof TileController && world.getTileEntity( x, y + 1, z ) instanceof TileController; - boolean zz = world.getTileEntity( x, y, z - 1 ) instanceof TileController && world.getTileEntity( x, y, z + 1 ) instanceof TileController; + boolean xx = getTileEntity( world, x - 1, y, z ) instanceof TileController && getTileEntity( world, x + 1, y, z ) instanceof TileController; + boolean yy = getTileEntity( world, x, y - 1, z ) instanceof TileController && getTileEntity( world, x, y + 1, z ) instanceof TileController; + boolean zz = getTileEntity( world, x, y, z - 1 ) instanceof TileController && getTileEntity( world, x, y, z + 1 ) instanceof TileController; int meta = world.getBlockMetadata( x, y, z ); boolean hasPower = meta > 0; @@ -122,4 +123,11 @@ public class RenderBlockController extends BaseBlockRender renderer.uvRotateEast = renderer.uvRotateBottom = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0; return out; } + + private TileEntity getTileEntity(IBlockAccess world, int x, int y, int z) + { + if ( y >= 0 ) + return world.getTileEntity( x, y, z ); + return null; + } }