Open ColinHDev opened 2 years ago
This sounds like a bug in vanilla to me.
That's what I also thought at first. But it's the same in Java Edition. And it's not limited to bone meal. It's the same case with "shovels and pathways" and "compass and lodestones" (although that's not implemented in PM anyway).
I've dug a bit around this in Java Edition's source (I'm not that experienced with IDA and more familiar with Java). Both Java and PM have use
methods in item and block classes and those of the block classes are only called if the player is not sneaking. But, unlike PM, they implemented the fertilizer or "shovel" logic not in the GrassBlock class like PM, but in the respective item class, which would explain this behaviour.
If this is correct, I'd also expect paintings, spawn eggs and other items to work while sneaking too.
It does. While sneaking, you can also spawn mobs with spawn eggs or place e.g. either paintings or item frames.
Happens thanks to this line.
This is also causing players to be unable to interact with copper doors/trapdoors to wax/unwax them or remove oxidation (They need to be sneaking to do this)
Change the line to
if((!$player->isSneaking() || $item->isNull() || !$item instanceof ItemBlock) && $blockClicked->onInteract($item, $face, $clickVector, $player, $returnedItems)){
seems to fixe it.
Issue description
Steps to reproduce the issue
OS and versions
test.pmmp.io:19133
andtest.pmmp.io:19132
Plugins
---
Crashdump, backtrace or other files
---