#how to make zombies appear during the day, and how do I make them appear together
34 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
@restive sun do you know how spawning rules work? i have never dealt with it
already on it 
🐐

biel do you want to completely replace the spawns or just add them during day
just add
aight this should be easy with the EntityJS spawn placement event then https://github.com/liopyu/EntityJS/wiki/Spawn-Control#:~:text=to take effect!-,Example of spawnPlacement,-The following example
ok
you'll probably want the "or" predicate
hmm, check is it is day and return true?
EntityJSEvents.spawnPlacement(event => {
/**
* @param replace Replaces the given entity type's spawn rules
* Ensure zombies spawn everywhere with no restrictions.
*/
event.replace('minecraft:zombie', 'no_restrictions', 'world_surface', (entitypredicate, levelaccessor, spawntype, blockpos, randomsource) => {
return true;
});
});```
he is saying that EntityJSEvents was not defined, is this documentation suitable for 1.20.1?
hmm but vanilla zombie checks might include other stuff like if it is not under water or something?
you need to install EntityJS mod
oh
it is a KubeJS Addon
sorry I'm new to this
I will test
yeah im trying to recreate it
thought i may or may not have to push an update so you can get the zombie in question because right now you can get the entity type but not the actual entity 
though you may not even need it tbh
cause all it is is this for zombie java public static boolean checkMonsterSpawnRules(EntityType<? extends Monster> pType, ServerLevelAccessor pLevel, MobSpawnType pSpawnType, BlockPos pPos, RandomSource pRandom) { return pLevel.getDifficulty() != Difficulty.PEACEFUL && isDarkEnoughToSpawn(pLevel, pPos, pRandom) && checkMobSpawnRules(pType, pLevel, pSpawnType, pPos, pRandom); }
@median wraith try this in startup js let Monster = Java.loadClass("net.minecraft.world.entity.monster.Monster") let Mob = Java.loadClass("net.minecraft.world.entity.Mob") let Difficulty = Java.loadClass("net.minecraft.world.Difficulty") EntityJSEvents.spawnPlacement(event => { event.replace('minecraft:zombie', "on_ground", "motion_blocking_no_leaves", (entityType, levelAccessor, spawntype, blockpos, randomsource) => { let level = levelAccessor.level return level.getDifficulty() != Difficulty.PEACEFUL && (Monster.isDarkEnoughToSpawn(level, blockpos, randomsource) || (!Monster.isDarkEnoughToSpawn(level, blockpos, randomsource) && level.isDay())) && Mob.checkMobSpawnRules(entityType, level, spawntype, blockpos, randomsource); }); }); it mimics the spawn rules for zombie and i added another check in there to see if its not dark enough to spawn and its daytime
worked, thank you
How can jei developer mode get the ids?
I want to disable structure generation from a mod
Please close your ticket (with </ticket close:1054771505520717835> or the button atop this thread) once you resolved your issue! This also helps others that would like to help out, as they don't have to look into this thread to check if it has been resolved by now.
Do you have any other questions regarding your issue? Feel free to ask!
Note: You should generally create a new post for unrelated issues.
ok