diff --git a/patchwork.md b/patchwork.md index 465fe5822..592354325 100644 --- a/patchwork.md +++ b/patchwork.md @@ -82,3 +82,11 @@ Use tags to check if something is a dye We half did this already, just needed to change a couple of checks. Closes #541. ``` + +``` +6cee4efcd3610536ee74330cd728f7371011e5a8 +Fix incorrect open container check + +Was this always broken, or did it happen in a Minecraft update? Don't +know, but it's a very silly mistake either way. Fixes #544 +``` diff --git a/src/main/java/dan200/computercraft/shared/turtle/core/TurtlePlayer.java b/src/main/java/dan200/computercraft/shared/turtle/core/TurtlePlayer.java index 23e86ad76..41911b119 100644 --- a/src/main/java/dan200/computercraft/shared/turtle/core/TurtlePlayer.java +++ b/src/main/java/dan200/computercraft/shared/turtle/core/TurtlePlayer.java @@ -54,10 +54,9 @@ public final class TurtlePlayer extends FakePlayer { } private void setState(ITurtleAccess turtle) { - if (this.currentScreenHandler != null) { + if (this.currentScreenHandler != playerScreenHandler) { ComputerCraft.log.warn("Turtle has open container ({})", this.currentScreenHandler); - this.currentScreenHandler.close(this); - this.currentScreenHandler = null; + closeCurrentScreen(); } BlockPos position = turtle.getPosition();