diff --git a/patches/server/Add-methods-to-get-translation-keys.patch b/patches/server/Add-methods-to-get-translation-keys.patch index 68eb3a9d8c..5ea93c4752 100644 --- a/patches/server/Add-methods-to-get-translation-keys.patch +++ b/patches/server/Add-methods-to-get-translation-keys.patch @@ -35,7 +35,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + @Override + public String translationKey() { -+ return this.target.getDescriptionId(); ++ return this.handle.getDescriptionId(); + } // Paper end diff --git a/patches/server/Configurable-baby-zombie-movement-speed.patch b/patches/server/Configurable-baby-zombie-movement-speed.patch index a6d42a6694..bd59b09c78 100644 --- a/patches/server/Configurable-baby-zombie-movement-speed.patch +++ b/patches/server/Configurable-baby-zombie-movement-speed.patch @@ -12,7 +12,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private static final UUID SPEED_MODIFIER_BABY_UUID = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836"); private static final AttributeModifier SPEED_MODIFIER_BABY = new AttributeModifier(Zombie.SPEED_MODIFIER_BABY_UUID, "Baby speed boost", 0.5D, AttributeModifier.Operation.MULTIPLY_BASE); -+ private final AttributeModifier babyModifier = new net.minecraft.world.entity.ai.attributes.AttributeModifier(SPEED_MODIFIER_BABY.getId(), SPEED_MODIFIER_BABY.getName(), this.level().paperConfig().entities.behavior.babyZombieMovementModifier, SPEED_MODIFIER_BABY.getOperation()); // Paper - Make baby speed configurable ++ private final AttributeModifier babyModifier = new net.minecraft.world.entity.ai.attributes.AttributeModifier(SPEED_MODIFIER_BABY.getId(), SPEED_MODIFIER_BABY.name, this.level().paperConfig().entities.behavior.babyZombieMovementModifier, SPEED_MODIFIER_BABY.getOperation()); // Paper - Make baby speed configurable private static final EntityDataAccessor DATA_BABY_ID = SynchedEntityData.defineId(Zombie.class, EntityDataSerializers.BOOLEAN); private static final EntityDataAccessor DATA_SPECIAL_TYPE_ID = SynchedEntityData.defineId(Zombie.class, EntityDataSerializers.INT); public static final EntityDataAccessor DATA_DROWNED_CONVERSION_ID = SynchedEntityData.defineId(Zombie.class, EntityDataSerializers.BOOLEAN); diff --git a/patches/server/Empty-commands-shall-not-be-dispatched.patch b/patches/server/Empty-commands-shall-not-be-dispatched.patch index d3d5e7f080..996ed9cb92 100644 --- a/patches/server/Empty-commands-shall-not-be-dispatched.patch +++ b/patches/server/Empty-commands-shall-not-be-dispatched.patch @@ -12,7 +12,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 command = event.getCommand(); String[] args = command.split(" "); -+ if (args.length == 0) return 0; // Paper - empty commands shall not be dispatched ++ if (args.length == 0) return; // Paper - empty commands shall not be dispatched String cmd = args[0]; if (cmd.startsWith("minecraft:")) cmd = cmd.substring("minecraft:".length()); diff --git a/patches/server/More-Enchantment-API.patch b/patches/server/More-Enchantment-API.patch index 1d2e06d3c9..0e8cc97e32 100644 --- a/patches/server/More-Enchantment-API.patch +++ b/patches/server/More-Enchantment-API.patch @@ -23,42 +23,42 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Override @@ -0,0 +0,0 @@ public class CraftEnchantment extends Enchantment { public String translationKey() { - return this.target.getDescriptionId(); + return this.handle.getDescriptionId(); } + + @Override + public boolean isTradeable() { -+ return target.isTradeable(); ++ return handle.isTradeable(); + } + + @Override + public boolean isDiscoverable() { -+ return target.isDiscoverable(); ++ return handle.isDiscoverable(); + } + + @Override + public int getMinModifiedCost(int level) { -+ return target.getMinCost(level); ++ return handle.getMinCost(level); + } + + @Override + public int getMaxModifiedCost(int level) { -+ return target.getMaxCost(level); ++ return handle.getMaxCost(level); + } + + @Override + public io.papermc.paper.enchantments.EnchantmentRarity getRarity() { -+ return fromNMSRarity(target.getRarity()); ++ return fromNMSRarity(handle.getRarity()); + } + + @Override + public float getDamageIncrease(int level, org.bukkit.entity.EntityCategory entityCategory) { -+ return target.getDamageBonus(level, org.bukkit.craftbukkit.entity.CraftLivingEntity.fromBukkitEntityCategory(entityCategory)); ++ return handle.getDamageBonus(level, org.bukkit.craftbukkit.entity.CraftLivingEntity.fromBukkitEntityCategory(entityCategory)); + } + + @Override + public java.util.Set getActiveSlots() { -+ return java.util.stream.Stream.of(target.slots).map(org.bukkit.craftbukkit.CraftEquipmentSlot::getSlot).collect(java.util.stream.Collectors.toSet()); ++ return java.util.stream.Stream.of(handle.slots).map(org.bukkit.craftbukkit.CraftEquipmentSlot::getSlot).collect(java.util.stream.Collectors.toSet()); + } + + public static io.papermc.paper.enchantments.EnchantmentRarity fromNMSRarity(net.minecraft.world.item.enchantment.Enchantment.Rarity nmsRarity) { diff --git a/patches/server/Prevent-headless-pistons-from-being-created.patch b/patches/server/Prevent-headless-pistons-from-being-created.patch index befba7c8c4..e3d93b13a2 100644 --- a/patches/server/Prevent-headless-pistons-from-being-created.patch +++ b/patches/server/Prevent-headless-pistons-from-being-created.patch @@ -15,7 +15,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 set.add(blockposition); + // Paper start - prevent headless pistons from forming + if (!io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.allowHeadlessPistons && iblockdata.getBlock() == Blocks.MOVING_PISTON) { -+ BlockEntity extension = this.level.getBlockEntity(blockposition); ++ net.minecraft.world.level.block.entity.BlockEntity extension = this.level.getBlockEntity(blockposition); + if (extension instanceof net.minecraft.world.level.block.piston.PistonMovingBlockEntity blockEntity && blockEntity.isSourcePiston()) { + net.minecraft.core.Direction direction = iblockdata.getValue(net.minecraft.world.level.block.piston.PistonHeadBlock.FACING); + set.add(blockposition.relative(direction.getOpposite()));