[SPIGOT-5390] Add a way to listen to new Mushroom blocks behaviour Created: 02/Nov/19  Updated: 07/Nov/19

Status: Open
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: Thomas Marchand Assignee: Unassigned
Resolution: Unresolved Votes: 7
Labels: 1.13, 1.14, block

Version: CraftBukkit version git-Spigot-56f8471-7554e08 (MC: 1.14.4) (Implementing API version 1.14.4-R0.1-SNAPSHOT)
Plugin: Oraxen
Guidelines Read: Yes

 Description   

1.13 introduced a new feature which basically allows to get different blockfacing variations of mushroom blocks by placing them next to each others. Here is a demo: https://www.reddit.com/r/Minecraft/comments/7eu5em/how_to_change_your_mushroom_blocks_to_the_porous/
I would like to disable this feature so that I can use these different variations to create new blocks but there is no event for that. So here is what I have to do to fix it (and this is still not perfect, it has many bugs): https://github.com/Th0rgal/Oraxen/blob/master/src/main/java/io/th0rgal/oraxen/mechanics/provided/block/BlockMechanicsListener.java

This technique is the only one that allows to add new blocks correctly to the game and it would be really great if we could disable this very annoying mechanism directly from the game (the slightly buggy techniques that we have to use to get around this problem are very resource-intensive), otherwise an event that would be called (and that we could cancel) every time the blockfacing of a mushroom block is updated would be just as great !

 



 Comments   
Comment by LoneDev [ 07/Nov/19 ]

I prefer a spigot.yml setting to disable it completely and also disable BlockPhysicsEvent propagation since it's resource intensive.

Would be simply awesome

Comment by OnyxianSoul [ 06/Nov/19 ]

The behavior itself has literally no use, is probably resource intensive and can even hurt vanilla gameplay, making players unable to choose what texture they want to build with.

In the particular case of a plugin author creating custom blocks, they could listen to the events and cancel or revert the changes,  but that task would be resource intensive , & not bug free, plus as stated above, the current behavior serves no purpose, it sounds reasonable to just remove it or at least place a toggle for it

I hope you'll consider it

Comment by LoneDev [ 06/Nov/19 ]

Would be cool to have an event that is triggered whenever a mushroom block BlockState changes, so we can cancel it.

Even more better: would be nice to have a spigot.yml property to disable this behaviour completely as I think it's CPU consuming and it's a useless feature.

 

Thanks!

Comment by Thomas Marchand [ 03/Nov/19 ]

Alright, I tried to cancel every BlockPhysicsEvent where there is a mushroom stem block. It is buggy and not working. Here is the source code if you want to check: https://github.com/Th0rgal/IssueDemo
Here is what I get when I break a block between two others blocks:

It is really buggy because if I do a right click on the block at the left it gets his face enabled back so that's pretty nice even if it is not perfect ...but it is not working with the block at the right.

EDIT: I'm using a server with only this debug plugin installed

Comment by Black Hole [ 03/Nov/19 ]

Please try to listen to BlockPhysicsEvent.

Generated at Tue Apr 22 06:21:06 UTC 2025 using Jira 10.3.5#10030005-sha1:190c783f2bd6c69cd5accdb70f97e48812a78d14.