Let's talk about doors
This commit is contained in:
parent
6b61a00bed
commit
63a1083e19
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user