Started by
MakiRoll
on
Topic category: Help with Minecraft modding (Java Edition)
I'm making a mob for hell and I need it to walk on lava like a strider, can someone help with that? Please?
Topic category: Help with Minecraft modding (Java Edition)
I'm making a mob for hell and I need it to walk on lava like a strider, can someone help with that? Please?
There's some basic motion override stuff you could do- if you just use a 'attempt to override motion vector' function, you can set the entity's velocity to its current velocity, plus however much upwards force you need, if it's standing on lava. The trouble is that this will definitely mess with pathfinding, and probably cause problems down the road.
The better method would probably be to lock your entity, look at the code for the strider, and see if you can replicate it. You can find files for vanilla stuff in the file manager on the left hand side of the workspace. You'd want to look under external libraries/minecraft forge 1.20.1/net/minecraft/world/entity/monster.
Taking a peek, it looks like this is the tag that allows it to walk on a fluid. You would likely need to make some changes and make sure you add the proper dependencies if you wanted to add it into a locked mod element.
Ok im maked them "walk" in lava, but now im need that they move faster. :]
Did you get it to work with the custom code? Or just using a motion override? (I'm kind of curious if that boolean tag actually works :] ). You could try adjusting the mob's default speed in their 'properties' or 'AI' tab, but if that's not working, you could also try giving them a speed status effect.
You could also use another motion override to move the entity in the direction it's looking. If you set their x/z velocity to their x/z look angle vectors, it will move at a constant rate in the direction it's facing, and you can then multiply the look angle vectors to increase or decrease the speed.