#make spawners work on custom light levels
1 messages · Page 1 of 1 (latest)
Do you mean to disable light to spawn limit ratio
so when there is light, it will still spawn?
i would preferably want to be able to disable them by placing torches
but can i change it so it will be like 1.17 and below
can you link any resources that would help me
uhm ok lmk when you have it ready
@EventHandler
public void onSpawnEven(SpawnerSpawnEvent e) {
e.setCancelled(true);
//force-spawn-mob
}
//forcespawnmob is where you find the coordinates of the block
by using e.getLocation();
you can get the location of the mob spawn
and spawn the mob next to it
using world.spawnEntity
@EventHandler
public void onSpawnEven(SpawnerSpawnEvent e) {
e.setCancelled(true);
//force-spawn-mob
e.getLocation();
Bukkit.getWorld(e.getSpawner().getCreatureTypeName()).spawnEntity(x, y, z, mob_name);
}
#getCreatureTypeName()
ohhh ok ill try that