}
public void replaceProtections() {
Block block = state.getBlock();
if(state.getData() instanceof Door) {
Door door = (Door)state.getData();
Block topHalf;
Block bottomHalf;
if(door.isTopHalf()) {
topHalf = block;
bottomHalf = block.getRelative(BlockFace.DOWN);
} else {
bottomHalf = block;
topHalf = block.getRelative(BlockFace.UP);
}
door.setTopHalf(true);
topHalf.setTypeIdAndData(state.getTypeId(), state.getData().getData(), false);
door.setTopHalf(false);
bottomHalf.setTypeIdAndData(state.getTypeId(), state.getData().getData(), false);
} else if(state instanceof Sign) {
block.setTypeIdAndData(state.getTypeId(), state.getData().getData(), false);
Sign sign = (Sign)block.getState();
int i = 0;