Let's talk about doors

This commit is contained in:
Brady 2018-09-17 17:46:23 -05:00
parent 6b61a00bed
commit 63a1083e19
No known key found for this signature in database
GPG Key ID: 73A788379A197567

View File

@ -81,10 +81,10 @@ public interface MovementHelper extends ActionCosts, Helper {
return false; return false;
} }
if (block instanceof BlockDoor || block instanceof BlockFenceGate) { if (block instanceof BlockDoor || block instanceof BlockFenceGate) {
if (block == Blocks.IRON_DOOR) { // Because there's no nice method in vanilla to check if a door is openable or not, we just have to assume
return false; // that anything that isn't an iron door isn't openable, ignoring that some doors introduced in mods can't
} // be opened by just interacting.
return true; // we can just open the door return block != Blocks.IRON_DOOR;
} }
if (block instanceof BlockSnow || block instanceof BlockTrapDoor) { if (block instanceof BlockSnow || block instanceof BlockTrapDoor) {
// we've already checked doors // we've already checked doors