Sync tile entity when book texture changes

This commit is contained in:
Electroblob77
2020-05-16 22:24:14 +01:00
parent 594c546f11
commit 94a17a63c1
2 changed files with 8 additions and 1 deletions
@@ -139,7 +139,9 @@ public class ContainerBookshelf extends Container {
@Override
public void putStack(ItemStack stack){
boolean statusChanged = this.getStack().isEmpty() != stack.isEmpty();
boolean statusChanged = this.getStack().isEmpty() != stack.isEmpty()
|| BlockBookshelf.getBookItems().indexOf(this.getStack().getItem())
!= BlockBookshelf.getBookItems().indexOf(stack.getItem());
super.putStack(stack);
if(statusChanged) ContainerBookshelf.this.onSlotChanged();
}