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.

rpthomps

Members
  • Joined

  • Last visited

  1. So, I found a tutorial for 1.8 and followed it and it worked. I made an item called test_item. I ran it, as shown in the tutorial and it worked. Yay!. Now, I wanted to change the code to call test_item, jack_cat instead. So, I changed all references from test_item to jack_cat. I even changed the version from 1.0 to 1.1 in my reference file. When I run minecraft it doesn't recognize any of the changes. Is there some kind of refresh I have to do? Thanks again. Code below. package com.Jacksmod.init; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraftforge.fml.common.registry.GameRegistry; import com.Jacksmod.Reference; public class JackItems { public static Item jack_cat; public static void init(){ jack_cat = new Item().setUnlocalizedName("jack_cat"); } public static void register(){ GameRegistry.registerItem(jack_cat, jack_cat.getUnlocalizedName().substring(5)); } public static void registerRenders() { registerRender(jack_cat); } public static void registerRender(Item item) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID+":"+item.getUnlocalizedName().substring(5),"inventory")); } } package com.Jacksmod.proxy; import com.Jacksmod.init.JackItems; public class clientproxy extends commonproxy { @Override public void registerRenders(){ JackItems.registerRenders(); } } package com.Jacksmod.proxy; public class commonproxy { public void registerRenders(){ } } package com.Jacksmod; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import com.Jacksmod.init.JackItems; import com.Jacksmod.proxy.commonproxy; @Mod(modid = Reference.MOD_ID,name = Reference.MOD_NAME, version = Reference.VERSION) public class mainmod { @SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS,serverSide = Reference.SERVER_PROXY_CLASS) public static commonproxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent event){ JackItems.init(); JackItems.register(); } @EventHandler public void Init(FMLInitializationEvent event){ proxy.registerRenders(); } @EventHandler public void postInit(FMLPostInitializationEvent event){ } } package com.Jacksmod; public class Reference { public static final String MOD_ID = "Jack"; public static final String MOD_NAME = "JackMod"; public static final String VERSION = "1.1"; public static final String CLIENT_PROXY_CLASS = "com.Jacksmod.proxy.clientproxy"; public static final String SERVER_PROXY_CLASS = "com.Jacksmod.proxy.commonproxy"; }
  2. Thanks for the quick reply. I downloaded the following zip: forge-1.8-11.14.1.1337-src from the promotions section of source forge. Is this not 1.8? Thanks again
  3. So, my son wanted to make mods and to be honest, i am interested as well. I have setup Eclipse with Forge and watched some tutorials and I am trying to make a basic block appear in the Creative Tab. When I compile and run Minecraft I don't see a block. I will paste my code below but I was thinking that I need to pass an ID to the block. Eclipse doesn't find a method to pass those parameters. Or perhaps I need a texture or image file? Not sure...any help would be appreciated. Thanks package com.Jackmods.jack1mod; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; public class jack1mod { @Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { } @Mod.EventHandler public void Init(FMLInitializationEvent event) { modItems.init(); modBlocks.init(); } @Mod.EventHandler public void postInit(FMLPostInitializationEvent event) { } } class JackBlock extends Block { protected JackBlock(int i, Material materialIn) { super(i, materialIn); // TODO Auto-generated constructor stub setCreativeTab(CreativeTabs.tabMisc); } } public class modBlocks { public static Block JackBlock = new JackBlock(500, Material.rock).setUnlocalizedName("JackBlock"); public static void init(){ RegisterHelper.registerBlock(JackBlock); } } public class RegisterHelper { public static void registerBlock(Block block) { GameRegistry.registerBlock(block, block.getUnlocalizedName()); } public static void registerItem(Item item){ GameRegistry.registerItem(item, item.getUnlocalizedName()); } }

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.