mojira.dev
MC-91364

Mob loot cannot be specified for small magma cube and big/medium slime

The bug

Mob loot cannot be specified for small magma cube and big/medium slime.

In jar there is only one slime.json and one magma_cube.json file that contains loot for only big/medium magma cube and small slime.

Loot tables should handle something like:

"conditions": [
                {
                    "condition": "self_entitydata",
                    "variable": "Size",
                    "value": "1"
                }
            ]

and could handle something like bigger than/lower than

"conditions": [
                {
                    "condition": "self_entitydata",
                    "variable": "OnFire",
                    "value": ">0"
                }
            ]

Comments 10

As we are in slimes/magma cubes topic, would be nice to set amount of smaller slimes from bigger one by doing something like this:

{
    "pools": [
        {
            "rolls": 1,
            "entries": [
                {
                    "type": "item",
                    "name": "minecraft:slime_ball",
                    "weight": 1,
                    "functions": [
                        {
                            "function": "set_count",
                            "count": {
                                "min": 0,
                                "max": 2
                            }
                        },
                        {
                            "function": "looting_enchant",
                            "count": {
                                "min": 0,
                                "max": 1
                            }
                        }
                    ],
                    "conditions": [
                        {
                            "condition": "self_entitydata",
                            "variable": "Size",
                            "value": "0"
                        }
                    ]
                }
            ]
        },
        {
            "rolls": 1,
            "entries": [
                {
                    "type": "summon",
                    "name": "Slime",
                    "weight": 1,
                    "functions": [
                        {
                            "function": "set_count",
                            "count": {
                                "min": 1,
                                "max": 4
                            }
                        },
                        {
                            "function": "set_nbt",
                            "tag": "{Size:1}"
                        }
                    ],
                    "conditions": [
                        {
                            "condition": "self_entitydata",
                            "variable": "Size",
                            "value": "2"
                        }
                    ]
                }
            ]
        },
        {
            "rolls": 1,
            "entries": [
                {
                    "type": "summon",
                    "name": "Slime",
                    "weight": 1,
                    "functions": [
                        {
                            "function": "set_count",
                            "count": {
                                "min": 1,
                                "max": 4
                            }
                        },
                        {
                            "function": "set_nbt",
                            "tag": "{Size:0}"
                        }
                    ],
                    "conditions": [
                        {
                            "condition": "self_entitydata",
                            "variable": "Size",
                            "value": "1"
                        }
                    ]
                }
            ]
        }
    ]
}
{
	"function":"set_nbt",
	"tag":"{Size:1}"
}

Has nothing to do with loot tables anymore and this is also a suggestion.

Why this is invalid? Giving a proposition of fixing a bug do not cause it to be invalid. Silverfish doesn't drop anything and it have got a loot table. Why there is no loot table for big/medium slime and for small magma cube?
Reopen please.

I feel like a simple resolution would be to do it like sheep, e.g. have a magma_cube folder that contains [size0.json, size1.json, size2.json, size3.json].

Brian, but a simpler doesn't mean better. Fixing it by something like

"conditions": [
                        {
                            "condition": "self_entitydata",

gives ability to specify mob loot for baby mobs, like baby cow etc:

"conditions": [
                        {
                            "condition": "self_entitydata",
                            "variable": "isBaby",
                            "value": "1b"
                        }
                    ]

(I also note that you can explicitly apply

DeathLootTable:"minecraft:entities/magma_cube"

to a size0 magma cube and it does work.)

Is this still an issue in the latest snapshot 16w44a? If so please update the affected versions.

This is an automated comment on any open or reopened issue with out-of-date affected versions.

This should be possible to fix in Minecraft 1.14 now with the new additions to the loot table. For example, you could add this condition to the magma cube loot table and it would then be able to be applied Magma Cube's of all sizes rather than conditionally to medium and large in the code

"conditions": [
  {
    "condition": "inverted",
     "term": {
       "condition": "entity_properties",
       "entity": "this",
       "predicate": {
         "type": "minecraft:magma_cube",
         "nbt": "{Size:0}"
       }
     }
  }
]

Irbis

(Unassigned)

Confirmed

Low

Loot tables

loot, loot-table, magma_cube, slime

Minecraft 15w43c, Minecraft 15w44a, Minecraft 15w44b, Minecraft 15w45a, Minecraft 15w46a, ..., 1.14.4, 19w37a, 1.15 Pre-release 4, 20w06a, 21w16a

22w14a

Retrieved