aw_wolfe Posted April 6, 2017 Posted April 6, 2017 (edited) I am trying to do the basic corn tutorial (https://shadowfacts.net/tutorials/forge-modding-1112/crops) So I have a BlockCornCrop extends BlockCrops, ItemSeedCorn, ItemCorn. I am also implementing the IModelProvider (again, basic for many tuts). In my ModItems, I am registering the ItemSeedCorn and ItemCorn. In my ModBlocks I am registering the BlockCornCrop Here's the issue: in my mod class if I do: @Mod.EventHandler public void init(FMLInitializationEvent event){ ModItems.init(); //registers corn, corn seed ModBlocks.init();//registers corn crop } The seeds are plantable, they grow and can be harvested (Which seems to indicate my corn blocks, json mappings, textures, etc are good), BUT the textures for corn seeds and corn are not loaded (pink square thing). if I do: @Mod.EventHandler public void preInit(FMLPreInitializationEvent even){ ModItems.init(); ModBlocks.init(); } OR: @Mod.EventHandler public void init(FMLInitializationEvent event){ ModBlocks.init(); } @Mod.EventHandler public void preInit(FMLPreInitializationEvent even){ ModItems.init(); } Then the seed and corn textures load (so tells me I think I have all the textures and json files in the correct spots. But when I go to plant the corn seeds MC crashes. Quote java.lang.NullPointerException: Unexpected error at net.minecraft.item.ItemSeeds.getPlant(ItemSeeds.java:53) at net.minecraft.block.Block.canSustainPlant(Block.java:1840) at net.minecraft.item.ItemSeeds.onItemUse(ItemSeeds.java:32) at net.minecraft.item.ItemStack.onItemUse(ItemStack.java:180) at net.minecraft.client.multiplayer.PlayerControllerMP.processRightClickBlock(PlayerControllerMP.java:486) I'm assuming it is an issue with where the init/registration takes place and not with the actual corn code, json files, directory structure. I can put those up if what I'm doing looks like it should work. Edited April 6, 2017 by aw_wolfe Quote
Draco18s Posted April 6, 2017 Posted April 6, 2017 Blocks, then items, in preInit. 1 Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
aw_wolfe Posted April 6, 2017 Author Posted April 6, 2017 Thanks! Makes sense since the seed class creation needs the crop block. For some reason, I was thinking the other way around. Quote
Draco18s Posted April 6, 2017 Posted April 6, 2017 4,962 other people have had the same problem and posted here about it. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
aw_wolfe Posted April 6, 2017 Author Posted April 6, 2017 Well, thanks for taking the time, not everyone does or would for a question asked/answered so often. I did search first and browsed through the titles (albiet not every single one of them) and a few postings that might have been related but didn't see anything that matched what I thought my issue was. Most that I saw were about file/directory structure issues, which by my testing, I did not believe was my issue. Google searches for 1.11 crop tutorials were very limited. Thanks again for your time. Tony Quote
Draco18s Posted April 6, 2017 Posted April 6, 2017 This isn't a 1.11 specific issue. People have been having this problem since at least 1.7 Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
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.