Posted June 20, 201312 yr So i'm wondering if it's possible for BreakSpeed (extends PlayerEvent) to have the coordinates of the block being broken since this mod i'm working on will check whether a player is breaking a block in a safe-zone or a wild-zone (i mean the block inside the zone, not the player) and then decrease his digging speed. I've already thought of ray-tracing or getting the block's position through player.getLookVec() but this mod will be used on big servers so doing that way will cause quite a strain on the server. So i'm hoping coordinate parameters will be added to the event Thank you for considering.
June 20, 201312 yr Not possible look at how that function is called. We are not given all of the information we need. If we were we would give you it. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
June 25, 201312 yr Not possible look at how that function is called. We are not given all of the information we need. If we were we would give you it. ForgeHooks.blockStrength has those coordinates. Perhaps you could modify getCurrentPlayerStrVsBlock and pass those in? BEWARE OF GOD --- Co-author of Pentachoron Labs' SBFP Tech.
June 25, 201312 yr Yes but what about the other areas that call that event? I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
June 26, 201312 yr Yes but what about the other areas that call that event? I did an "open call hierarchy" in Eclipse, and, unless something's using reflection, the only function that creates a BreakSpeed is getBreakSpeed, and the only two functions that call getBreakSpeed() are blockStrength() (which already has the position args) and getCurrentPlayerStrVsBlock() (which is called only by blockStrength().) Shall I create a PR, or am I missing something? BEWARE OF GOD --- Co-author of Pentachoron Labs' SBFP Tech.
June 28, 201312 yr I just submitted PR #621 to solve this. BEWARE OF GOD --- Co-author of Pentachoron Labs' SBFP Tech.
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.