Bug Verified

BonusLuckItems option in drop tables never works

#1724 opened by Unknown 5 years ago

Unknownreported this bug

Summary

When you try to use "BonusLuckItems" option in your drop tables it doesn't work in any way, the drops from the table are dropped but the bonusluckitems never works so you only get the items specified with TotalItems, MinItems or MaxItems even if you are using luck potion effect or luck based enchantments like looting or fortune, also doesn't matter if you are trying to drop vanilla items, mmoitems or commands, standalone or combined, this option seems to be useless and it never get trigger.

Steps to reproduce

SERVER: Paper Spigot 1.16.4 git-Paper-344

PLUGIN: MythicMobs-4.11.0-BETA (this problem exists from several previous versions)

Server Log File: https://pastebin.com/ueYuP1wH

Drop Table File: https://pastebin.com/1as6vqB3

Mob File: https://pastebin.com/RijSeX2y

The following examples are some of the combination i tried without any success until this moment always testing them with luck potion effect or looting enchantment or both at the same time, also tried with vanilla drops, mmoitems drops and command drops.

standalone options (MinItems,MaxItems or TotalItems):

MechBoss1:
  TotalItems: 5
  BonusLuckItems: 2
  Drops:
  - APPLE 1 0.5

MechBoss1:
  MinItems: 5
  BonusLuckItems: 2
  Drops:
  - APPLE 1 0.5

MechBoss1:
  MaxItems: 5
  BonusLuckItems: 2
  Drops:
  - APPLE 1 0.5

Combined (MinItems and MaxItems + BonusLuckItems):

MechBoss1:
  MinItems: 2
  MaxItems: 5
  BonusLuckItems: 2
  Drops:
  - APPLE 1 0.5

also doesn't matter if you use single amount or ranges.

MechBoss1:
  MinItems: 2
  MaxItems: 5
  BonusLuckItems: 1to4
  Drops:
  - APPLE 1 0.5

Inclusive i try using the example from the wiki "LuckyDroptable" but BonusLuckItems don't work never.

Current behavior

I can't get bonus luck items never when killing a mob with looting or luck potion effect, they only drop me the base amount or the base amount + BonusLevelItems but BonusLuckItems is completely ignored.

Intended correct behavior

Get bonus luck items when killing a mob with looting or luck potion effect.

Proposed fixes

I think it may be a problem in how the plugin detects the player's luck stat, maybe it doesn't detect your luck stat when killing a mob, there is a bug when trying to trigger the execution of BonusLuckItems or directly it's a problem with BonusLuckItems function.

Unknowncommented

I was working on testing this last night and finished testing this today.

I have a pastebin here: https://pastebin.com/ptF2v4Zc that goes over my results.

In the drop table i had BonusLuckItems: set to 10to20 for the entire testing session

I had a level 10 Luck effect on and a looting III sword the entire time while testing.

I changed the amount of TotalItems, MinItems, MaxItems in multiple different ways testing to try to get BonusLuckItems to work.

In the pastebin youll see i tested each of the different config settings 10 times. I record the item i had dropping, with the number it dropped afterwards.

  1. Cooked_beef 1

This for example means that it dropped 1 cooked beef.

The wiki says this: Requires that TotalItems, MinItems, or MaxItems be set on the table to work

And also says this: Bonus modifiers will increase any set Min/Max values as expected

This leads me to believe that the BonusLuckItems should increase the min/max values based on the formula the wiki says: amount = amount + (luck * bonus_luck_items)

However this does not seem to be the case.

Sign in to join the discussion.