Skip to content

FIX: Trying to fix duplication drop issue#192

Open
kiriharu wants to merge 1 commit intoAuxilor:masterfrom
kiriharu:master
Open

FIX: Trying to fix duplication drop issue#192
kiriharu wants to merge 1 commit intoAuxilor:masterfrom
kiriharu:master

Conversation

@kiriharu
Copy link
Contributor

@kiriharu kiriharu commented Apr 8, 2025

Explanation:

Every time, when I break blocks with active multiply_drops effect I get much more drops then expected.
For example, if I have this config:

effects:
  - id: multiply_drops # Bonus Multiplier
    args:
      chance: 100 
      multiplier: 2
    triggers:
      - block_item_drop
    filters:
      player_placed: true
      blocks:
        - "iron_ore"

I expect to get 2 raw iron, but instead, I get 512 + 2.
Same issue when I use fortune argument.

I spent some time in debugger and found a solution - when EditableBlockDropEvent#items clear all modifiers after itemstack modification - all works as expected. But I don't think it's right, because I don't fully understand architecture.

@kiriharu kiriharu requested a review from WillFP as a code owner April 8, 2025 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant