#Custom entity's spawn egg

1 messages · Page 1 of 1 (latest)

dense ledge
#

I want to make the custom entity to drop it's spawn egg. Anyone know how to make it?

vast tree
dense ledge
#

Ok

#

Wait, where do i put this to

vast tree
# dense ledge Wait, where do i put this to

This is a loot_table, create a loot table and use the minecraft:loot component in your entity

{
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "item",
          "name": "minecraft:spawn_egg",
          "weight": 1,
          "functions": [
            {
              "function": "set_actor_id"
            }
          ]
        }
      ]
    }
  ]
}
dense ledge
#

Alright

shy perch
#

give me your custom entity's identifier

dense ledge
#

cpf:refrigerator_top_freezer_visual

shy perch
#

Put "cpf:refrigerator_top_freezer_visual_spawn_egg" instead of "minecraft:spawn_egg" if code above doesn't work

I never tried the code above before but I'm just saying this in case

dense ledge
#

I'll try

#

Minecraft:spawn_egg alone doesn't work

#

Doesn't work as well

shy perch
#

Yeah replace it with what I told you

#

And remove the "functions" thing

#
{
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "item",
          "name": "cpf:refrigerator_top_freezer_visual_spawn_egg",
          "weight": 1
        }
      ]
    }
  ]
}
dense ledge
#

Doesn't work as well. It doesn't seems to be able to detect the spawn egg at all, but it is available in-game.

#

Do i have to create separate item behaviour for the spawn egg, since the spawn egg only available in the entity resource pack.

dense ledge
#

I solved the thingy

#

The loot table method doesn't work, so i use command.