Fabric Generator get item from registries

Started by HaipaDev on

Topic category: Help with MCreator software

Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Fabric Generator get item from registries

Fabric Generator get item from registries help

Hey guys, so the Fabric Generator doesnt support getting an itemstack from registry, it still uses the Forge base for it.  
And Ive been tiptoing around that with /execute /data and /scoreboard commands for my mod (all because I wanted to make a config file allowing you to edit the ids) but nah I just cant

Could anyone help me in either making a plugin work properly(because I do not know how to make it be supported by the Fabric generator) or just atleast explaining how to properly get an item from net.minecraft.core.Registry based on a tag like "minecraft:dirt", because im loosing my mind

Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Alright im a dumbass,…
Mon, 01/22/2024 - 12:00

Alright im a dumbass, shouldve just checked what MCreator uses to register its items, and so far I do know it uses the BuiltInRegistries (not sure if anyone knows if thats the standard for fabric and if my mod will work with other mod ids in the config)
So I can do  Set item to (custom code snippet:) BuiltInRegistries.ITEM.get(new ResourceLocation(tag)) 
But I still would prefer to make a plugin with a custom procedure block instead of doing custom code snippets each time (and I cant seem to get around how to make it compatible with the Fabric generator)