From a10bb86ef6f1877d2884324888f797390c3729cf Mon Sep 17 00:00:00 2001 From: BluSunrize Date: Mon, 16 Nov 2015 01:14:05 +0100 Subject: [PATCH] Fixed Broken Breaker Switch (hahaha, get it?) and updated the cahngelog --- changelog.md | 25 +++++++++++++++++++ .../blocks/metal/BlockMetalDevices2.java | 16 +++++++----- .../metal/TileEntityRedstoneBreaker.java | 6 +++++ 3 files changed, 41 insertions(+), 6 deletions(-) diff --git a/changelog.md b/changelog.md index 31372e707a..5ea56a00a2 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,28 @@ +#####Version 0.6.2 +- added wood-covered scaffolding +- added aluminium decoration blocks (fence, scaffold) +- added a creative capacitor (thanks malte0811) +- added the Vault-Tec shader +- added the redstone controlled breaker switch +- added dimension black+whitelists to the MineralMixes. Not used by IE but accessible for Minetweaker +- reworked recycling on the arc furnace, uses recipe profiling, multithreading and fancy thing (cheers, AtomicBlom) +- reworked the Excavator's Minetweaker integration. Dependent on MT 3.0.10b or later +- changed hemp->string recipe to be only a third as effective +- changed the manual on minerals, exchanged tables for proper pages for each mineral +- fixed dupe bug +- fixed NPE in eventhandler (thanks cobra) +- fixed wire offset on floodlight and lantern (thanks cobra) +- fixed ghost arms on wooden pole (thanks cobra) +- fixed Raytracing (thanks malte0811 & cobra) +- fixed broken Miló shader +- fixed light-opacity for some solid blocks +- fixed use+recipe keybinds in the NEI handler +- fixed table drawing in the manual, closes #646 +- fixed getEnergyStored on machines (thanks cobra) +- fixed fluid mechanics on machines (thanks cobra) +- fixed lighting on particles + + #####Version 0.6.1 - BUILT - added sneak-hammering to change opposite side of a pump (thanks cobra) - added config to disable GUI rescaling in the manual diff --git a/src/main/java/blusunrize/immersiveengineering/common/blocks/metal/BlockMetalDevices2.java b/src/main/java/blusunrize/immersiveengineering/common/blocks/metal/BlockMetalDevices2.java index 2fbf2c7f06..4405afc33c 100644 --- a/src/main/java/blusunrize/immersiveengineering/common/blocks/metal/BlockMetalDevices2.java +++ b/src/main/java/blusunrize/immersiveengineering/common/blocks/metal/BlockMetalDevices2.java @@ -805,12 +805,16 @@ public void onNeighborChange(IBlockAccess world, int x, int y, int z, int tileX, public void onNeighborBlockChange(World world, int x, int y, int z, Block neighbor) { TileEntity tile = world.getTileEntity(x, y, z); - if(tile instanceof TileEntityRedstoneBreaker) + if(!world.isRemote && tile instanceof TileEntityRedstoneBreaker) { + boolean RS = !world.isBlockIndirectlyGettingPowered(x,y,z); boolean b = ((TileEntityRedstoneBreaker)tile).active; - ((TileEntityRedstoneBreaker)tile).active = world.isBlockIndirectlyGettingPowered(x,y,z); - if(b!=((TileEntityRedstoneBreaker)tile).active) + ((TileEntityRedstoneBreaker)tile).active = RS; + if(b!=RS) + { + tile.markDirty(); ImmersiveNetHandler.INSTANCE.resetCachedIndirectConnections(); + } } } @@ -907,7 +911,7 @@ public void onNeighborBlockChange(World world, int x, int y, int z, Block neighb public int isProvidingWeakPower(IBlockAccess world, int x, int y, int z, int side) { TileEntity te = world.getTileEntity(x, y, z); - if(te instanceof TileEntityBreakerSwitch) + if(te instanceof TileEntityBreakerSwitch && !(te instanceof TileEntityRedstoneBreaker)) { TileEntityBreakerSwitch breaker = (TileEntityBreakerSwitch)te; boolean power = (breaker.active&&!breaker.inverted) || (!breaker.active&&breaker.inverted); @@ -919,7 +923,7 @@ public int isProvidingWeakPower(IBlockAccess world, int x, int y, int z, int sid public int isProvidingStrongPower(IBlockAccess world, int x, int y, int z, int side) { TileEntity te = world.getTileEntity(x, y, z); - if(te instanceof TileEntityBreakerSwitch) + if(te instanceof TileEntityBreakerSwitch&& !(te instanceof TileEntityRedstoneBreaker)) { TileEntityBreakerSwitch breaker = (TileEntityBreakerSwitch)te; int powerSide = breaker.sideAttached>0?breaker.sideAttached-1:breaker.facing; @@ -936,7 +940,7 @@ public boolean canProvidePower() @Override public boolean canConnectRedstone(IBlockAccess world, int x, int y, int z, int side) { - if(world.getBlockMetadata(x, y, z)==META_breakerSwitch) + if(world.getBlockMetadata(x, y, z)==META_breakerSwitch || world.getBlockMetadata(x, y, z)==META_redstoneBreaker) return super.canConnectRedstone(world, x, y, z, side); return false; } diff --git a/src/main/java/blusunrize/immersiveengineering/common/blocks/metal/TileEntityRedstoneBreaker.java b/src/main/java/blusunrize/immersiveengineering/common/blocks/metal/TileEntityRedstoneBreaker.java index d840d969b5..7c7bf32ffd 100644 --- a/src/main/java/blusunrize/immersiveengineering/common/blocks/metal/TileEntityRedstoneBreaker.java +++ b/src/main/java/blusunrize/immersiveengineering/common/blocks/metal/TileEntityRedstoneBreaker.java @@ -13,6 +13,12 @@ protected boolean canTakeHV() return true; } + @Override + public boolean allowEnergyToPass(Connection con) + { + return !worldObj.isBlockIndirectlyGettingPowered(xCoord,yCoord,zCoord); + } + @Override public Vec3 getRaytraceOffset(IImmersiveConnectable link) {