Anvil-named variable card used in Programmer output permanently changes default labelling in Programmer and Labeller
markuskoeppen opened this issue ยท 2 comments
Issue type:
- ๐ Bug
Short description:
If you write on an anvil-named variable card in the Logic Programmer, the item's anvil name will be the default value in the Labeller and will be used as the preview in the Logic Programmer from then on.
Steps to reproduce the problem:
Creating a bugged state:
- Open a Labeller and rename an uninitialized variable card "Buggy".
- This will also happen if you rename any card in an anvil.
- Open a Logic Programmer.
- Click on "Boolean" (or create another valid expression).
- Add the "Buggy" variable card to the output slot.
- (optional) Pull the variable card back into your inventory.
- Close the Logic Programmer.
- (optional) Continue to use Integrated Dynamics as much as you like, as long as you don't add another anvil-named variable card to the Logic Programmer's output field, changing "Buggy" to something else.
- (optional) Reboot the server.
Once in a bugged state, the world remains in a bugged state. There is no known way to revert to the default behavior.
--
Scenario 1:
- Open a Labeller. The name field immediately contains "Buggy".
Scenario 1a:
- Add a non-tampered variable card.
- The name field will change to the label of that variable if it has one, or remain at "Buggy".
- (optional) Change the name of the card. It works as expected.
- Remove the card and the name field reverts to "Buggy".
Scenario 1b:
- Add a vanilla stone sword renamed "Named".
- The name field will still read "Buggy".
- Change the name to "Newly Named" and click "Write".
- The item will be correctly called "Newly Named" while the name field reverts to "Buggy".
--
Scenario 2:
- Open a Logic Programmer.
- Create a valid expression.
- Add a non-tampered variable card to the output slot. The card in the output slot shows the name "Buggy".
- (optional) Use the built-in Labeller function. The card in the output slot still reads "Buggy".
- Remove the variable card from the output slot. It is now correctly named.
Expected behaviour:
Scenario 1:
The name field of the Labeller is empty upon opening.
Scenario 1a:
Removing the card resets the name field to an empty string.
Scenario 1b:
The name field changes to "Named" upon adding the sword.
The name field stays at "Newly Named" upon clicking "Write".
Both is the default behavior in an unbugged state.
Scenario 2:
The consistent behavior is to always show "Variable Card" as the output slot's item title, independent of current or prior naming using ID tools.
Versions:
- This mod: 1.22.0
- Minecraft: 1.20.1
- Forge: 47.3.0
First found in ATM9 NF, validated in raw forge install.
Log file:
Bonus commentary, view from the outside:
A variable card can have both an Integrated Dynamics internal name and have an anvil name written over it.
The item will show the anvil name instead of the ID name on the item, though not in the parent documentation on inheriting variable cards.
It will revert to the ID name once the anvil name is removed.
If there is an event to be caught when an item is renamed (e.g. using an anvil or another mod), there might be a possibility to suppress the renaming and change the ID name instead, making anvils and Labellers compatible.
In that case, there should also be a check in the Logic Programmer to check whether "virgin" variable cards have already been renamed and apply it as an ID name for the newly created variable instead.
If there is no rename event to be caught, the concept will be a bit more complicated...