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;
}
if (block instanceof BlockDoor || block instanceof BlockFenceGate) {
if (block == Blocks.IRON_DOOR) {
return false;
}
return true; // we can just open the door
// Because there's no nice method in vanilla to check if a door is openable or not, we just have to assume
// 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 block != Blocks.IRON_DOOR;
}
if (block instanceof BlockSnow || block instanceof BlockTrapDoor) {
// we've already checked doors