Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ikun_01

Members
  • Joined

  • Last visited

  1. I had a few problems making the mod, Who can help me with the answer?🤔 The first question is: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException The second question is: java.lang.IllegalArgumentException The third question is: java.io.FileNotFoundException: itnt:models/item/tnt_ball.json(My ModID is: itnt) The file path is: zzzz.itnt.itnt.java package zzzz.itnt; import net.minecraft.init.Blocks; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import org.apache.logging.log4j.Logger; @Mod(modid = itnt.MODID, name = itnt.NAME, version = itnt.VERSION, acceptedMinecraftVersions = "[1.12,1.13)") public class itnt { public static final String MODID = "itnt"; public static final String NAME = "Ikun tnt"; public static final String VERSION = "1.0"; private static Logger logger; @EventHandler public void preInit(FMLPreInitializationEvent event) { logger = event.getModLog(); } @EventHandler public void init(FMLInitializationEvent event) { // some example code logger.info("DIRT BLOCK >> {}", Blocks.DIRT.getRegistryName()); } } The file path is: zzzz.itnt.item.tntBall.java package zzzz.itnt.item; import net.minecraft.item.Item; import zzzz.itnt.itnt; public class tntBall extends Item { public tntBall() { this.setUnlocalizedName(itnt.MODID+".dirtball"); this.setRegistryName("dirt_ball"); this.setMaxStackSize(16); } } The file path is: zzzz.itnt.item.ItemRegistryHandler.java package zzzz.itnt.item; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraftforge.client.event.ModelRegistryEvent; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.event.RegistryEvent.Register; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.registries.IForgeRegistry; @Mod.EventBusSubscriber public class ItemRegistryHandler { public static final tntBall TNT_BALL = new tntBall(); @SubscribeEvent public static void onRegistry(Register<Item> event) { IForgeRegistry<Item> registry = event.getRegistry(); registry.register(TNT_BALL); } @SubscribeEvent @SideOnly(Side.CLIENT) public static void onModelRegistery(ModelRegistryEvent event) { ModelLoader.setCustomModelResourceLocation(TNT_BALL,0, new ModelResourceLocation(TNT_BALL.getRegistryName(),"inventory")); } } And in the resources folder have: resource\ assets\ itnt\ lang\ en_us.lang zh_cn.lang models\ item\ tnt_ball.json (The tnt_ball.json code: { "parent": "item/generated", "textures": { "layer0": "dirtgy:items/dirtball" } } ) textures\ items\ tnt_ball.png mcmod.info pack.mcmeta (The mcmod.info code: [ { "modid": "Itnt", "name": "Ikun tnt", "description": "Ikun tnt mod", "version": "${version}", "mcversion": "${mcversion}", "url": "", "updateUrl": "", "authorList": ["zzzz"], "credits": "Ikun tnt, zzzz", "logoFile": "", "screenshots": [], "dependencies": [] } ] ), (The pack.mcmeta code: { "pack": { "pack_format": 3, "description": "Ikun tnt resources" } } ) This is the code I wrote, who can help me to see where the problem?

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.