NightTerror6 Posted September 7, 2015 Posted September 7, 2015 In forge 10.13.4.1492, I am trying to the change the block harvest level of an item. My code is: Blocks.blocksList[blocks.log] = null; Blocks.blocksList[blocks.log] = new NewLog(500).setBlockName("log").setCreativeTab(CreativeTabs.tabBlock).setRequiresTool(); I want to make logs require an axe to break. Block.blocksList isn't working, neither does Blocks.blockList Please tell me how/another way to do this? Quote
Failender Posted September 7, 2015 Posted September 7, 2015 I guess U should be using BreakSpeed and HarvestDrops events to manage that they wont drop Quote
shadowfacts Posted September 7, 2015 Posted September 7, 2015 You don't need to replace the vanilla block, you can just modify it. Blocks.log.setRequiresTool(); Quote Don't make mods if you don't know Java. Check out my website: http://shadowfacts.net Developer of many mods
NightTerror6 Posted September 7, 2015 Author Posted September 7, 2015 Wish I could say thanks, but I can't yet. I am getting the error: The method setRequiresTool() is undefined for the type Block Quote
Failender Posted September 7, 2015 Posted September 7, 2015 I guess U should be using BreakSpeed and HarvestDrops events to manage that they wont drop Quote
Failender Posted September 8, 2015 Posted September 8, 2015 correct me if im wrong but harvest check gets only fired if u cant harvest to allow harvesting Quote
Choonster Posted September 8, 2015 Posted September 8, 2015 HarvestCheck is only fired if the Block 's Material requires a tool. This is not the case for Material.wood . Quote Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
NightTerror6 Posted September 9, 2015 Author Posted September 9, 2015 If I am to use any of the events listed, I need to know how. I have not used events in my past, and I am completely new to them. Quote
Failender Posted September 9, 2015 Posted September 9, 2015 http://en.lmgtfy.com/?q=forge+event+handling Quote
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.