1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-08-30 09:07:55 +00:00

Fix incorrect open container check

This commit is contained in:
Merith-TK
2021-02-22 03:22:39 -08:00
parent d483a91459
commit 79534e5630
2 changed files with 10 additions and 3 deletions

View File

@@ -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
```

View File

@@ -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();