Chat spammed when insufficent skill is present
acxjet opened this issue ยท 6 comments
Describe the bug
When playing, then having a weapon equipped while not having the required skill in farming. for example, stone sword then having under 10 farming, having tooltips on jade turned on and then looking at a block, panning the camera around, will spam the chat with
"You are not skilled enough to use X as tool"
Expected behavior
Not getting chat spammed when walking around ready to defend your city from mobs
To Reproduce
Steps to reproduce the behavior:
Screenshots
Added further up
Versions:
- Minecraft: (eg 1.20.1)
- Loader: (eg. Forge-47.2.19)
- PMMO: 1.2.13
- Optifine 1.20.1_HD_U_I6 (just incase it does mess with something)
Additional context
Being able to disable the requirement messages would be nice, if that is not already possible.
@Caltinor Hi, thanks for the explanation. I know there are events that are called during this. But there are some actual mods (Waystones) that use this way to prevent certain players from mining, and this is the only way that Jade can know. I think it should not perform any actions that are noticeable to the user, especially since it only happens on the client side. To fix this problem, I think the most appropriate way is to choose a better injection point in ServerPlayerGameMode.class
. Or a simple way: only send the message to the player on the server side.
I think the most appropriate way is to choose a better injection point in
ServerPlayerGameMode.class
. Or a simple way: only send the message to the player on the server side.
@Snownee It's hard to tell from this line whether you are suggesting a change on the side of Jade or PMMO. Could you clarify what you meant?
I recommend asking Jade why this happens on their end. PMMO displays that message when you try to perform an action and do not have the requisite skill. This is done entirely through Forge events. What I suspect is happening is that Jade is simulating the break events in its feature. At first glance, this doesn't seem like something pmmo would be responsible for. There is no universal system for identifying simulated events that would allow me to ignore those. There are a lot of assumptions here, so I'll wait to hear back on what you get from the Jade people.
Hi, this is what I recently added. Just a normal getter method.
@Snownee That method has at least two upstream events that are triggered by its use. PMMO only uses one, though. The first event (unused by pmmo) is the HarvestCheck
which is nested under the ForgeHooks#isCorrectToolForDrops
call in BlockBehavior#getDestroyProgress
. The method call after this is Player#getDigSpeed
which fires the BreakSpeed
event. PMMO does use the break speed event and this is where the issue lies. PMMO checks if a block can be broken during the break speed event so that players get an instant notification that they are not permitted to break the block or use the tool instead of finding out after spending X seconds trying to break the block.