mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-01-05 06:57:35 +01:00
!updated to latest mmolib
This commit is contained in:
parent
2a8874ae1c
commit
3eb10e65aa
BIN
lib/MMOLib.jar
BIN
lib/MMOLib.jar
Binary file not shown.
@ -20,7 +20,6 @@ import net.Indyuce.mmoitems.stat.data.StringData;
|
||||
import net.Indyuce.mmoitems.stat.data.type.Mergeable;
|
||||
import net.Indyuce.mmoitems.stat.data.type.StatData;
|
||||
import net.Indyuce.mmoitems.stat.type.ItemStat;
|
||||
import net.mmogroup.mmolib.api.weight.WeightedContainer;
|
||||
|
||||
public class MMOItemBuilder {
|
||||
private final MMOItem mmoitem;
|
||||
@ -65,15 +64,9 @@ public class MMOItemBuilder {
|
||||
mmoitem.setData(ItemStat.TIER, new StringData(tier.getId()));
|
||||
if (level > 0)
|
||||
mmoitem.setData(ItemStat.ITEM_LEVEL, new DoubleData(level));
|
||||
|
||||
|
||||
//TODO: Rewrite weightedcontainer to support double values
|
||||
//TODO: Rewrite weightedcontainer to support no shuffle
|
||||
|
||||
WeightedContainer<TemplateModifier> weighted = new WeightedContainer<>();
|
||||
// roll item gen modifiers
|
||||
for (TemplateModifier modifier : rollModifiers(template)) {
|
||||
weighted.add(modifier.getWeight(), modifier);
|
||||
// roll modifier chance
|
||||
// only apply if enough item weight
|
||||
if (!modifier.rollChance() && modifier.getWeight() > capacity)
|
||||
|
Loading…
Reference in New Issue
Block a user