If you use /blockdata to replace the name of a container while it is open, it will not update the name in the GUI.
Affects all kind of GUIs:
Entity | CustomName updates | Items update | Other affected |
---|---|---|---|
Container | ❌ | ✔ | - |
Container Minecart | ❌ | ✔ | - |
Villager | ❌ | - | Trading GUI |
Attachments
Comments 13
It's nothing to do with textures.
Does not work as it should. Intention means nothing when necessity is a factor.
@@unknown: @unknown used that example as a metaphor. He wanted to say if something changes in the background the foreground hasn't to change necessarily too.
Anyway, this is not a bug, but a feature request, please see: Minecraft Suggestions on Reddit.
Kumasasa the inventory of containers updates when using /blockdata so why not the name. There are so many reports where bugs are described that are the same from its structure, like the bug where you could not test for a thrown egg. But where is the difference to this bug?
Both bugs rely on the fact, that something works and something other not (with the egg an argument was that you could test for thrown snowballs, here it is that it updates the items), so please reopen this bug.
I'd like to mention that the solution to this is actually simple.
The reason why it doesn't "update" is because the constructor of the GUI only saves the current name as a string variable. If the entity/tile entity instance were stored instead, then a simple getCustomName call in the draw method would fix it. I guess this was a performance concern. But it isn't going to make a huge impact anyhow. It's only allocating a reference in memory, not a whole new object.
Or they could use a NBT listener, I think this already exists and then just set the new value for this variable
If I may ask, why is this marked as "won't fix"?
What is making you guys not want to fix it?
I have stated the fix. It's really simple. I understand performance may be a concern, but you only draw one screen at a time, and for it to fetch a single string every tick (as opposed to the current way of fetching the string upon opening the GUI, and only that one time) is not going to make any more impact than it does fetching a list of items every tick.
If you change a block's texture in the files, does it update? No, you have to have the game reload whatever was changed, in this case the chest GUI. Works as intended.