Posted March 24, 20205 yr Hey guys, I'm working on a mod with a water entity, that's supposed to spawn in the water. For some reason, it doesn't spawn when adding a SpawnListEntry. I can spawn it using the eggs or using /summon but it won't spawn naturally. Did they change anything about the spawnlist registry or something? Please help me Here's my code @SubscribeEvent public void registerEntityType(RegistryEvent.Register<EntityType<?>> event) { event.getRegistry().register(AXOLOTL_ENTITY); event.getRegistry().register(GOLDEN_AXOLOTL_ENTITY); RenderingRegistry.registerEntityRenderingHandler(AXOLOTL_ENTITY, new AxolotlRender.RenderFactory()); RenderingRegistry.registerEntityRenderingHandler(GOLDEN_AXOLOTL_ENTITY, new GoldenAxolotlRender.RenderFactory()); registerEntityWorldSpawn(AXOLOTL_ENTITY, 1, Biomes.OCEAN, Biomes.WARM_OCEAN, Biomes.DEEP_WARM_OCEAN, Biomes.DEEP_OCEAN, Biomes.RIVER, Biomes.LUKEWARM_OCEAN, Biomes.DEEP_LUKEWARM_OCEAN); registerEntityWorldSpawn(GOLDEN_AXOLOTL_ENTITY, 2, Biomes.OCEAN, Biomes.WARM_OCEAN, Biomes.DEEP_WARM_OCEAN, Biomes.DEEP_OCEAN, Biomes.RIVER); } public static void registerEntityWorldSpawn(EntityType<?> entity, int weight, Biome... biomes) { for (Biome biome : biomes) { if (biome != null) { biome.getSpawns(entity.getClassification()).add(new SpawnListEntry(entity, weight, 1, 100)); } } }
March 24, 20205 yr Try the FMLCommonSetupEvent QQ.java I will make fun of you if you are not able to look into the (vanilla-) code.
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.