Posted October 27, 20169 yr Hi, Whenever I'm starting up the game, I get an error that it didn't find a json file for block#inventory. The thing is, I never use that block in my inventory (I use an item that places the block). So I don't need a texture for the item and neither a json file. How can I ignore this file? Thanks! Creator of the Master Chef Mod and many more to come. If I helped you, please click the 'thank you' button.
October 27, 20169 yr Show how you register your block and block model. 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.
October 27, 20169 yr Author http://pastebin.com/HzrqMjVE Creator of the Master Chef Mod and many more to come. If I helped you, please click the 'thank you' button.
October 27, 20169 yr Golly gee. public static void registerBlock(Block block) { GameRegistry.register(block); ItemBlock item = new ItemBlock(block); item.setRegistryName(block.getRegistryName()); GameRegistry.register(item); } Every single one of your blocks gets an item by default with no ability to say "no plz." Also, seriously? Reflection? Someone is trying to be a lazy fuck and complains when doing it the lazy way doesn't do what they want it to do. https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/EasyRegistry.java https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/client/ClientEasyRegistry.java Usage https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/ores/OresBase.java#L153 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.
October 27, 20169 yr Author Thanks, but yes: I am being lazy and I'm not going to register every single block with a different line of code and that only the given parameter is different. If there's a better way to do this instead of reflection, tell me. But what's your problem actually? You could fix it even if it is the lazy way. Creator of the Master Chef Mod and many more to come. If I helped you, please click the 'thank you' button.
October 27, 20169 yr The only way to "fix" your method is for there to be some way to know if your reflective method needs to create an ItemBlock or not. Because it is, then the block is assumed to have an inventory variant. That's why I have several different registration methods: Block, Item, Block with Item, Block with custom ItemBlock implementation, Block with custom ItemBlock and StateMapper, and Item with variants. 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.
October 27, 20169 yr Author Jup. Solved it. Just added a parameter to registerBlock(Block block, boolean shouldRegisterItem). Creator of the Master Chef Mod and many more to come. If I helped you, please click the 'thank you' button.
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.