Started by
AvatarMars
on
Topic category: Help with Minecraft modding (Java Edition)
I am making a drowned variant for my mod, but whenever I check the "is water entity" box under behavior in living entity tab, it prevents my mob from spawning. Spawn eggs do nothing, and when I try to spawn with commands it says 'unable to summon entity". Can anyone help?
haven't tested it but it could have to do with something other than the fact that it is a water entity, you can also regenerate the code by clicking the bandage/fish on the top right corner, this should usually fix a lot of problems
Okay, so it seems that it only occurs when I have "is water entity checked" and the mob inherits from zombie Ai. At least it can exist now. I wish there were an option to inherit from Drowned ai, because it seems like mcreator only has options for mobs that live in water or on land exclusively. If I add the swim randomly behavior it can move in water, but freezes on land. If I have the wander randomly behavior it is able to walk, but not swim. is there a way to switch behaviors based on whether it is in water or not?
yeah, next to the swimming or wandering block there is an infinity symbol (actually it looks like an "OO"), click on that, you can make a condition that checks if it is in water
for the land one, do if in water then return false, and put a return true block at the end
for the water one, do if in water then return true, and put a return false block at the end
the way it works is that if it gets a return true, the mob will start doing the thing, and since a return block ends the procedure you don't need to use a condition, just put the other return value at the end
Ok I feel like this could work and i'm just doing it wrong.
heres what I have based on what you said: https://imgur.com/a/bxlZ9PW
is that what you meant?
very cool
i think you should probably also put it in the continue condition, so it keeps swimming when it's in water
did you test it in the game?
I did try adding it to the continue condition but still no luck. It will stick to doing whatever comes first in the heirarchy, walking or swimming, even with the conditions.
*when the conditions for that task return false
test if it checks for if the mob is touching water or if it is completely submerged in water, and if it's swimming or walking that allows it to move on the surface of water
if you want it to swim under water, probably make it not able to float on the surface, and then add the swim task