yayeux Posted January 19, 2019 Share Posted January 19, 2019 When I smelt in-game i only get Shadow Ingot even from Ruby ores. It's probably because of withVariant() and getBlock() are counter to each other. withVariant() defines which variant (and thus metadata) to use. getBlock() strips metadata information. If so I need a new method or what? Can somebody explain it to me step by step or provide source? Quote Link to comment Share on other sites More sharing options...
Legenes Posted January 19, 2019 Share Posted January 19, 2019 (edited) If you use #getBlock() after a IBlockState, than everything stored in it, (like it's variant) is gone. I don't know how, but you need to find another way of doing this. Use FurnaceRecipes::addSmeltingRecipe(ItemStack, ItemStack, float). FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(BlockInit.ORE_OVERWORLD.getDefaultState().withProperty(...).getBlock), new ItemStack(Items.APPLE), 1); Edited January 19, 2019 by Legenes I'm an idiot. + example + oops Quote procedure WakeMeUp(Integer plusTime); var I: Integer; begin for I := 0 to plusTime do begin println('One more minute!'); Sleep(1000); end; println('Okay, nothing to worry, I''m alive!'); println('So... somebody can give me a coffee?'); println('I know it''s Pascal, and not Java, but I love it :D.'); end; Link to comment Share on other sites More sharing options...
yayeux Posted January 19, 2019 Author Share Posted January 19, 2019 It wants me to Cast argument but when I do that and start the game it crashes. Quote Link to comment Share on other sites More sharing options...
Legenes Posted January 19, 2019 Share Posted January 19, 2019 Oops.. #getBlock was missing. Quote procedure WakeMeUp(Integer plusTime); var I: Integer; begin for I := 0 to plusTime do begin println('One more minute!'); Sleep(1000); end; println('Okay, nothing to worry, I''m alive!'); println('So... somebody can give me a coffee?'); println('I know it''s Pascal, and not Java, but I love it :D.'); end; Link to comment Share on other sites More sharing options...
Legenes Posted January 19, 2019 Share Posted January 19, 2019 Just now, diesieben07 said: 8 minutes ago, Legenes said: Oops.. #getBlock was missing. That won't do anything. OP already explained this above. I was just saying that I made a bad example ? Quote procedure WakeMeUp(Integer plusTime); var I: Integer; begin for I := 0 to plusTime do begin println('One more minute!'); Sleep(1000); end; println('Okay, nothing to worry, I''m alive!'); println('So... somebody can give me a coffee?'); println('I know it''s Pascal, and not Java, but I love it :D.'); end; Link to comment Share on other sites More sharing options...
yayeux Posted January 19, 2019 Author Share Posted January 19, 2019 23 minutes ago, diesieben07 said: Blocks only exist in the world, not in inventories. You need to specify an ItemStack. I need to specify it above with public static final? Quote Link to comment Share on other sites More sharing options...
Legenes Posted January 19, 2019 Share Posted January 19, 2019 No, I tested my example, and I had a little mistake. You just need to put #getBlock() after #withProperty(). Quote procedure WakeMeUp(Integer plusTime); var I: Integer; begin for I := 0 to plusTime do begin println('One more minute!'); Sleep(1000); end; println('Okay, nothing to worry, I''m alive!'); println('So... somebody can give me a coffee?'); println('I know it''s Pascal, and not Java, but I love it :D.'); end; Link to comment Share on other sites More sharing options...
Legenes Posted January 19, 2019 Share Posted January 19, 2019 Just now, diesieben07 said: This will not allow you to specify block subtypes. Again, read the OP. Oh. I'm stupid. Sorry. Quote procedure WakeMeUp(Integer plusTime); var I: Integer; begin for I := 0 to plusTime do begin println('One more minute!'); Sleep(1000); end; println('Okay, nothing to worry, I''m alive!'); println('So... somebody can give me a coffee?'); println('I know it''s Pascal, and not Java, but I love it :D.'); end; Link to comment Share on other sites More sharing options...
yayeux Posted January 20, 2019 Author Share Posted January 20, 2019 20 hours ago, diesieben07 said: This will not allow you to specify block subtypes. Again, read the OP. How am I supposed to do that? Quote Link to comment Share on other sites More sharing options...
Legenes Posted January 20, 2019 Share Posted January 20, 2019 I think if you pre-make your itemStack and then you set it's meta withmyItemStack.setItemDamage(-the meta value you need-) then you can make it work with the FurnaceRecipes.instance().addSmeltingRecipe. This is my last idea. Quote procedure WakeMeUp(Integer plusTime); var I: Integer; begin for I := 0 to plusTime do begin println('One more minute!'); Sleep(1000); end; println('Okay, nothing to worry, I''m alive!'); println('So... somebody can give me a coffee?'); println('I know it''s Pascal, and not Java, but I love it :D.'); end; Link to comment Share on other sites More sharing options...
Draco18s Posted January 20, 2019 Share Posted January 20, 2019 https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/ores/OresBase.java#L386-L394 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. Link to comment Share on other sites More sharing options...
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.