Posted May 31, 20214 yr Hello guys, as you can see in the Title, i have a problem with natural spawning of my custom entities. My forge version is currently 1.16.5-36.1.18. For the spawning i use the BiomeLoadingEvent: (This is in my CommonEvents.class) @SubscribeEvent public void registerEntitySpawns(BiomeLoadingEvent spawn) { if(spawn.getCategory() != Biome.Category.NETHER || spawn.getCategory() != Biome.Category.OCEAN || spawn.getCategory() != Biome.Category.THEEND) { spawn.getSpawns().addSpawn(EntityClassification.CREATURE, new MobSpawnInfo.Spawners(ModEntityTypes.PLUS.get(), 14, 0, 1)); spawn.getSpawns().addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(ModEntityTypes.DEMI_HOLLOW.get(), 14, 0, 1)); } System.out.println("Spawner: " + spawn.getSpawns().getSpawner(EntityClassification.CREATURE)); } Main.class private void setup(final FMLCommonSetupEvent event) { event.enqueueWork(() -> { //Register .... EntitySpawnPlacementRegistry.register(ModEntityTypes.PLUS.get(), EntitySpawnPlacementRegistry.PlacementType.ON_GROUND, Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, EntityPlus::checkGhostSpawnRules); EntitySpawnPlacementRegistry.register(ModEntityTypes.DEMI_HOLLOW.get(), EntitySpawnPlacementRegistry.PlacementType.ON_GROUND, Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, EntityDemiHollow::checkGhostSpawnRules); MinecraftForge.EVENT_BUS.register(new CommonEvents()); }); } The problem is: If im using EntityClassification.CREATURE then nothing happens but if im using AMBIENT, WATER_CREATURE or MONSTER than the mob spawn. AMBIENT: My custom Mob spawn when a minecraft:bat should be spawned (A bat is also an AMBIENT) WATER_CREATURE: After 30 - 45 seconds i have an army of Plus (Almost every second a Plus gets spawned) MONSTER: Only when a monster can spawn, my custom entity spawn too (Im using custom SpawnRules without any Lightlevel check but my entities still only spawn at night or thunder) There must be something that i messed up but i cant figure it out myself right now. Thanks in advance for helping out.
June 4, 20214 yr For the MONSTER, there still a light usage in MonsterEntity#getWalkTargetValue which is used during spawning, so you probably want to override and return 0.0F, or do something based on the block below. For the WATER_CREATURE, I'm assuming that your Plus mob isn't registered as a WATER_CREATURE, using different types for register and spawners can cause problems like this. Edited June 4, 20214 yr by lupicus formatting
June 6, 20214 yr Author Thanks lupicus for the answer. It helps me with my other entity that have the classfication MONSTER. My Plus is registered as a CREATURE and dont spawn if i do this: spawn.getSpawns().addSpawn(EntityClassification.CREATURE, new MobSpawnInfo.Spawners(ModEntityTypes.PLUS.get(), 14, 0, 1)); WATER_CREATURE and AMBIENT was for testing, to see if my Plus really spawns.
July 31, 20214 yr Author bump (the Problem still remains because i took a long break from modding) Edited July 31, 20214 yr by PJack
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.