Jump to content

Sandblock - Property Question.


DePhoegon

Recommended Posts

I honestly, view it differently, but I can see how you'd classify what 'external' is.  

What bothered me is I got no errors from Intellij  about what I did casting, or even warning about it.    Though was just tired & used a try catch to get what the exact error was & why, then never cleaned it up. (well till recently)

 

Umm  3Cntrl checks & 2 shift checks if all 3 tooltips are in use (or if shift & cntrl are used).. & 2 for either one.   X.x  umm  perhaps I didn't plan it out & lead it to check each tooltip once, rather than keypressed >.>   How embarrassing.   Umm I think I may ahve got my minimizing backwards >>.>> woops.

 

Don't be such a stick in the mud..    I did mean code to deal with 'Exogenous exceptions'   >.>  i'm sorry for getting that wrong..  Yes yes.. there is a reason I quadriple check anything I post as a 'guide' or informative, and have my anal friend look over for nitpicks.

 

welll forge needs to fix that event handler, or I need to understand way more about it (likely the 2nd one),  though I tend to build a tiny bit of caution, because at times I've found some stupid...  in what I did when I review it for a sanity reason. X}
--- gotten 100x better with naming conventions,  X.X  I'd show my batch code  but  the naming suxxx and it taught me to be cautious with values taken in, because I primarily dealt  a stupid varierty of names on files/folders, and after more then a few days debugging something that broken 5 layers in because some rogue fucking name that caused an issue the 4th  or 8th method/call/w.e, in because some / wasn't handled or some character that didn't bother the others got to it...  ...  putting some sanitation methods inside internal method calls is very close to breathing for myself.  X}

 

ol habits, and I still need to learn naming schemes better...  it's proving easier to read & understand, and I am kinda sad it's taken me that long to use more understadning naming schemes.

Link to comment
Share on other sites

18 hours ago, DePhoegon said:

welll forge needs to fix that event handler, or I need to understand way more about it (likely the 2nd one)

Almost certainly the second one. The problem with attack events is that there are multiple types of attacks with varying sources and varying targets. Figure out if the event is relevant, and if so, do things. Don't muddle things up with checking if you can get data out that's relevant, then check if you got data out.

If(!(event.getTarget() instanceof LivingEntity)) return;
if(event.getPlayer() == null) return;
 

Done. Now you can get the target and the player, casting the target into a local variable, and check anything you'd care to check.

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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.