How to use an item from the mod itself in code ?

Started by YannBCF on

Topic category: Help with MCreator software

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to use an item from the mod itself in code ?

Hello everybody, i'm having trouble with a simple thing.

 

I want to replace the item used after the craft being done with a specific item from the mod itself in the crafting grid. So i did this @override but it doesn't work

 

		@Override
		public Item setContainerItem(Item containerItem) {
    	return super.setContainerItem(Items.MCreatorFireGem.block);
		}	

and If i do

		@Override
		public Item setContainerItem(Item containerItem) {
    	return super.setContainerItem(Items.ELYTRA);
		}	

it works fine with the vanilla items (Elytra in this case), i just don't know the syntax to call an item from the mcreator mod itself. Thanks for your help !