Attached ascending rails to the block they're ascending towards, in addition to the block below them.

This commit is contained in:
TomyLobo
2013-11-17 22:03:37 +01:00
parent b6ab34f23b
commit 3fa9a4e309
2 changed files with 22 additions and 4 deletions

View File

@ -766,6 +766,19 @@ public class EditSession {
walked.addFirst(upperBlock);
}
}
break;
case BlockID.MINECART_TRACKS:
case BlockID.POWERED_RAIL:
case BlockID.DETECTOR_RAIL:
case BlockID.ACTIVATOR_RAIL:
// Here, rails are hardcoded to be attached to the block below them.
// They're also attached to the block they're ascending towards via BlockType.getAttachment.
BlockVector lowerBlock = current.add(0, -1, 0).toBlockVector();
if (blocks.contains(lowerBlock) && !walked.contains(lowerBlock)) {
walked.addFirst(lowerBlock);
}
break;
}
final PlayerDirection attachment = BlockType.getAttachment(type, data);