Jump to content

BreakSpeed in PlayerEvent with coordinate parameters


WilliamLe

Recommended Posts

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.

Link to comment
Share on other sites

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.

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.