Jump to content

LordOfTheBlocks_

Members
  • Posts

    9
  • Joined

  • Last visited

LordOfTheBlocks_'s Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. Well, thank you very much for this advice! I wrote my code based off of a YouTube Modding Tutorial, which would explain the ridiculous messiness. I guess this mod is gonna be put on halt until I know more Java and more about Forge. I'm gonna try to mess around with the code and try to do everything you all said, but if I can't figure it out, then I'll have to just wait until my brain is a little wiser in the area of code. And thank you, sir, for your comment! I will definitely go out of my way to learn more from this coding class. As for your tax dollars, I'm not sure if they go towards dual-credit college students, but I will nonetheless make your volunteering worth the while! Thank you all!
  2. Oh, I'm sorry! I didn't know that I had to know Java beforehand, it's just that my programming class doesn't start for a week and I doubt we will start off with Java. Any suggestions on where to go and learn the Java fundamentals? I want to get better, but I'm also very frustrated at my program not working, since it's supposedly not even my mod that's causing the error, but something with Forge or Eclipse or who knows....
  3. I'm sorry I'm not sure what you mean by "when the breakpoint is hit". Is the value of the Throwable argument in the log or in the class? This is what is in the LoadController class: Also this: I set a breakpoint for the line FMLLog.log.error..... But I'm not sure what to look for
  4. Alrighty, I have done as you have said and here is my new error log: I see something in there about not being able to load the custom resource pack and another thing with the JSON file. "Line 6 column 6" I will look into that. Tell me if I'm missing something and how to fix it Thanks!!
  5. Edit: just realized you said the error is not in my code!! I looked around for anything that says "LoadController" in Eclipse, but can't find anything and Google hasn't helped either. Where do I go to put in that breakpoint method, and what is the exact code for that? (Sorry, I know VERY little java) Again thank you so much for your help, I really hope I can get this mod on it's feet so my friends and I can mess around with it.
  6. Wow, ok, I don't quite understand that (I've had 1 day of modding experience) but I get the gist of what you're saying, I'll try it out. Thanks!
  7. Thank you so much for your reply! Unfortunately, I can't make sense of what you're trying to say! I can see the "Could not dispatch event" in my crash report, but nowhere (with ctrl + F) can I find "handleException", and it's not in my code either. Do you maybe have a fix for the issue, or were you helping me find what was wrong (because I still don't know what's wrong with my code)? Funny thing I tested, when I complete a whole new workspace, and setup the most basic code, no items/blocks/anything, then I ran MC. It worked, but I noticed that there were only 4 mods loaded. Turns out in my main class I had a semicolon at the end of my @Mod string, so it's not a item or block that's crashing my game, it's the simple presence of my mod!! This is incredibly frustrating! Any ideas???
  8. Ok, here is my code so far: Order, Main Class, Reference, RegistryHandler, ItemInit, BlockInit, ClientProxy, CommonProxy, CustomBlock, CustomIngot, CustomOre package ace.madmanwithabox; import ace.madmanwithabox.proxy.CommonProxy; 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; @Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION) public class MadmanWithABox { @SidedProxy(clientSide = Reference.CLIENTPROXY, serverSide = Reference.COMMONPROXY) public static CommonProxy proxy; @EventHandler public static void preInit(FMLPreInitializationEvent event) { proxy.preInit(event); } @EventHandler public static void init(FMLInitializationEvent event) { proxy.init(event); } @EventHandler public static void postInit(FMLPostInitializationEvent event) { proxy.postInit(event); } } package ace.madmanwithabox; public class Reference { public static final String MODID = "mwab"; public static final String NAME = "Madman With A Box"; public static final String VERSION = "0.1 - MC 1.12"; public static final String CLIENTPROXY = "ace.madmanwithabox.proxy.ClientProxy"; public static final String COMMONPROXY = "ace.madmanwithabox.proxy.CommonProxy"; } package ace.madmanwithabox.handlers; import ace.madmanwithabox.init.BlockInit; import ace.madmanwithabox.init.ItemInit; public class RegistryHandler { public static void Client() { ItemInit.register(); BlockInit.registerRenders(); } public static void Common() { ItemInit.init(); BlockInit.init(); BlockInit.register(); } } package ace.madmanwithabox.init; import ace.madmanwithabox.Reference; import ace.madmanwithabox.init.items.CustomIngot; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraftforge.fml.common.registry.ForgeRegistries; public class ItemInit { public static Item steel_ingot; public static void init() { steel_ingot = new CustomIngot("steel_ingot"); } public static void register() { registerItem(steel_ingot); } public static void registerItem(Item item) { ForgeRegistries.ITEMS.register(item); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MODID + ":" + item.getUnlocalizedName().substring(5), "inventory")); } } package ace.madmanwithabox.init; import ace.madmanwithabox.Reference; import ace.madmanwithabox.init.blocks.CustomOre; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraftforge.fml.common.registry.ForgeRegistries; public class BlockInit { public static Block steel_ore; public static void init() { steel_ore = new CustomOre("steel_ore", 2.0F, 4.0F, 2); } public static void register() { registerBlock(steel_ore); } public static void registerBlock(Block block) { ForgeRegistries.BLOCKS.register(block); block.setCreativeTab(CreativeTabs.BUILDING_BLOCKS); ItemBlock item = new ItemBlock(block); item.setRegistryName(block.getRegistryName()); ForgeRegistries.ITEMS.register(item); } public static void registerRenders() { registerRender(steel_ore); } public static void registerRender(Block block) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher() .register(Item.getItemFromBlock(block), 0, new ModelResourceLocation(Reference.MODID + ":" + block.getUnlocalizedName().substring(5))); } } package ace.madmanwithabox.proxy; import ace.madmanwithabox.handlers.RegistryHandler; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; public class ClientProxy extends CommonProxy { public void preInit(FMLPreInitializationEvent event) { super.preInit(event); } public void init(FMLInitializationEvent event) { super.init(event); RegistryHandler.Client(); } public void postInit(FMLPostInitializationEvent event) { super.postInit(event); } } package ace.madmanwithabox.proxy; import ace.madmanwithabox.handlers.RegistryHandler; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; public class CommonProxy { public void preInit(FMLPreInitializationEvent event) { RegistryHandler.Common(); } public void init(FMLInitializationEvent event) { } public void postInit(FMLPostInitializationEvent event) { } } package ace.madmanwithabox.init.blocks; import net.minecraft.block.Block; import net.minecraft.block.material.Material; public class CustomBlock extends Block { public CustomBlock(String name, float hardness, float resistance) { super(Material.ROCK); setUnlocalizedName(name); setRegistryName(name); setHardness(hardness); setResistance(resistance); } } package ace.madmanwithabox.init.items; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; public class CustomIngot extends Item { public CustomIngot(String name) { setUnlocalizedName(name); setRegistryName(name); setCreativeTab(CreativeTabs.MISC); } } v package ace.madmanwithabox.init.blocks; public class CustomOre extends CustomBlock { public CustomOre(String name, float hardness, float resistance, int harvestLevel) { super(name, hardness, resistance); setHarvestLevel("pickaxe", harvestLevel); } } I hope you can make sense of this!! Thanks!
  9. Hello! I just started modding, and I've encountered a weird and VERY VERY annoying issue. For the first few hours my game would load fine, but at one point, it started crashing, and NO MATTER how much code I deleted or changed, the same crash occurred every time, even though I followed the modding tutorials to the LETTER. Here is the log: If anyone can debug this and fix this I would be ETERNALLY grateful. I have literally been hitting my head against the wall and other painful actions out of frustration, so please give me speedy suggestions! I just started modding and I don't want to get discouraged.
×
×
  • Create New...

Important Information

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