PlotSquared
PlotSquared copied to clipboard
fix-silk-touch-with-instabreak
Fixes #4358
I tested your changes and your changes do not work the way you wanted. There is still no stone but cobblestone in a claimed plot with instabreak and with a silk touch pickaxe. I guess if you only give the method breakNaturally an itemstack without considering enchants it might won't work.
I tested your changes and your changes do not work the way you wanted. There is still no stone but cobblestone in a claimed plot with instabreak and with a silk touch pickaxe. I guess if you only give the method breakNaturally an itemstack without considering enchants it might won't work.
These changes do work. See this Video please also consider reading the Paper Docs. It clearly says "Breaks the block and spawns items as if a player had digged it with a specific tool". Therefore the enchants are also considered into the method.
I tested your changes and your changes do not work the way you wanted. There is still no stone but cobblestone in a claimed plot with instabreak and with a silk touch pickaxe. I guess if you only give the method breakNaturally an itemstack without considering enchants it might won't work.
These changes do work. See this Video please also consider reading the Paper Docs. It clearly says "Breaks the block and spawns items as if a player had digged it with a specific tool". Therefore the enchants are also considered into the method.
yes I already seen the docs but I tested your version in game and it is not working with the silk touch enchantment, it still drops only cobblestone. You will likely need to change the drops or check if there is a wrong method / check.
yes I already seen the docs but I tested your version in game and it is not working with the silk touch enchantment, it still drops only cobblestone. You will likely need to change the drops or check if there is a wrong method / check.
The changes work perfectly fine as shown in the Video
Looks like I took the wrong branch, but what needs to be considered is that the drops will only happen if you have a tool in your hand, which changes the way instabreak works. Instabreaks actual behaviour is to break blocks with your bare hand too which is dropping cobblestone. But at the changes cobblestone won't drop with bare hands.
Looks like I took the wrong branch, but what needs to be considered is that the drops will only happen if you have a tool in your hand, which changes the way instabreak works. Instabreaks actual behaviour is to break blocks with your bare hand too which is dropping cobblestone. But at the changes cobblestone won't drop with bare hands.
"Set to true to allow blocks to be instantaneously broken in survival mode"
The flags description doesn't say anything about the intention of the flag being instantaneously breaking blocks with your bare hand. Therefore adapting the survival mechanic where u have to use the specific tool is the only logic conclusion.
As this changes existing behavior, I'd like @IntellectualSites/plotsquared-team to weigh in too. I'm generally fine with it, as it makes sense this way. But it might make sense to put it behind a configurable option (in settings.yml) so we don't break any existing setups. (I guess we could need a new section for flags there then)
@ch4ika Pls add an Option so that it can be merged
As this changes existing behavior, I'd like @IntellectualSites/plotsquared-team to weigh in too. I'm generally fine with it, as it makes sense this way. But it might make sense to put it behind a configurable option (in settings.yml) so we don't break any existing setups. (I guess we could need a new section for flags there then)
This is a reasonable explanation. I'll approve once a config option has been added.