Posted September 1, 201510 yr Does somebody know?? Creator of Extra Shoes Watch out, I'm total jerk, and I'll troll anybody if it feels like its necessary. Pls report me then
September 1, 201510 yr Author You don't necessarily need to do it yourself though. It depends on the context. onItemRichgtclick Creator of Extra Shoes Watch out, I'm total jerk, and I'll troll anybody if it feels like its necessary. Pls report me then
September 1, 201510 yr Author I got some code nearly working, but it does strangely only work in x and y positive direction, and also upwards sight, I cant figure outr why, but I think its a problem with the world.getBlockState if((player.rayTrace(200, 1.0F) != null)){ int blockHitX = (int) player.rayTrace(200, 1.0F).hitVec.xCoord; int blockHitY = (int) player.rayTrace(200, 1.0F).hitVec.yCoord; int blockHitZ = (int) player.rayTrace(200, 1.0F).hitVec.zCoord; System.out.println(blockHitX + " " + blockHitY + "\t"+ blockHitZ); BlockPos pos = new BlockPos(player.rayTrace(10, 1).hitVec); System.out.println(world.getBlockState(new BlockPos(player.posX, player.posY, player.posZ))); System.out.println(world.getBlockState(pos)); } Creator of Extra Shoes Watch out, I'm total jerk, and I'll troll anybody if it feels like its necessary. Pls report me then
September 1, 201510 yr dont know about that error, but why are u taytracing three times thats waste of processing time. raytrace once, save the result, read x/y/z from it
September 2, 201510 yr dont know about that error, but why are u taytracing three times thats waste of processing time. raytrace once, save the result, read x/y/z from it Three times? He's doing it five times! @OP, as Failender said, raytrace once, save the result, then do stuff with that result instead of raytracin 5 times... 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/
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.