Posted July 30, 201411 yr Hey all! I am trying to get a proper ray trace to receive a MovingObjectPosition with what angle I broke a block at. I am subscribing to the forge event: BlockBreak. But, it seems like when this event is called, the block is already disappeared so the ray trace is return the stats of a block that is no the block that was removed. How can I get the ray trace INSIDE the BlockBreak event of the Block that I just broke. Thanks in advance!
July 30, 201411 yr In the BlockEvent (the class that BreakEvent extends) is a EntityPlayer object which you can get the angles from. 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/
July 31, 201411 yr Author I'm not sure if you properly understand the issue. I have the EntityPlayer, but the problem I am having is doing a rayTrace BEFORE the BlockBreak event, inside of the event call. In other words, when the event is called and the block is broken, I then need to get what side of the block the Player was looking at BEFORE the break was called. Right now, the rayTrace is being called AFTER the block is broken, so the trace is pointing me towards a block that was behind the block that was just broken. I hope that cleared up any confusion and I appreciate the response
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.