New on_pre_player_mine Event
Posted: Tue Jan 08, 2019 2:24 am
I'm making this a formal request as it wasn't directly answered in the other thread before it got locked.
But are we getting an event that fires before a player begins to mine an entity with an optional flag to cancel that attempt as invalid or the like?
Per API docs, there's currently only an event for when a player finishes the mining process but before the entity is removed whereas robots have an event that happens before they begin the mining process.
The need for this is that it's the appropriate time to figure out if a player can mine an entity (canceling before a player spends time on futility, based on variable and entity specific conditions), and is also the time where the mod would be able to dynamically determine the character's mining speed against the entity being mined. Which is something that can augment the new mining categories feature being added with 0.17.
Also completeness sake, since robots have it and such.
But are we getting an event that fires before a player begins to mine an entity with an optional flag to cancel that attempt as invalid or the like?
Per API docs, there's currently only an event for when a player finishes the mining process but before the entity is removed whereas robots have an event that happens before they begin the mining process.
The need for this is that it's the appropriate time to figure out if a player can mine an entity (canceling before a player spends time on futility, based on variable and entity specific conditions), and is also the time where the mod would be able to dynamically determine the character's mining speed against the entity being mined. Which is something that can augment the new mining categories feature being added with 0.17.
Also completeness sake, since robots have it and such.