new model for minecarts

Started by rileyvl123 on

Topic category: Help with modding (Java Edition)

Last seen on 23:51, 12. Dec 2021
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
new model for minecarts

I’m building a theme park and a mod to make it all look better and I would like to make custom minecarts. They would have the same properties and everything as a normal minecart the only thing that changes is the model. How do I do this? 

Last seen on 06:01, 19. Apr 2024
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This is pretty simple, but…
Sun, 11/21/2021 - 00:02

This is pretty simple, but will sound complicated. Just focus at one section at a time.

In Blockbench create your "awesome_whatevermodel_00.json", import it to MCreator as a block. Easy right! Now, while adding this model as a block ... send it to the No creative tab entry (just to keep your tabs clean and organized), zero/clear every value on the Generation tab, and save it.

-------------------------------------------------------------

Now, create a function.

summon minecart ~ ~ ~ {CustomDisplayTile:1b,DisplayState:{Name:"mod_id:name_of_you_previously_created_block"}}
replaceitem entity @p weapon.mainhand air

This will summon a minecart with a custom tile/model, with this custom name, while using a tile from your mod_id using that block. The next line is for clearing the item from the player's main hand. Save it. REMEMBER THE NAME OF THIS FUNCTION

-------------------------------------------------------------

Next ... Create an item. The item model is the block you just added, change any other value (not really necesary). Go to Triggers >> When right clicked on block, add a procedure. Now you will create a procedure >> In that procedure add four (4) Execute command/ and type the following: (one line per execute)

execute if block ~ ~ ~ minecraft:rail run function mod_id:function_you_just_created
execute if block ~ ~ ~ minecraft:powered_rail run function mod_id:function_you_just_created
execute if block ~ ~ ~ minecraft:detector_rail run function mod_id:function_you_just_created
execute if block ~ ~ ~ minecraft:activator_rail run function mod_id:function_you_just_created

Why four? It will execute if under the player"s feet is - rail or powered rail or detector rail or activator rail - if true, it will run the function.

Now save this, then save the previous item you had standing-by. You are done, now test it.

----------------------------Important---------------------------------

If your custom model is too low/high, your function must be modified:

summon minecart ~ ~ ~ {CustomDisplayTile:1b,DisplayOffset:+/-number,DisplayState:{Name:"mod_id:name_of_you_previously_created_block"}}

DisplayOffset
The offset of the block displayed in the Minecart in pixels. Positive values move the block upwards, while negative values move it downwards. A value of 16 will move the block up by exactly one multiple of its height.

reference: https://mcstacker.net/1.16.php

----------------------------Important---------------------------------

 

This is how I did it (there are many other far better and efficient ways to do it)

In game demo - https://mcreator.net/modification/78806/custom-3d-elytraarmor

Last seen on 13:36, 16. Jan 2024
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It doesn't work for me
Fri, 01/13/2023 - 15:20

It doesn't work for me

Last seen on 13:36, 16. Jan 2024
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
are you sure it's a block…
Mon, 01/16/2023 - 19:05

are you sure it's a block and not an entity ?

Last seen on 13:36, 16. Jan 2024
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@_SK_ it doesn't work for, i…
Wed, 08/16/2023 - 13:36

@_SK_ it doesn't work for, i followed your tutorial exactly as told and it still doesn't work