0

I'm trying to set up an afk xp farm for my server. And I want XP bottles to spawn from a spawner.

I've tried this so far

/minecraft:give @s minecraft:spawner{BlockEntityTag:{Delay:1,MinSpawnDelay:1,MaxSpawnDelay:1,SpawnData:{id:"minecraft:experience_orb",Value:7},SpawnPotentials:[{Weight:1,Entity:{id:"minecraft:experience_bottle",Value:7}}]}}

It does give me a spawner, but nothing spawns.

1
  • Maybe you could use falling sand blocks?
    – vinzzz001
    Nov 16 at 9:54

2 Answers 2

0

I did a little testing in a creative world, and a little research and I found something that works.

This is the give command that spawned XP orbs consistently

/give @s spawner{BlockEntityTag:{SpawnCount:10,MinSpawnDelay:20,MaxSpawnDelay:60,MaxNearbyEntities:32,RequiredPlayerRange:8,SpawnData:{entity:{id:"minecraft:experience_orb",Value:16}}}} 1

I am baffled as to why your command doesn't work. If anyone knows why, please comment on the question/answer for future readers.

0

An answer to why the original command didn't work:

  1. Catn't run the give command with minecraft: in front.

  2. The SpawnData tag requires an entity, so instead of:

SpawnData:{id:"minecraft:experience_orb",Value:7}

You need this:

SpawnData:{entity:{id:"minecraft:experience_orb",Value:7}}

This will give a spawner that spawns experience orbs. If you change it to experiance_bottle it will drop bottles instead.


The last tag SpawnPotentials doesn't seem to have any effect on the spawner. Removing the entire tag doesn't change anything about the end product.

Edited command:

/give @s minecraft:spawner{BlockEntityTag:{Delay:1,MinSpawnDelay:1,MaxSpawnDelay:1,SpawnData:{entity:{id:"minecraft:experience_orb",Value:7}}}}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .