Posted October 6, 201312 yr I am making a mod to display the distance from the player to a specific location. Currently this specific location is set at (-724, 13, -1285). I want to be able to set the location while playing. Is it possible to get the coordinates of a block by hitting that block with a specific item? I am open to suggestions about another way of setting the coordinates if the hitting the block idea is not possible. Here is the part of my code that determines and renders the distance: private final Minecraft mc; EntityPlayer player = mc.thePlayer; double xc = -724; double yc = 13; double zc = -1285; double = player.posX; double yd = player.posY; double zd = player.posZ; double d = Math.pow(Math.pow(xc-,2)+Math.pow(yc-yd,2)+Math.pow(zc-zd,2),0.5); int x = 100; int y = 2; int dColor = 0x00FF00; fontRender.drawStringWithShadow(String.format("d: %.1f", d), x, y, dColor); Thanks in advance for the help!
October 7, 201312 yr Is it possible to get the coordinates of a block by hitting that block with a specific item? Yes. Look at world.rayTraceBlocks_do_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.
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.