Mob Spawners In Structures

Started by JustGameIn on

Topic category: Advanced modding

Joined Jun 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Mob Spawners In Structures

I created a structure and I added in a witch spawner but when it spawns into the world, it turns into a pig spawner. I also changed the metadata of the spawner in the code but it still does not work.

 k + 5), Block.getBlockById(52).getStateFromMeta(66), 3);

 

Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The mob that the spawner
Sun, 06/11/2017 - 13:11

The mob that the spawner spawns is not defined by its metadata. It is actually stored in its TileEntity.
You actually need to get the TileEntity, get its instance of MobSpawnerBaseLogic and set string name of your desired entity using MobSpawnerBaseLogic#setEntityName()

Joined Mar 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
can you explain it a little…
Sun, 07/15/2018 - 17:01

can you explain it a little bit better.

i tried a couple of things but they didn't seem to work...

i know a bit of coding.