Started by
Aksumite
on
Topic category: Help with Minecraft modding (Java Edition)
I have the model and texture working, but the placement doesn't work how I want it to. As you know, a normal ladder can only be placed on the side of a solid block, how would I recreate this? Also, when holding the ladder it looks really weird even though I am using the official Minecraft ladder model.
Help would be appreciated :D
Simply, I would just detect block collision and set the entities velocity. Here is an example (I CAME UP WITH THIS CODE ON THE FLY SO TEST FOR YOURSELF)
onEntityCollision is actually a deprecated method so this isn't really "good" code. But it still works and I am sure you could find a better method.
I am confused now? Do you already have the method to set velocity. If you need help with the placement look below.
THIS IS A SNIPPET FROM THE LADDER BLOCK CODE AS YOU CAN SEE THE LADDER BLOCK HAS 4 COLLISON BOXES FOR EACH DIRECTION.
FOR LADDER "ATTACHING" TO A SIDE OF A BLOCK. SIMPLY THIS CHECKS IF THE BLOCK IS SOLID AND NOT LIKE REDSTONE FOR EXAMPLE.
AND THAT METHOD IS USED HERE
To end, there is a lot of other methods that LadderBlock uses. So I would look at the code yourself. But this should be a start if there isn't a method in MCreator
Ok, thanks!