PluginBugs / Issues-ItemsAdder

Repository used to keep track of issues of my plugin ItemsAdder
https://itemsadder.devs.beer
55 stars 21 forks source link

ItemsAdder API + furnitures as armorstands #2914

Closed Kalouchette closed 1 year ago

Kalouchette commented 1 year ago

Terms

Discord tag (optional)

kalouche

What happened?

Hi! I have made a custom machine plugin that uses ItemsAdder furnitures.

How you place the machine is simple right clicking the ground with the item in your hand, that call CustomFurniture.spawn(furnitureModelId (String), targetBlock (Block)).

Further details: My furnitures are 1 blocs lengh, 2 blocks height furnitures, with the item being displayed with an armorstand.

When you open the GUI and click on the red cross, it simply call CustomFurniture.remove(armorStand (Entity), false (Boolean))

Works well on the first look, but if you hit the furniture, or try to block the barrier block, there's a weird interaction SOMETIMES. First the hit is cancelled, as it should be, so the furniture is not removed. But when you open the GUI, click the cross, the bottom block of the furniture is actually removed, but the armorstand, and the top block of the furniture are still there.

Further details about my plugins: There is nothing that changes the behavior on how furnitures should work if it was only ItemsAdder. Only parts of my code refering to ItemsAdder are the following:

Steps to reproduce the issue

Have a custom plugin place a furniture using CustomFurniture.spawn(namespace, block) Prevent removing that furniture except from using a CustomFurniture.remove(entity, boolean) located in a GUI/COMMAND

Punch the furniture once it's placed Try to remove it using ur gui or command

Server version

Current: git-Purpur-2019 (MC: 1.20.1) (current latest for Purpur)

ItemsAdder Version

ItemsAdder version 3.5.0c-r3

ProtocolLib Version

ProtocolLib version 5.0.0

LoneLibs Version

LoneLibs version 1.0.25

FULL server log

latest.log

Error (optional)

None

Problematic items yml configuration file (optional)

items:

################# FARM TOTEM

  farming_totem_cactus:
    display_name: farming_totem_cactus
    permission: farming_totem_cactus
    resource:
      material: TOTEM_OF_UNDYING
      generate: false
      model_path: farm/farming_totem_cactus
    behaviours:
      furniture:
        gravity: false
        fixed_rotation: true
        small: false
        solid: true
        placeable_on:
          floor: true
          ceiling: false
          walls: false
        hitbox:
          length: 1
          width: 1
          height: 2
        sound:
          place:
            name: block.wood.place
          break:
            name: block.wood.break

Other files, you can drag and drop them here to upload. (optional)

No response

Screenshots/Videos (you can drag and drop files or paste links)

https://github.com/PluginBugs/Issues-ItemsAdder/assets/82654455/c6cb356a-f104-4905-b6bd-f29cdea86cb5

LoneDev6 commented 1 year ago

It's the exact same animation of the Minecraft armorstands. It was introduced to give the player a feedback of when they try to break the furniture. Try to intercept the event and cancel it, it should stop the furniture from vibrating. Related to this feature request: https://github.com/PluginBugs/Issues-ItemsAdder/issues/1984#issuecomment-1569135982