EntityJS change mob biome spawns and height


Ticket #A311A43D💬 37 â€¢ 1.20.1 â€¢ ForgeView on Discord 🡵

Aaby 

I want help regarding adding mob biome spawns and changing at what height the mob spawns in this is a ticket continuation from a another thread @LiopyuAlt
EntityJSEvents.biomeSpawns(event => {
    //Adds a spawn to the given entity type in the given biomes
    event.addSpawn('alexscaves:gloomoth', ['lunarnether:outrocks'], 20, 3, 5)
    event.addSpawn('alexscaves:corrodent', ['lunarnether:outrocks'], 120, 3, 5)
    event.addSpawn('alexscaves:trilocaris', ['lunarnether:outrocks'], 20, 3, 5)

})

EntityEvents.checkSpawn('alexscaves:corrodent', event => {
    if (event.type != "NATURAL") return
    if (event.level.dimension == 'steamsmith:the_nether' && event.entity.block.y < 141) {
        event.success(false)
    }
})
so right where we left off
it doesnt seem to work apparently

LiopyuAlt 

explain the issue for new people who may want to help

Aaby 

sure one sec

LiopyuAlt 

by modifying your post description please

Aaby 

should do

LiopyuAlt 

and have you tried the script yet?
↶ Replying to LiopyuAlt : and have you tried the script yet?

Aaby 

yup
↶ Replying to Aaby : ```EntityJSEvents.biomeSpawns(event => { //Adds a spawn to the given entity type in the given biomes event.addSpawn('alexscaves:gloomoth', …

Aaby 

these were the last changes

Aaby 

are these alexscaves mobs just weird?

Aaby 

cus i feel like this shouldnt really take all this work 😭

Aaby 

i was really just expecting it to work off of the example scripts but oh well

LiopyuAlt 

remove the checkspawn event and see if they'll spawn at all
have they ever spawned in the nether in your testing?
↶ Replying to LiopyuAlt : have they ever spawned in the nether in your testing?

Aaby 

[View image.png]

↶ Replying to LiopyuAlt : remove the checkspawn event and see if they'll spawn at all

Aaby 

yup can confirm

Aaby 

removing the checkspawn spawns them in
but at very odd y levels thats why i want to shift them up

LiopyuAlt 

ok good, then invert the "<" again ig
its something to do with that if statement, i would also console.log(event.type) and make sure its "NATURAL"
↶ Replying to LiopyuAlt : its something to do with that if statement, i would also console.log(event.type) and make sure its "NATURAL"

Aaby 

[View image.png]

Aaby 

it shows this but
it doesnt spawn now

LiopyuAlt 

good, now do the same for event.level.dimension and event.entity.block.y
then make sure your conditions are correct

Aaby 

oh wait
↶ Replying to LiopyuAlt : good, now do the same for `event.level.dimension` and `event.entity.block.y`

Aaby 

[View image.png]

Aaby 

one did spawn but it did not really respect the conditions

Aaby 

or i am not even sure if these guys instantly dig down when they spawn??

Aaby 

so hard to tell

Aaby 

liopyu if you dont mind, are you able to test this on your own? you would really just need 2 mods "lunar nether" and alexs caves ofc

Aaby 

i just wanna make sure its not me 😭

Aaby 

only if you can btw

Aaby 

ah i see why they always spawn there

Aaby 

i think in the nether mob spawning always require them to be under a roof or something?