Jump to content

[1.7.10] Getting Block Coordinates


BourgeoisArab

Recommended Posts

If this is a dumb question, I apologize in advance. I may be missing something obvious, but I can't seem to find a simple way to get the coordinates of the block itself within its class (something like xCoord, yCoord and zCoord with tile entities)? I know most methods supply the coordinates, but that isn't what I'm after. Any ideas, or is this impossible?

Link to comment
Share on other sites

The block class is a singleton and is used as a reference for ALL blocks of that type in the word, regardless of their position.  That's why a world, x, y, and z coordinates are passed to most methods.

 

Why do you need these outside of those methods, what are you trying to do?

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 like "whatever it is you're trying to do you need a TileEntity."

 

Because seriously, either you're given coordinates or its a method where the coordinates are irrelevant (or its an overloaded function in which case, both).

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

Also, your TileEntity's constructor MUST take NO parameters or things will go weird, fast.

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.