Jump to content

Wooden_Brick

Members
  • Posts

    27
  • Joined

  • Last visited

Everything posted by Wooden_Brick

  1. Hello, Im trying to understand the basics of OverlayEvents, and I've come across 3 problems with the tutorial mod in mcforge: http://pastebin.com/6PtmTJQ7 I've also changed the @ForgeSubscribe into @SubscribeEvent. The other problem is i dont know where to put this line ///////////////////////////////////////////////////////////////////////////////////////////////// MinecraftForge.EVENT_BUS.register(new SampleEventReceiver()); ///////////////////////////////////////////////////////////////////////////////////////////////// and the last problem is in my GuiBuffBar, it says /////////////////////////////////////////////////////////////////////////////////////////// this.mc.renderEngine.bindTexture("/gui/inventory.png"); the type TextureManager is not applicable for arguments(String) /////////////////////////////////////////////////////////////////////////////////////////// GuiBuffBar class: http://pastebin.com/tN2R2QLk Main Mod Class: http://pastebin.com/x6nfz1pi hope finally readable (
  2. Either im doing something wrong, or dont know how to use spoilers or code boxes, sorry if this way is still confusing, code is inside comment markers. Hello, Im trying to understand the basics of OverlayEvents, and I've come across 3 problems with the tutorial mod in mcforge: ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public class SampleEventReceiver { @SubscribeEvent(priority = EventPriority.NORMAL) public void eventHandler(RenderGameOverlayEvent event) //for some reason it says i have to add a "{" here //and a "}" here } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// I've also changed the @ForgeSubscribe into @SubscribeEvent. The other problem is i dont know where to put this line //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// MinecraftForge.EVENT_BUS.register(new SampleEventReceiver()); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// and the last problem is in my GuiBuffBar: it says: /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// this.mc.renderEngine.bindTexture("/gui/inventory.png"); the type TextureManager is not applicable for arguments(String) /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Whole mod class : ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public class GuiBuffBar extends Gui { private Minecraft mc; public GuiBuffBar(Minecraft mc) { super(); // We need this to invoke the render engine. this.mc = mc; } private static final int BUFF_ICON_SIZE = 18; private static final int BUFF_ICON_SPACING = BUFF_ICON_SIZE + 2; // 2 pixels between buff icons private static final int BUFF_ICON_BASE_U_OFFSET = 0; private static final int BUFF_ICON_BASE_V_OFFSET = 198; private static final int BUFF_ICONS_PER_ROW = 8; // // This event is called by GuiIngameForge during each frame by // GuiIngameForge.pre() and GuiIngameForce.post(). // @SubscribeEvent(priority = EventPriority.NORMAL) public void onRenderExperienceBar(RenderGameOverlayEvent event) { // // We draw after the ExperienceBar has drawn. The event raised by GuiIngameForge.pre() // will return true from isCancelable. If you call event.setCanceled(true) in // that case, the portion of rendering which this event represents will be canceled. // We want to draw *after* the experience bar is drawn, so we make sure isCancelable() returns // false and that the eventType represents the ExperienceBar event. if(event.isCancelable() || event.type != ElementType.EXPERIENCE) { return; } // Starting position for the buff bar - 2 pixels from the top left corner. int xPos = 2; int yPos = 2; Collection collection = this.mc.thePlayer.getActivePotionEffects(); if (!collection.isEmpty()) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glDisable(GL11.GL_LIGHTING); this.mc.renderEngine.bindTexture("/gui/inventory.png"); for (Iterator iterator = this.mc.thePlayer.getActivePotionEffects() .iterator(); iterator.hasNext(); xPos += BUFF_ICON_SPACING) { PotionEffect potioneffect = (PotionEffect) iterator.next(); Potion potion = Potion.potionTypes[potioneffect.getPotionID()]; if (potion.hasStatusIcon()) { int iconIndex = potion.getStatusIconIndex(); this.drawTexturedModalRect( xPos, yPos, BUFF_ICON_BASE_U_OFFSET + iconIndex % BUFF_ICONS_PER_ROW * BUFF_ICON_SIZE, BUFF_ICON_BASE_V_OFFSET + iconIndex / BUFF_ICONS_PER_ROW * BUFF_ICON_SIZE, BUFF_ICON_SIZE, BUFF_ICON_SIZE); /////////////////////////////////////////////////////////////////////////////////////////////////////////////// Main mod class: ///////////////////////////////////////////////////////////////////////////////////////////////////////////// @Mod(modid = References.MOD_ID, name = References.MOD_NAME, version = References.VERSION) public class TutorialMod { @SidedProxy(clientSide = References.CLIENT_PROXY_CLASS, serverSide = References.SERVER_PROXY_CLASS) public static CommonProxy proxy; public static final ModTab tabMod = new ModTab("tabMod"); @EventHandler public void preInit(FMLPreInitializationEvent event){ TutorialBlocks.init(); TutorialBlocks.register(); TutorialItems.init(); TutorialItems.register(); TutorialItems.registerRecipes(); } @EventHandler public void init(FMLInitializationEvent event){ proxy.registerRenders(); } @EventHandler public void postInit(FMLPostInitializationEvent event){ MinecraftForge.EVENT_BUS.register(new GuiBuffBar(Minecraft.getMinecraft())); } }
  3. Hello, Im trying to understand the basics of OverlayEvents, and I've come across 3 problems with the tutorial mod in mcforge: public class SampleEventReceiver { @SubscribeEvent(priority = EventPriority.NORMAL) public void eventHandler(RenderGameOverlayEvent event) //for some reason it says i have to add a "{" here //and a "}" here } I've also changed the @ForgeSubscribe into @SubscribeEvent. The other problem is i dont know where to put this line MinecraftForge.EVENT_BUS.register(new SampleEventReceiver()); and the last problem is in my GuiBuffBar: it says this.mc.renderEngine.bindTexture("/gui/inventory.png"); iint the type TextureManager is not applicable for arguments(String) Whole class: public class GuiBuffBar extends Gui { private Minecraft mc; public GuiBuffBar(Minecraft mc) { super(); // We need this to invoke the render engine. this.mc = mc; } private static final int BUFF_ICON_SIZE = 18; private static final int BUFF_ICON_SPACING = BUFF_ICON_SIZE + 2; // 2 pixels between buff icons private static final int BUFF_ICON_BASE_U_OFFSET = 0; private static final int BUFF_ICON_BASE_V_OFFSET = 198; private static final int BUFF_ICONS_PER_ROW = 8; // // This event is called by GuiIngameForge during each frame by // GuiIngameForge.pre() and GuiIngameForce.post(). // @SubscribeEvent(priority = EventPriority.NORMAL) public void onRenderExperienceBar(RenderGameOverlayEvent event) { // // We draw after the ExperienceBar has drawn. The event raised by GuiIngameForge.pre() // will return true from isCancelable. If you call event.setCanceled(true) in // that case, the portion of rendering which this event represents will be canceled. // We want to draw *after* the experience bar is drawn, so we make sure isCancelable() returns // false and that the eventType represents the ExperienceBar event. if(event.isCancelable() || event.type != ElementType.EXPERIENCE) { return; } // Starting position for the buff bar - 2 pixels from the top left corner. int xPos = 2; int yPos = 2; Collection collection = this.mc.thePlayer.getActivePotionEffects(); if (!collection.isEmpty()) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glDisable(GL11.GL_LIGHTING); this.mc.renderEngine.bindTexture("/gui/inventory.png"); for (Iterator iterator = this.mc.thePlayer.getActivePotionEffects() .iterator(); iterator.hasNext(); xPos += BUFF_ICON_SPACING) { PotionEffect potioneffect = (PotionEffect) iterator.next(); Potion potion = Potion.potionTypes[potioneffect.getPotionID()]; if (potion.hasStatusIcon()) { int iconIndex = potion.getStatusIconIndex(); this.drawTexturedModalRect( xPos, yPos, BUFF_ICON_BASE_U_OFFSET + iconIndex % BUFF_ICONS_PER_ROW * BUFF_ICON_SIZE, BUFF_ICON_BASE_V_OFFSET + iconIndex / BUFF_ICONS_PER_ROW * BUFF_ICON_SIZE, BUFF_ICON_SIZE, BUFF_ICON_SIZE); Main Mod Class: @Mod(modid = References.MOD_ID, name = References.MOD_NAME, version = References.VERSION) public class TutorialMod { @SidedProxy(clientSide = References.CLIENT_PROXY_CLASS, serverSide = References.SERVER_PROXY_CLASS) public static CommonProxy proxy; public static final ModTab tabMod = new ModTab("tabMod"); @EventHandler public void preInit(FMLPreInitializationEvent event){ TutorialBlocks.init(); TutorialBlocks.register(); TutorialItems.init(); TutorialItems.register(); TutorialItems.registerRecipes(); } @EventHandler public void init(FMLInitializationEvent event){ proxy.registerRenders(); } @EventHandler public void postInit(FMLPostInitializationEvent event){ MinecraftForge.EVENT_BUS.register(new GuiBuffBar(Minecraft.getMinecraft())); } }
  4. could anyone show where all the vanilla parents are listed or how to create new ones, or even what are they???
  5. But what if i need diferent top, sides and bottom?
  6. I've been trying to get a multi textured block, an i ran into the problem not understanding what the "parent" in needed for. when i use: { "parent": "block/cube_all", "textures": { "all": "tm:blocks/grass_normal" } } everything works, but when i try to copy after vanilla grass: { "parent": "block/grass", "textures": { "bottom": "blocks/dirt", "top": "tm:blocks/grass_normal", "side": "blocks/grass_side", "overlay": "blocks/grass_side_overlay" } } tm is my mod id.
  7. Maybe it has something to do with the texturename, in public static final ItemArmor.ArmorMaterial gemArmorMaterial = EnumHelper.addArmorMaterial("gemArmorMaterial" , null, 1024,new int[]{5,9,7,5}, 30); does there have to be a null there?
  8. there is nothing, im using crayfishes template, https://www.dropbox.com/s/vu62ryjwsgg6zz5/Template.zip . i think it has everything.
  9. Main: package com.Babuska; 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 net.minecraftforge.fml.common.registry.GameRegistry; import com.Babuska.init.TutorialBlocks; import com.Babuska.init.TutorialItems; import com.Babuska.proxy.CommonProxy; @Mod(modid = References.MOD_ID, name = References.MOD_NAME, version = References.VERSION) public class TutorialMod { @SidedProxy(clientSide = References.CLIENT_PROXY_CLASS, serverSide = References.SERVER_PROXY_CLASS) public static CommonProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent event){ TutorialBlocks.init(); TutorialBlocks.register(); TutorialItems.init(); TutorialItems.register(); TutorialItems.registerRecipes(); } @EventHandler public void init(FMLInitializationEvent event){ proxy.registerRenders(); } @EventHandler public void postInit(FMLPostInitializationEvent event){ } } ItemGemArmour class: package com.Babuska.items; import net.minecraft.entity.Entity; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; public class ItemGemArmor extends ItemArmor { public ItemGemArmor(ArmorMaterial material, int renderIndex, int armorType) { super(material, renderIndex, armorType); // TODO Auto-generated constructor stub } @Override public String getArmorTexture(ItemStack stack,Entity entity, int slot, String type) { if(this.armorType == 2) { return "tm:textures/models/armor/cheese_layer_2.png"; } return "tm:textures/models/armor/cheese_layer_1.png"; } } Where all my items are class: package com.Babuska.init; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.fml.common.registry.GameRegistry; import com.Babuska.References; import com.Babuska.items.ItemGemArmor; import com.Babuska.items.ItemGemPickaxe; public class TutorialItems { public static Item test_item; public static Item gem_1; public static Item gem_pickaxe; public static Item gem_helmet; public static Item gem_chest; public static Item gem_legs; public static Item gem_boots; public static final Item.ToolMaterial gemToolMaterial = EnumHelper.addToolMaterial("gemToolMaterial", 2, 512, 7.0F, 2.0F, 10); public static final ItemArmor.ArmorMaterial gemArmorMaterial = EnumHelper.addArmorMaterial("gemArmorMaterial" , null, 1024,new int[]{5,9,7,5}, 30); public static void init(){ test_item = new Item().setUnlocalizedName("test_item"); gem_1 = new Item().setUnlocalizedName("gem_1"); gem_pickaxe = new ItemGemPickaxe(gemToolMaterial).setUnlocalizedName("gem_pickaxe"); gem_helmet = new ItemGemArmor(gemArmorMaterial, 0, 0).setUnlocalizedName("gem_helmet"); gem_chest = new ItemGemArmor(gemArmorMaterial, 0, 1).setUnlocalizedName("gem_chest"); gem_legs = new ItemGemArmor(gemArmorMaterial, 0, 2).setUnlocalizedName("gem_legs"); gem_boots = new ItemGemArmor(gemArmorMaterial, 0, 3).setUnlocalizedName("gem_boots"); } public static void register() { GameRegistry.registerItem(test_item, test_item.getUnlocalizedName().substring(5)); //"tile.test_item" GameRegistry.registerItem(gem_1, gem_1.getUnlocalizedName().substring(5)); GameRegistry.registerItem(gem_pickaxe, gem_pickaxe.getUnlocalizedName().substring(5)); GameRegistry.registerItem(gem_helmet, gem_helmet.getUnlocalizedName().substring(5)); GameRegistry.registerItem(gem_chest, gem_chest.getUnlocalizedName().substring(5)); GameRegistry.registerItem(gem_legs, gem_legs.getUnlocalizedName().substring(5)); GameRegistry.registerItem(gem_boots, gem_boots.getUnlocalizedName().substring(5)); } public static void registerRenders() { registerRender(test_item); registerRender(gem_1); registerRender(gem_pickaxe); registerRender(gem_helmet); registerRender(gem_chest); registerRender(gem_legs); registerRender(gem_boots); } public static void registerRender(Item item) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(References.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory")); } public static void registerRecipes() { recipePickaxe(); recipeHelmet(); recipeChest(); recipeLegs(); recipeBoots(); } public static void recipePickaxe() { GameRegistry.addRecipe(new ItemStack(gem_pickaxe, 1), new Object[]{"TTT", " S ", " S ",'T',TutorialItems.gem_1,'S',Items.stick}); } public static void recipeHelmet() { GameRegistry.addRecipe(new ItemStack(gem_helmet, 1), new Object[]{"GGG", "G G ", " ",'G',TutorialItems.gem_1}); } public static void recipeChest() { GameRegistry.addRecipe(new ItemStack(gem_chest, 1), new Object[]{"G G", "GGG", "GGG",'G',TutorialItems.gem_1}); } public static void recipeLegs() { GameRegistry.addRecipe(new ItemStack(gem_legs, 1), new Object[]{"GGG", "G G", "G G",'G',TutorialItems.gem_1}); } public static void recipeBoots() { GameRegistry.addRecipe(new ItemStack(gem_boots, 1), new Object[]{" ", "G G", "G G",'G',TutorialItems.gem_1}); } } the armor pngs are in Assets.tm/models/armor
  10. Does armor now have only 1 layer or 2? Cause i have 2 layers - one for the top part and 1 for the bottom part of the armor. Im using this code and it doesnt work - @Override public String getArmorTexture(ItemStack stack,Entity entity, int slot, String type) { if(this.armorType == 2) { return "tm:textures/models/armor/cheese_layer_2.png"; } return "tm:textures/models/armor/cheese_layer_1.png"; }
  11. Thank you diesieben07 for telling me to show jsons, only then i saw something: "layer0": "items/gem_pickaxe" and then i checked my gem item - "layer0": "tm:items/gem_1" and i noticed the tm: before items, i added that to the pickaxe and now it works so thank you
  12. inside models i have blocks and item groups, and inside those i have my jsons i also have a textures package (its inside assets.tm, not models) where i have my armor and pickaxe pngs in items
  13. { "parent": "builtin/generated", "textures": { "layer0": "items/gem_pickaxe" }, "display": { "thirdperson": { "rotation": [ 0, 90, -35 ], "translation": [ 0, 1.25, -3.5 ], "scale": [ 0.85, 0.85, 0.85 ] }, "firstperson": { "rotation": [ 0, -135, 25 ], "translation": [ 0, 4, 2 ], "scale": [ 1.7, 1.7, 1.7 ] } } } this is for gem_pickaxe.json and by structure you mean this?? Assets.tm blockstates models
  14. Yes, i chaged the named in the jason exactly, and i named the jsons exactly as the item
  15. public static void registerRender(Item item) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(References.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory")); } } Ive been folowing tutorials, dont realy know what it does.
  16. Main: package com.Babuska; 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 net.minecraftforge.fml.common.registry.GameRegistry; import com.Babuska.init.TutorialBlocks; import com.Babuska.init.TutorialItems; import com.Babuska.proxy.CommonProxy; @Mod(modid = References.MOD_ID, name = References.MOD_NAME, version = References.VERSION) public class TutorialMod { @SidedProxy(clientSide = References.CLIENT_PROXY_CLASS, serverSide = References.SERVER_PROXY_CLASS) public static CommonProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent event){ TutorialBlocks.init(); TutorialBlocks.register(); TutorialItems.init(); TutorialItems.register(); TutorialItems.recipe(); } @EventHandler public void init(FMLInitializationEvent event){ proxy.registerRenders(); } @EventHandler public void postInit(FMLPostInitializationEvent event){ } } My json is a copy of a dmd pick/armor, with the name changed.
  17. When i open the game, the Tools and armor have no texture, even though i have the textures in my assets. I have other items and they work. does this method of making tools still work in 1.8? public class TutorialItems { public static Item test_item; public static Item gem_1; public static Item gem_pickaxe; public static Item gem_helmet; public static Item gem_chest; public static Item gem_legs; public static Item gem_boots; public static final Item.ToolMaterial gemToolMaterial = EnumHelper.addToolMaterial("gemToolMaterial", 2, 512, 7.0F, 2.0F, 10); public static final ItemArmor.ArmorMaterial gemArmorMaterial = EnumHelper.addArmorMaterial("gemArmorMaterial" , null, 1024,new int[]{5,9,7,5}, 30); public static void init(){ test_item = new Item().setUnlocalizedName("test_item"); gem_1 = new Item().setUnlocalizedName("gem_1"); gem_pickaxe = new ItemGemPickaxe(gemToolMaterial).setUnlocalizedName("gem_pickaxe"); gem_helmet = new ItemGemArmor(gemArmorMaterial, 0, 0).setUnlocalizedName("gem_helmet"); gem_chest = new ItemGemArmor(gemArmorMaterial, 0, 1).setUnlocalizedName("gem_chest"); gem_legs = new ItemGemArmor(gemArmorMaterial, 0, 2).setUnlocalizedName("gem_legs"); gem_boots = new ItemGemArmor(gemArmorMaterial, 0, 3).setUnlocalizedName("gem_boots"); } public static void register() { GameRegistry.registerItem(test_item, test_item.getUnlocalizedName().substring(5)); //"tile.test_item" GameRegistry.registerItem(gem_1, gem_1.getUnlocalizedName().substring(5)); GameRegistry.registerItem(gem_pickaxe, gem_pickaxe.getUnlocalizedName().substring(5)); GameRegistry.registerItem(gem_helmet, gem_helmet.getUnlocalizedName().substring(5)); GameRegistry.registerItem(gem_chest, gem_chest.getUnlocalizedName().substring(5)); GameRegistry.registerItem(gem_legs, gem_legs.getUnlocalizedName().substring(5)); GameRegistry.registerItem(gem_boots, gem_boots.getUnlocalizedName().substring(5)); } public static void registerRenders() { registerRender(test_item); registerRender(gem_1); registerRender(gem_pickaxe); registerRender(gem_helmet); registerRender(gem_chest); registerRender(gem_legs); registerRender(gem_boots); } the test_item and gem_1 textures work. This is the ItemGemPickaxe and ItemGemArmor classes: package com.Babuska.items; import net.minecraft.item.ItemArmor; public class ItemGemArmor extends ItemArmor { public ItemGemArmor(ArmorMaterial material, int renderIndex, int armorType) { super(material, renderIndex, armorType); // TODO Auto-generated constructor stub } } package com.Babuska.items; import net.minecraft.item.ItemPickaxe; public class ItemGemPickaxe extends ItemPickaxe { public ItemGemPickaxe(ToolMaterial material) { super(material); } }
  18. It works thank you One last thing, and then i guess ill go away for like 2 weeks, so people get a break from my questions The pickaxe that i made has no texture in game, i guess the only thing diferent with it is that i used in my items: public class TutorialItems { public static Item test_item; public static Item gem_1; public static Item gem_pickaxe; public static final Item.ToolMaterial gemToolMaterial = EnumHelper.addToolMaterial("gemToolMaterial", 2, 512, 7.0F, 2.0F, 10); public static void init(){ test_item = new Item().setUnlocalizedName("test_item"); gem_1 = new Item().setUnlocalizedName("gem_1"); gem_pickaxe = new ItemGemPickaxe(gemToolMaterial).setUnlocalizedName("gem_pickaxe"); } public static void register() { GameRegistry.registerItem(test_item, test_item.getUnlocalizedName().substring(5)); //"tile.test_item" GameRegistry.registerItem(gem_1, gem_1.getUnlocalizedName().substring(5)); GameRegistry.registerItem(gem_pickaxe, gem_pickaxe.getUnlocalizedName().substring(5)); } public static void registerRenders() { registerRender(test_item); registerRender(gem_1); registerRender(gem_pickaxe); } public static void registerRender(Item item) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(References.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory")); } } and in the actual ItemGemPickaxe class: import net.minecraft.item.ItemPickaxe; public class ItemGemPickaxe extends ItemPickaxe { public ItemGemPickaxe(ToolMaterial material) { super(material); } } i have the .json.
  19. Everything works, just the block doesnt drop what i want, the quantity works thow
  20. Wow, as always im impressed how much these little things like order mean :DD thanks a lot to people who helped
  21. Thank you now all i need to do is figure out why the block drops dont work. i used a code that was for 1.7.10. Does this still work? package com.Babuska.blocks; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.item.Item; import com.Babuska.init.TutorialItems; public class BlockTest extends Block { public BlockTest(Material materialIn) { super(materialIn); this.setHardness(2.0F); this.setHarvestLevel("pickaxe", 1); //dmd 3, iron 2, stone 1, wood 0, } //public Item getItemDropped(int meta, Random rand, int fortune) //{ // return TutorialItems.gem_1; //} //@Override //public int quantityDropped(Random rand){ // return 6; //} }
  22. package com.Babuska; 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 net.minecraftforge.fml.common.registry.GameRegistry; import com.Babuska.init.TutorialBlocks; import com.Babuska.init.TutorialItems; import com.Babuska.proxy.CommonProxy; @Mod(modid = References.MOD_ID, name = References.MOD_NAME, version = References.VERSION) public class TutorialMod { @SidedProxy(clientSide = References.CLIENT_PROXY_CLASS, serverSide = References.SERVER_PROXY_CLASS) public static CommonProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent event){ TutorialBlocks.init(); TutorialBlocks.register(); TutorialBlocks.recipe(); TutorialItems.init(); TutorialItems.register(); } @EventHandler public void init(FMLInitializationEvent event){ proxy.registerRenders(); } @EventHandler public void postInit(FMLPostInitializationEvent event){ } }
  23. After some testing, i found that when i try to craft some items it instantly crashes. do i have to do something more to define it? for instance if i try to craft or use in crafting gem_1, its doesnt even load minecraft, if i use test_item it crashes when i try and craft it, and when i craft my test_2 item it for some reason works? am i missing something complicated or very obvious?
×
×
  • Create New...

Important Information

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