Apotheosis

Apotheosis

70M Downloads

Stackable items can't be enchanted

RedBlockCreator opened this issue ยท 1 comments

commented

What the title says.

I have tested this by making items stackable with bigger stacks and kubejs, both do not allow items to be enchanted.

image

commented

This issue will present in vanilla as well and is not something I am willing to change (due to potential introduction of side effects).

The vanilla code for Item#isEnchantable is

   public boolean isEnchantable(ItemStack pStack) {
      return this.getMaxStackSize(pStack) == 1 && this.isDamageable(pStack);
   }

which means changing the stack size will make the items non-enchantable.