-
Bug
-
Resolution: Cannot Reproduce
-
Major
-
None
-
None
When i tried to both change contents and display name of chest, i found, that inventory change override name change. Example code:
Chest chest = (Chest) event.getBlock().getState(); Inventory blockInventory = chest.getSnapshotInventory(); blockInventory.clear(); blockInventory.addItem(new ItemStack(Minecraft.STONE)); chest.update(true, false); chest = (Chest) event.getBlock().getState(); chest.setCustomName("123"); chest.update(true, false);
I tried to change order of invocation or event schedule some of this actions on different ticks, but the situations remains the same. Only way to change chest name in this example, is to remove inventory modification.