Integrated Dynamics

Integrated Dynamics

63M Downloads

Anvil-named variable card used in Programmer output permanently changes default labelling in Programmer and Labeller

markuskoeppen opened this issue ยท 2 comments

commented

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:

  1. Open a Labeller and rename an uninitialized variable card "Buggy".
  • This will also happen if you rename any card in an anvil.
  1. Open a Logic Programmer.
  2. Click on "Boolean" (or create another valid expression).
  3. Add the "Buggy" variable card to the output slot.
  4. (optional) Pull the variable card back into your inventory.
  5. Close the Logic Programmer.
  6. (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.
  7. (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:

  1. Open a Labeller. The name field immediately contains "Buggy".

Scenario 1a:

  1. Add a non-tampered variable card.
  2. The name field will change to the label of that variable if it has one, or remain at "Buggy".
  3. (optional) Change the name of the card. It works as expected.
  4. Remove the card and the name field reverts to "Buggy".

Scenario 1b:

  1. Add a vanilla stone sword renamed "Named".
  2. The name field will still read "Buggy".
  3. Change the name to "Newly Named" and click "Write".
  4. The item will be correctly called "Newly Named" while the name field reverts to "Buggy".

--

Scenario 2:

  1. Open a Logic Programmer.
  2. Create a valid expression.
  3. Add a non-tampered variable card to the output slot. The card in the output slot shows the name "Buggy".
  4. (optional) Use the built-in Labeller function. The card in the output slot still reads "Buggy".
  5. 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:

commented

Thanks for reporting!

commented

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...