diff --git a/src/main/java/me/parsell/glowstonewire/common/GlowstoneWireBlock.java b/src/main/java/me/parsell/glowstonewire/common/GlowstoneWireBlock.java index 3e10ea1..b032644 100644 --- a/src/main/java/me/parsell/glowstonewire/common/GlowstoneWireBlock.java +++ b/src/main/java/me/parsell/glowstonewire/common/GlowstoneWireBlock.java @@ -7,7 +7,6 @@ import com.google.common.collect.Maps; import net.minecraft.block.Block; import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; import net.minecraft.block.ShapeContext; import net.minecraft.block.enums.WireConnection; import net.minecraft.entity.player.PlayerEntity; @@ -87,7 +86,6 @@ public class GlowstoneWireBlock extends Block{ state = state.with(WIRE_CONNECTION_EAST, determineConnection(world, pos, Direction.EAST)); if(world.getBlockState(pos.offset(Direction.WEST)).isOf(this)) state = state.with(WIRE_CONNECTION_WEST, determineConnection(world, pos, Direction.WEST)); - System.out.println(state.toString()); return state; } @@ -145,6 +143,7 @@ public class GlowstoneWireBlock extends Block{ // Set to blank state if(hasConnection(state)) { world.setBlockState(pos, this.getDefaultState()); + world.updateNeighborsAlways(pos, this); return ActionResult.SUCCESS; } @@ -161,6 +160,7 @@ public class GlowstoneWireBlock extends Block{ // This decides what I should look like whens something around me happens (use this for wire connection) @Override public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom) { + System.out.println(world.getBlockState(posFrom).toString()); if (direction != Direction.DOWN && direction != Direction.UP) state = state.with(DIRECTION_TO_WIRE_CONNECTION_PROPERTY.get(direction), determineConnection(world, pos, direction)); return state;