fix inventory tick not properly fixing blank slates
This commit is contained in:
parent
5da04fedeb
commit
b27206ce47
1 changed files with 2 additions and 4 deletions
|
@ -44,16 +44,14 @@ public class ItemSlate extends BlockItem implements DataHolderItem {
|
|||
|
||||
@Override
|
||||
public boolean onEntityItemUpdate(ItemStack stack, ItemEntity entity) {
|
||||
var tag = stack.getTagElement("BlockEntityTag");
|
||||
if (tag != null && tag.isEmpty())
|
||||
if (!hasPattern(stack))
|
||||
stack.removeTagKey("BlockEntityTag");
|
||||
return super.onEntityItemUpdate(stack, entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inventoryTick(ItemStack pStack, Level pLevel, Entity pEntity, int pSlotId, boolean pIsSelected) {
|
||||
var tag = pStack.getTagElement("BlockEntityTag");
|
||||
if (tag != null && tag.isEmpty())
|
||||
if (!hasPattern(pStack))
|
||||
pStack.removeTagKey("BlockEntityTag");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue