Modify Item.Properties for item form of block auto-generated by an element

Started by wheatttt on

Topic category: Help with MCreator software

Joined Nov 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Modify Item.Properties for item form of block auto-generated by an element
Wed, 12/17/2025 - 07:34 (edited)

Lets say I have a block element called TestBlock. And now, lets say I want to add the minecraft:equippable data component to TestBlock's item form to let me equip TestBlock on Llamas, like you can with carpets.

Setting it to not have an item form and registering said item myself in ModItems (where I can successfully add my own Item.Properties) causes the item's model file to always be obliterated whenever the block is regenerated.
Is there any way at all to do this? So far every method I've thought of (short of just making the entire block from custom code as you would in a normal modding environment) has major issues due to Mcreator's very insistent code regeneration.

Edited by wheatttt on Wed, 12/17/2025 - 07:34
You should add those…
Fri, 12/19/2025 - 17:22

You should add those components not in the global items file, but append them to the properties inside item's constructor

Joined Nov 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The item doesn't have its…
Sat, 12/20/2025 - 04:05

The item doesn't have its own file because it is a block item, registered based on the block in ModItems, which is why I went there first. I can't disable the block's item form and make my own, because I'm pretty sure the block element would still try to delete item model files with that name due to the item form being disabled. Unless you're saying it's possible to supply item properties from within the block's file that get inherited by the block item? I'm fairly new to actual java code.

In this case, you can…
Sun, 12/21/2025 - 15:25

In this case, you can disable block item of block and it won't be generated and then implement your own variant of block item in Java code