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
This commit is contained in:
SquidDev 2020-09-24 17:47:30 +01:00
parent 6f868849ab
commit 6cee4efcd3
1 changed files with 2 additions and 3 deletions

View File

@ -55,11 +55,10 @@ private static GameProfile getProfile( @Nullable GameProfile profile )
private void setState( ITurtleAccess turtle )
{
if( openContainer != null )
if( openContainer != container )
{
ComputerCraft.log.warn( "Turtle has open container ({})", openContainer );
openContainer.onContainerClosed( this );
openContainer = null;
closeContainer();
}
BlockPos position = turtle.getPosition();