Add a way to listen to new Mushroom blocks behaviour

    • Type: New Feature
    • Resolution: Unresolved
    • Priority: Minor
    • None
    • Affects Version/s: None
    • CraftBukkit version git-Spigot-56f8471-7554e08 (MC: 1.14.4) (Implementing API version 1.14.4-R0.1-SNAPSHOT)
    • Oraxen
    • Yes

      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 !

       

          [SPIGOT-5390] Add a way to listen to new Mushroom blocks behaviour

          LoneDev added a comment -

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

          Would be simply awesome

          LoneDev added a comment - I prefer a spigot.yml setting to disable it completely and also disable BlockPhysicsEvent propagation since it's resource intensive. Would be simply awesome

          OnyxianSoul added a comment -

          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

          OnyxianSoul added a comment - 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

          LoneDev added a comment -

          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!

          LoneDev added a comment - 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!

          Thomas Marchand added a comment - - edited

          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

          Thomas Marchand added a comment - - edited 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

          Black Hole added a comment -

          Please try to listen to BlockPhysicsEvent.

          Black Hole added a comment - Please try to listen to BlockPhysicsEvent.

            Assignee:
            Unassigned
            Reporter:
            Thomas Marchand
            Votes:
            7 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated: