new model for minecarts

Started by rileyvl123 on

Topic category: Help with Minecraft modding (Java Edition)

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? 

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

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

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 ?

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

Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello, i don't know if you…
Fri, 01/17/2025 - 13:57

Hello, i don't know if you remember me (because of the old comments from 2023). Anyways i followed your tutorial once again but it STILL doesn't work. Could you help me via Discord so it's easier to communicate ? If yes then my username is Sherisal

Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello. I'll tell you why it…
Fri, 09/05/2025 - 23:06

Hello.

I'll tell you why it doesn't work. It's because Esskay over here didn't proof-read and gave you commands that are full of typos.

Your command/function/however you wish to do this should actually be

summon minecart ~ ~ ~ {CustomDisplayTile:1,DisplayState:{Name:"mod_id:block_id"},DisplayOffset:6}

The DisplayOffset is if you want your minecarts to have a block inside, if you don't offset it it renders lower to the point it clips through. But if you want to overlay the minecarts with something else, god help you.

Another thing : the way this works is you can only summon minecarts with a "tile" in it. You cannot summon minecarts with a custom model for the minecart istelf, and that tile HAS to be a block, hence the conversion of your "custom minecart model" to a block. I have no idea if you can make that model BIGGER than the minecart istelf (apparently yes according to SK's screenshots) or if you can still ride them, it's 1AM for me so I am not gonna test it, but basically if you want minecarts with a cool custom model, not just with something inside it, it's either through this method and praying to god this will work, or just simply doing a resource pack.

Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
P.S.: from 25w07a (1.21.5…
Fri, 09/05/2025 - 23:12

P.S.: from 25w07a (1.21.5 Spring to Life) onward, they removed the CustomDisplayTile argument, as DisplayState now just acts as its own CustomDisplayTile. So, if your mod is for 1.21.5+, make sure to leave out "CustomDisplayTile:1," from the summon command.