Posted September 18, 20205 yr Do you know where the minecraft code initial WorldEntitySpawner is defined? I want to see how they set up the initial spawn chances of the Zombie, Baby Zombie, and the Chicken Baby Zombie, among other things. Thanks.
September 18, 20205 yr Then take a look at WorldEntitySpawner#performWorldGenSpawning Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
September 18, 20205 yr Author In that function is this line: List<SpawnListEntry> list = biomeIn.getSpawns(EntityClassification.CREATURE); I'm trying to figure out where that list is defined (ie what mobs spawn where, and with what chances)
September 18, 20205 yr Oh ok! I got what you were searching for...mob spawns are defined per biome..look at the various biomes classes and you will find the values they use for entity spawning Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
September 18, 20205 yr Author Thanks. I think I defeated myself here by asking the wrong questions. I was trying to figure out how to create some of the custom mobs that are rarely created, such as skeleton's or zombies riding horses, or charged creepers, or baby zombies riding chickens. I figured the spawn rules would answer that, but it just defines the chances for the general mob to spawn and how many. Any idea how I can do that?
September 18, 20205 yr What are you exactly trying to do? Because special mobs are spawned only when certain conditions are met, for example you can find the spawn code for skeleton horses in ServerWorld#tickEnvironment...creepers become charged when struck by lighting etc..and you can find an example on how to make an entity ride another one in SpiderEntity#onInitialSpawn Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
September 18, 20205 yr Author Thanks I'll take a look at those. That's exactly what I was looking for. I am going to make a mod that adds some variety to the spawns in minecraft, so zombies will more often spawn with some form of armor, or items in their hands, or riding horses for example. I plan to add lots of variety of minor changes to spawns that are not necessarily harder, but just different. I also plan to have those varieties sometimes drop different items on player kill, so for example a zombie with a pickaxe might drop an iron ore with a low chance. I also intend to expand the concept of patrols that the pillagers use and create zombie or skeleton patrols.
September 18, 20205 yr Seems cool, some of those thing should be pretty easy to achieve...there may be some work to do about the patrols though, but i am not sure since i did not dig into the code that manage them Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
September 18, 20205 yr Author I looked into the patrols. I can't use the exact logic they use because they made the patrol grouping as part of the base class of the pillagers, but I can create my own spawner similar to the patrols pretty easily on world tick, and I found another mod that groups mobs together, and I can use a variation of the concept they use to manage the patrols, and I just have to insert my own AI similar to the patrol to handle the pathing.
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.