Started by
Zeyler
on
Topic category: Advanced modding
I am currently working on a mod for a car. I am planning to create a minivan or sports car in it, but I don't know how to create multiple seats. Can you tell me how to do that?
If you use a code, even a rough one, I would appreciate it if you could teach me.
Goodmorning everybody.
I'm also looking for an answer. Any advices about it ? Is it possible with blockbench by changing the bone config to an invisible Minecart, the same way as Bedrock ?
Thanks all.
Well I found the solution if anyone is asking.
Just go in the code of your entity, then in the name of your class, extend to the Vanilla Minecraft entity.
Then from here, override with whatever you want (speed, can be pushed, etc...)
Oops wrong topic, sorry.
Anyway, does someone as an idea ?
Probably not.
If I make more than one of those, can I have more than one seat?
Hey. Have you already tried ImOd's idea?
I used a different, crude method to achieve this with my own vehicle mod. I made a rideable "back seat" entity that automatically alings itself to (behind) the "mother entity". It's probably messy in comparison since it adjusts its north, east, south, west - orientation via procedures an thus the back seat with the passenger in it "snaps" if you drive at an angle close to 45° off from exactly noth, east etc. but it is the closest to a usable mechanic I could find.
The procedure must of course be bound to the trigger "on entity tick update" of the back seat-entity
The result looks like this:
wow. nice!
Show me the procedure at the bottom.
You mean the one that is completely cut out of the screenshot? That's not important for it to work. It is literally the same procedure group as the one you see there once again, but testing for another type of mother entity besides "AirshipTest" as above. This is so that the backseat would behave the same way with multiple vehicles - or slightly different. You could, for example, adjust the distance between mother entity and backseat if the seacond vehicle is shorter or longer. In the example shown the distance is the X/Z of +/- 1.35 depending on which direction the mother entity faces.
Just know that the bigger that distance is set, the more "out of line" the backseat and the main vehicle become when you turn (see the first of the 2 ingame screenshots)
ok. thanks!
So I can create an entity for the car and an entity for the back?