Started by
Segapop
on
Topic category: Help with Minecraft modding (Java Edition)
I'm currently trying to make a mob thats like a squid AI wise but it only spawns on ocean structures or in caves under the ocean, how would i get it to actually spawn in the water?
EDIT Okay so i actually finally got the mob to actually spawn in water, but not using the normal mob spawning thing. I had to make a structure thats just the entity and structure void and make it spawn in water.
Edited by Segapop on Wed, 05/06/2020 - 00:55
Okay, I have the same problem too, but how did you get a structure to spawn in water? I cant figure that out either :(
I made an underwater structure too and somehow made it work.
In my mod, there is an serpentine dungeon which was sunken 300,000 years ago by the Ovorsorth. Well, that's the lore side of it. As for how I made it work, you may have to do a bit of math or something if it's about the height where it spawns. If it's about whether or not it actually spawns where you want it, you should try defining the biomes it spawns in, as well as the spawn weight. Make sure the structure spawns ONLY in oceans and deep oceans. Lukewarm oceans, cold oceans, tropical oceans as well if you are using 1.14, and to increase the spawn weight if either it doesn't spawn, or you need to find the natural generation of the structure in the test environment You can change the spawn weight anytime if you please.
Now, if it's about the spawn height, here is how you can adjust it.
My structure is 57 blocks tall, although technically it is 38 blocks since it has a bottom about hallway through with an entire underground section. I only wanted a small portion to poke out of the water, namely the tip top of the structure. Taking this into consideration, I set the spawn height offset of the structure to -30. It works consistently and rarely does it slip-up. Though I could be wrong, the game doesn't detect the water as solid ground, so the ocean floor is where the structure spawns at instead of the surface. Try tinkering with the spawn height offset of your structure until you're satisfied.
I hope I was of help ;)
Nevermind I fixed both of my problems by setting sea mob spawning to ambient and changing the structure to “first block” detection.
Ah, well that works too I guess. I am not too familiar with reference ground detection, but I do wish you all good luck on your mods! Peace!