Posted May 3, 20205 yr Pretty basic question. Basically what I got is.. if(handIn.OFF_HAND) It just gives me an error, I know it sounds dumb for asking this, but I don't know what is needed to be put
May 3, 20205 yr handIn.OFF_HAND is equivalent to saying "4" as an integer. Is "4"....what? 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.
May 3, 20205 yr I don't know about the Minecraft code specifics, but assuming handIn is a valid Hand object and OFF_HAND is actually in the Hand enum class, then you're trying to use a Hand object as an if condition. All if conditions must be booleans. You might be able to do it like this, if Hand is an enum: if(handIn == OFF_HAND) or if Hand isn't an enum, but overrides equals(): if(handIn.equals(OFF_HAND)
May 4, 20205 yr Author 1 hour ago, TheThorneCorporation said: I don't know about the Minecraft code specifics, but assuming handIn is a valid Hand object and OFF_HAND is actually in the Hand enum class, then you're trying to use a Hand object as an if condition. All if conditions must be booleans. You might be able to do it like this, if Hand is an enum: if(handIn == OFF_HAND) or if Hand isn't an enum, but overrides equals(): if(handIn.equals(OFF_HAND) Got it to work, thank you!
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.