Posted July 14, 20169 yr I've created a hammer (3x3x1 pickaxe), and I've added a check to see that the block can be destroyed with that harvest level. But for some reason it doesn't work, when I printed it out both had a value of 0. How should I fix this? My code: http://pastebin.com/VtQuvkUD http://i.imgur.com/J4rrGt6.png[/img] [Creator of mcrafterzz mod]
July 15, 20169 yr Author bump (again) http://i.imgur.com/J4rrGt6.png[/img] [Creator of mcrafterzz mod]
July 16, 20169 yr Author I still need help! http://i.imgur.com/J4rrGt6.png[/img] [Creator of mcrafterzz mod]
July 16, 20169 yr Author Thank you for your reply but it crashed the game. Updated hammer class: http://pastebin.com/fFav0Z9L Crash: http://pastebin.com/5JjJ2scY http://i.imgur.com/J4rrGt6.png[/img] [Creator of mcrafterzz mod]
July 16, 20169 yr Author Updated (I will use the block pos offset later): http://pastebin.com/AChu3XHQ http://i.imgur.com/J4rrGt6.png[/img] [Creator of mcrafterzz mod]
July 16, 20169 yr Author Updated again: http://pastebin.com/CkcQB7kA New crash: http://pastebin.com/7S6L8Swq http://i.imgur.com/J4rrGt6.png[/img] [Creator of mcrafterzz mod]
July 16, 20169 yr Author 1. What should I replace getHorizontalFacing with? 2. How should I fix the loop (please give a example) 3. I still don't really understand how to use the offset http://i.imgur.com/J4rrGt6.png[/img] [Creator of mcrafterzz mod]
July 16, 20169 yr Author Thank you very much I will continue tomorrow http://i.imgur.com/J4rrGt6.png[/img] [Creator of mcrafterzz mod]
July 17, 20169 yr Author What would the sideHit come from? There is no variable with that name http://i.imgur.com/J4rrGt6.png[/img] [Creator of mcrafterzz mod]
July 26, 20169 yr Author There is not methoud itemStack.getItem().rayTrace() http://i.imgur.com/J4rrGt6.png[/img] [Creator of mcrafterzz mod]
July 26, 20169 yr From this method, you would have to do a ray trace. Item has a method rayTrace which you can use, it will give you a RayTraceResult which has an EnumFacing for the side being hit. Item.class != ItemStack.class 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.
July 26, 20169 yr diesieben07 told you to use rayTrace from the Item. You said ItemStack doesn't have that method. Item and ItemStack are not the same thing. 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.
July 26, 20169 yr diesieben07 told you to use rayTrace from the Item. You said ItemStack doesn't have that method. Item and ItemStack are not the same thing. There is not methoud itemStack.getItem().rayTrace() He is looking at the Item class, but he has the wrong method signature. @MCrafterzz: the method signature you need is Item#rayTrace(World,EntityPlayer,Boolean) . Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
July 27, 20169 yr Author I added this: RayTraceResult sideHit = this.rayTrace(worldIn, player, false); But side hit doesn't have a methoud named .getAxis() http://i.imgur.com/J4rrGt6.png[/img] [Creator of mcrafterzz mod]
July 27, 20169 yr Author Thank you it worked http://i.imgur.com/J4rrGt6.png[/img] [Creator of mcrafterzz mod]
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.