Mojira Archive
MCM-1532

The loot table function "set_actor_id" no longer inherits the entity ID if omitting the "id" parameter

Partner Rank: 1

Partner Team Reporting: Starfish Studios

Verification builds: 1.18.10.20_rc1 - 1.18.30.04_rc2, 1.19.0.24_rc1

Summary:
The loot table function "set_actor_id" no longer inherits the entity ID when omitting the "id" parameter, causing the need to set an entity ID for it to drop a valid spawn egg.

Impact:
This issue causes loot tables using this function with entity ID omission to drop a default spawn egg that doesn’t spawn anything. Breaking several living contents that uses this function as a way of simplifying codes and avoiding multiple files, such as our Block Pets map.

Repro Steps:

  1. Create a loot table using the "set_actor_id" function and omitting the "id" parameter, just like this:
    {
      "pools": [
        {
          "rolls": 1,
          "entries": [
            {
              "type": "item",
              "name": "minecraft:spawn_egg",
              "weight": 1,
              "functions": [
                {
                  "function": "set_actor_id"
                }
              ]
            }
          ]
        }
      ]
    }
  1. Apply this loot table to an entity, then kill it. Or just download our Marketplace content 'Block Pets', then break some object entity (e.g. a bicycle).

Repro Rate: 3/3

Observed Results:
When killing the entity, it will drop a spawn egg called 'item.spawn_egg.name', which doesn’t spawn anything.

Expected Results:
It should properly drop the owning entity spawn egg.

Regression Builds:
Worked properly until 1.18.0.27_rc0 (Beta) and 1.18.2.03_rc2 hotfix. 1.18.10.20_rc1 broken it.

Unresolved

Jean Lucas

2022-04-17, 12:06 AM

2023-06-15, 10:45 PM

2

2

Future Release

-