#make spawners work on custom light levels

1 messages · Page 1 of 1 (latest)

merry canyon
#

is this possible with plugins so theres dungeon plugin but 1.18 changed spawning light level so is there a way to revert it

young plank
#

Do you mean to disable light to spawn limit ratio

#

so when there is light, it will still spawn?

merry canyon
#

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

young plank
#

yea but you can disable it by mining the spawner

#

and there is a way

merry canyon
#

can you link any resources that would help me

young plank
#

i have one

#

im making it rn

merry canyon
#

uhm ok lmk when you have it ready

young plank
#
    @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

merry canyon
#

will it get the entity thats in the spawner

#

is there a way to get that

young plank
#
    @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()

merry canyon
#

ohhh ok ill try that

young plank
#

remember to put implements listener after the class name

#

unless it is main claiss

#

class*