How do I make an item that when used gives another item?
-
Recently Browsing
- No registered users viewing this page.
-
Posts
-
By perromercenary00 · Posted
thast right kapenjoe says something about not going up from 1.20.2 for some package issue i have the mine working messing around until the code start working still seems like you have some more complex than the mine //in mi main class //########## ########## ########## ########## ########## ########## ########## ########## private void commonSetup(final FMLCommonSetupEvent event) { ModMessage.register(); } ModMessage.class -
By EagleOfFire · Posted
Hello, for educational purpose I am trying to port a mod from 1.20.1 to 1.20.2+ but I can't understand how the new networking system works. I manage to get through it for the most part, but I'm stuck on how to register packets. The previous method was: INSTANCE.registerMessage(id++, CPExecuteSkill.class, CPExecuteSkill::toBytes, CPExecuteSkill::fromBytes, CPExecuteSkill::handle); with instance being of type SimpleChannel. (The forge document is not up to date for this part unfortunatly) Any help or clear documentation would be welcome. -
A code: public class CommonProxy { public void registerItemRenderer() { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register( ModItems.YOUR_ITEM, 0, new ModelResourceLocation(ModItems.YOUR_ITEM.getRegistryName(), "inventory") ); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register( ModItems.YOUR_ITEM, 0, new ModelResourceLocation(ModItems.YOUR_ITEM.getRegistryName(), "inventory"), new CustomItemRenderer(Minecraft.getMinecraft().getTextureManager(), Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getModelManager(), Minecraft.getMinecraft().getItemColors()) ); } } In YOUR_ITEM you must specify item. If not working try this: public class ModInit { @Mod.EventHandler public void init(FMLInitializationEvent event) { CommonProxy commonProxy = new CommonProxy(); commonProxy.registerItemRenderer(); } }
-
Topics
-
Who's Online (See full list)
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.