mirror of
				https://github.com/SquidDev-CC/CC-Tweaked
				synced 2025-10-30 21:23:00 +00:00 
			
		
		
		
	Merge pull request #400 from SquidDev-CC/hotfix/redstone-propagation
Fix redstone not being propagated through solid blocks
This commit is contained in:
		| @@ -76,7 +76,7 @@ public abstract class TileComputerBase extends TileGeneric | |||||||
|         unload(); |         unload(); | ||||||
|         for( EnumFacing dir : EnumFacing.VALUES ) |         for( EnumFacing dir : EnumFacing.VALUES ) | ||||||
|         { |         { | ||||||
|             RedstoneUtil.propogateRedstoneOutput( getWorld(), getPos(), dir ); |             RedstoneUtil.propagateRedstoneOutput( getWorld(), getPos(), dir ); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -380,7 +380,7 @@ public abstract class TileComputerBase extends TileGeneric | |||||||
|         updateBlock(); |         updateBlock(); | ||||||
|         for( EnumFacing dir : EnumFacing.VALUES ) |         for( EnumFacing dir : EnumFacing.VALUES ) | ||||||
|         { |         { | ||||||
|             RedstoneUtil.propogateRedstoneOutput( getWorld(), getPos(), dir ); |             RedstoneUtil.propagateRedstoneOutput( getWorld(), getPos(), dir ); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -141,7 +141,7 @@ public class TileTurtle extends TileComputerBase | |||||||
|             // Just turn off any redstone we had on |             // Just turn off any redstone we had on | ||||||
|             for( EnumFacing dir : EnumFacing.VALUES ) |             for( EnumFacing dir : EnumFacing.VALUES ) | ||||||
|             { |             { | ||||||
|                 RedstoneUtil.propogateRedstoneOutput( getWorld(), getPos(), dir ); |                 RedstoneUtil.propagateRedstoneOutput( getWorld(), getPos(), dir ); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -68,9 +68,9 @@ public class RedstoneUtil | |||||||
|         return 0; |         return 0; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     public static void propogateRedstoneOutput( World world, BlockPos pos, EnumFacing side ) |     public static void propagateRedstoneOutput( World world, BlockPos pos, EnumFacing side ) | ||||||
|     { |     { | ||||||
|         // Propogate ordinary output |         // Propagate ordinary output | ||||||
|         IBlockState block = world.getBlockState( pos ); |         IBlockState block = world.getBlockState( pos ); | ||||||
|         BlockPos neighbourPos = pos.offset( side ); |         BlockPos neighbourPos = pos.offset( side ); | ||||||
|         IBlockState neighbour = world.getBlockState( neighbourPos ); |         IBlockState neighbour = world.getBlockState( neighbourPos ); | ||||||
| @@ -79,7 +79,7 @@ public class RedstoneUtil | |||||||
|             world.neighborChanged( neighbourPos, block.getBlock(), pos ); |             world.neighborChanged( neighbourPos, block.getBlock(), pos ); | ||||||
|             if( neighbour.getBlock().isNormalCube( neighbour, world, neighbourPos ) ) |             if( neighbour.getBlock().isNormalCube( neighbour, world, neighbourPos ) ) | ||||||
|             { |             { | ||||||
|                 world.notifyNeighborsOfStateExcept( neighbourPos, neighbour.getBlock(), side.getOpposite() ); |                 world.notifyNeighborsOfStateExcept( neighbourPos, block.getBlock(), side.getOpposite() ); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Daniel Ratcliffe
					Daniel Ratcliffe