More compile fixes

This commit is contained in:
Nassim Jahnke
2024-04-25 22:47:32 +02:00
parent ca25aa1859
commit 686f224893
5 changed files with 14 additions and 325 deletions

View File

@@ -29,7 +29,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ final var stackEntry = net.minecraft.world.item.enchantment.EnchantmentHelper
+ .getRandomItemWith(net.minecraft.world.item.enchantment.Enchantments.MENDING, handle);
+ final net.minecraft.world.item.ItemStack itemstack = stackEntry != null ? stackEntry.getValue() : net.minecraft.world.item.ItemStack.EMPTY;
+ if (!itemstack.isEmpty() && itemstack.getItem().components().has(net.minecraft.core.component.DataComponents.MAX_STACK_SIZE)) {
+ if (!itemstack.isEmpty() && itemstack.getItem().components().has(net.minecraft.core.component.DataComponents.MAX_DAMAGE)) {
+ net.minecraft.world.entity.ExperienceOrb orb = net.minecraft.world.entity.EntityType.EXPERIENCE_ORB.create(handle.level());
+ orb.value = amount;
+ orb.spawnReason = org.bukkit.entity.ExperienceOrb.SpawnReason.CUSTOM;