Property Modifier

Property Modifier

2M Downloads

Limitation to setting the stack size

SiverDX opened this issue ยท 0 comments

commented

Why does this exist

Logger.error("Cannot set the max stack size value for non-damageable item " + item);

If you are worried about modifying items which can get damaged you could use the check vanilla does

public Item.Properties stacksTo(int pMaxStackSize) {
   if (this.maxDamage > 0) {
      throw new RuntimeException("Unable to have damage AND stack.");
   } else {
      this.maxStackSize = pMaxStackSize;
      return this;
   }
}