CreatureSpawner for non-living entity types broken in 1.5.2

Discussion in 'Plugin Development' started by MoonStorm, May 30, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    MoonStorm

    Anything's changed? The following code used to work:

    Code:
         
    worldBlock.setType(Material.MOB_SPAWNER);
    BlockState genericBlockState = worldBlock.getState();
    ((CreatureSpawner)genericBlockState).setSpawnedType(EntityType.PRIMED_TNT);
    genericBlockState.update();
    
    Now all it does is to create the spawner, and I can see it "attempting" to create the entity, but nothing happens. Any ideas?

    Normal mobs still work though.
     
  2. Offline

    MoonStorm

    Actually, all "non-living" entities appear to be affected. Tried with arrows, boats, minecarts, etc.
     
  3. Offline

    ZeusAllMighty11 Retired Staff

    You can't spawn all entities from spawners like that.

    Only animals and monsters work that way, AFAIK. using the code right now and it works fine
     
  4. Offline

    MoonStorm

    Prior to 1.5, the same code was working fine for primed tnt for example.
     
Thread Status:
Not open for further replies.

Share This Page