Skip to content

Misleading names for some NBT operators confuse players #1520

@Jack-McKalling

Description

@Jack-McKalling

Issue type:

  • ➕ Feature request

Short description:

Some NBT operators have misleading namespaced IDs, they don't represent what the operators actually do. Since these are displayed to the user as the operator names in the LP, it shows a conflict between name and description which is confusing:

    "operator.integrateddynamics.nbt.from_short.info": "Create an NBT Short tag from the given Integer value",
    "operator.integrateddynamics.nbt.from_byte.info": "Create an NBT Byte tag from the given Integer value",
    "operator.integrateddynamics.nbt.from_float.info": "Create an NBT Float tag from the given Double value",
    "operator.integrateddynamics.nbt.from_byte_list.info": "Create an NBT Byte Array tag from the given Integer List value",

They all take one value of a certain type and output an NBT tag of another type, but these all use the pattern "from_ output" which makes no sense. There are others that also follow the "from_something" pattern, but they are actually correct and reflect the input type rather than the output one. The above ones are (if I'm not mistaken) all those that are misleading.

Discovered from PR #1516

Steps to reproduce the problem:

  1. Open a Logic Programmer
  2. Search for operators by typing from
  3. Operator names such as NBT.from_float can be selected from here
  4. But it doesn't produce NBT from a float value, it produces an NBT float, from a double

Expected behaviour:

Operators like these should probably be renamed to for instance:

  • operator.integrateddynamics.nbt.short_from_int (instead of from_short)
  • operator.integrateddynamics.nbt.byte_from_int (instead of from_byte)
  • operator.integrateddynamics.nbt.float_from_double (instead of from_float)
  • operator.integrateddynamics.nbt.bytes_from_int_list (instead of from_byte_list)

Versions:

  • Core: 1.26.1
  • ComCaps: 2.9.11
  • Dynamics: 1.27.2
  • Minecraft: 1.21.1
  • Mod loader version: NeoForge 21.1.174

Also affects MC 1.19 and 1.20 branches.

Additional info:

I'm not 100% certain whether renaming these namespaced IDs is "safe". How do world upgrade paths or save files work, when existing variable cards are referring to these operators? Will these break or will/can they automatically update?

Log file:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Accepted (To Do)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions