Started by
GarGan
on
Topic category: Help with Minecraft modding (Java Edition)
So I wanted to create a mob that you could ride, but I thought it would be cool if you could stand on it as if it was a block. You do see this in the boat as you can stand on it. I was wondering if there was any way to achieve this?
first, add this to your imports:
import net.minecraft.util.math.AxisAlignedBB;
import javax.annotation.Nullable;
then, add this somewhere in your code (if you're in doubt, add below the registerGoals function):
@Nullable
public AxisAlignedBB getCollisionBoundingBox() {
return this.getBoundingBox();
}
not mine i just found it on the mctoolkit server
can you go more in-depth? i have the same problem and have no idea what imports are...
https://ibb.co/hMPj8fL
so go into your mobs code and add the code that starts with imports under somewhere in that list (i dont think it matter where)
and then with that bottom part of code add it anywhere else in the mobs code just not in imports
Thanks!
I tried it, But it seems to not affect anything at all. Do you know why this happens?
I tried it too and it didnt work either so I guess its just the wrong code, I dunno I thought it worked
Hmm alright. But thanks for trying to help anyway!