diff --git a/patches/server/Add-additional-open-container-api-to-HumanEntity.patch b/patches/server/Add-additional-open-container-api-to-HumanEntity.patch index 408fbd3023..ddc15be28d 100644 --- a/patches/server/Add-additional-open-container-api-to-HumanEntity.patch +++ b/patches/server/Add-additional-open-container-api-to-HumanEntity.patch @@ -15,38 +15,38 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper start - Add additional containers + @Override + public InventoryView openAnvil(Location location, boolean force) { -+ return openInventory(location, force, Material.ANVIL); ++ return this.openInventory(location, force, Material.ANVIL); + } + + @Override + public InventoryView openCartographyTable(Location location, boolean force) { -+ return openInventory(location, force, Material.CARTOGRAPHY_TABLE); ++ return this.openInventory(location, force, Material.CARTOGRAPHY_TABLE); + } + + @Override + public InventoryView openGrindstone(Location location, boolean force) { -+ return openInventory(location, force, Material.GRINDSTONE); ++ return this.openInventory(location, force, Material.GRINDSTONE); + } + + @Override + public InventoryView openLoom(Location location, boolean force) { -+ return openInventory(location, force, Material.LOOM); ++ return this.openInventory(location, force, Material.LOOM); + } + + @Override + public InventoryView openSmithingTable(Location location, boolean force) { -+ return openInventory(location, force, Material.SMITHING_TABLE); ++ return this.openInventory(location, force, Material.SMITHING_TABLE); + } + + @Override + public InventoryView openStonecutter(Location location, boolean force) { -+ return openInventory(location, force, Material.STONECUTTER); ++ return this.openInventory(location, force, Material.STONECUTTER); + } + + private InventoryView openInventory(Location location, boolean force, Material material) { + org.spigotmc.AsyncCatcher.catchOp("open" + material); + if (location == null) { -+ location = getLocation(); ++ location = this.getLocation(); + } + if (!force) { + Block block = location.getBlock(); @@ -70,9 +70,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } else { + throw new IllegalArgumentException("Unsupported inventory type: " + material); + } -+ getHandle().openMenu(block.getMenuProvider(null, getHandle().level, new BlockPos(location.getBlockX(), location.getBlockY(), location.getBlockZ()))); -+ getHandle().containerMenu.checkReachable = !force; -+ return getHandle().containerMenu.getBukkitView(); ++ this.getHandle().openMenu(block.getMenuProvider(null, this.getHandle().level(), new BlockPos(location.getBlockX(), location.getBlockY(), location.getBlockZ()))); ++ this.getHandle().containerMenu.checkReachable = !force; ++ return this.getHandle().containerMenu.getBukkitView(); + } + // Paper end + diff --git a/patches/server/Added-world-settings-for-mobs-picking-up-loot.patch b/patches/server/Added-world-settings-for-mobs-picking-up-loot.patch index 33bd829725..25045a0d6b 100644 --- a/patches/server/Added-world-settings-for-mobs-picking-up-loot.patch +++ b/patches/server/Added-world-settings-for-mobs-picking-up-loot.patch @@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.populateDefaultEquipmentEnchantments(randomsource, difficulty); this.reassessWeaponGoal(); - this.setCanPickUpLoot(randomsource.nextFloat() < 0.55F * difficulty.getSpecialMultiplier()); -+ this.setCanPickUpLoot(this.level.paperConfig().entities.behavior.mobsCanAlwaysPickUpLoot.skeletons || randomsource.nextFloat() < 0.55F * difficulty.getSpecialMultiplier()); // Paper ++ this.setCanPickUpLoot(this.level().paperConfig().entities.behavior.mobsCanAlwaysPickUpLoot.skeletons || randomsource.nextFloat() < 0.55F * difficulty.getSpecialMultiplier()); // Paper if (this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) { LocalDate localdate = LocalDate.now(); int i = localdate.get(ChronoField.DAY_OF_MONTH); diff --git a/patches/server/Additional-Block-Material-API-s.patch b/patches/server/Additional-Block-Material-API-s.patch index c292d85bc5..2e0ab646b0 100644 --- a/patches/server/Additional-Block-Material-API-s.patch +++ b/patches/server/Additional-Block-Material-API-s.patch @@ -19,19 +19,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper start + @Override + public boolean isBuildable() { -+ return getNMS().getMaterial().isSolid(); // This is in fact isSolid, despite the fact that isSolid below returns blocksMotion ++ return this.getNMS().isSolid(); // This is in fact isSolid, despite the fact that isSolid below returns blocksMotion + } + @Override + public boolean isBurnable() { -+ return getNMS().getMaterial().isFlammable(); ++ return this.getNMS().ignitedByLava(); + } + @Override + public boolean isReplaceable() { -+ return getNMS().getMaterial().isReplaceable(); ++ return this.getNMS().canBeReplaced(); + } + @Override + public boolean isSolid() { -+ return getNMS().getMaterial().blocksMotion(); ++ return this.getNMS().blocksMotion(); + } + // Paper end + diff --git a/patches/server/Configurable-door-breaking-difficulty.patch b/patches/server/Configurable-door-breaking-difficulty.patch index d1c2833d88..47b8e7edc3 100644 --- a/patches/server/Configurable-door-breaking-difficulty.patch +++ b/patches/server/Configurable-door-breaking-difficulty.patch @@ -18,7 +18,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 static class VindicatorBreakDoorGoal extends BreakDoorGoal { public VindicatorBreakDoorGoal(Mob mob) { - super(mob, 6, Vindicator.DOOR_BREAKING_PREDICATE); -+ super(mob, 6, com.google.common.base.Predicates.in(mob.level.paperConfig().entities.behavior.doorBreakingDifficulty.getOrDefault(mob.getType(), mob.level.paperConfig().entities.behavior.doorBreakingDifficulty.get(EntityType.VINDICATOR)))); // Paper ++ super(mob, 6, com.google.common.base.Predicates.in(mob.level().paperConfig().entities.behavior.doorBreakingDifficulty.getOrDefault(mob.getType(), mob.level().paperConfig().entities.behavior.doorBreakingDifficulty.get(EntityType.VINDICATOR)))); // Paper this.setFlags(EnumSet.of(Goal.Flag.MOVE)); } diff --git a/patches/server/Ensure-EntityRaider-respects-game-and-entity-rules-f.patch b/patches/server/Ensure-EntityRaider-respects-game-and-entity-rules-f.patch index a7b87e482c..8e8ee25ee3 100644 --- a/patches/server/Ensure-EntityRaider-respects-game-and-entity-rules-f.patch +++ b/patches/server/Ensure-EntityRaider-respects-game-and-entity-rules-f.patch @@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Override public boolean canUse() { -+ if (!this.mob.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) || !this.mob.canPickUpLoot()) return false; // Paper - respect game and entity rules for picking up items ++ if (!this.mob.level().getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) || !this.mob.canPickUpLoot()) return false; // Paper - respect game and entity rules for picking up items Raid raid = this.mob.getCurrentRaid(); if (this.mob.hasActiveRaid() && !this.mob.getCurrentRaid().isOver() && this.mob.canBeLeader() && !ItemStack.matches(this.mob.getItemBySlot(EquipmentSlot.HEAD), Raid.getLeaderBannerInstance())) { diff --git a/patches/server/Fix-curing-zombie-villager-discount-exploit.patch b/patches/server/Fix-curing-zombie-villager-discount-exploit.patch index ef550076ea..9afb4b15dd 100644 --- a/patches/server/Fix-curing-zombie-villager-discount-exploit.patch +++ b/patches/server/Fix-curing-zombie-villager-discount-exploit.patch @@ -16,7 +16,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public void onReputationEventFrom(ReputationEventType interaction, Entity entity) { if (interaction == ReputationEventType.ZOMBIE_VILLAGER_CURED) { + // Paper start - fix MC-181190 -+ if (level.paperConfig().fixes.fixCuringZombieVillagerDiscountExploit) { ++ if (this.level().paperConfig().fixes.fixCuringZombieVillagerDiscountExploit) { + final GossipContainer.EntityGossips playerReputation = this.getGossips().gossips.get(entity.getUUID()); + if (playerReputation != null) { + playerReputation.remove(GossipType.MAJOR_POSITIVE); diff --git a/patches/server/Fix-harming-potion-dupe.patch b/patches/server/Fix-harming-potion-dupe.patch index c8b00beca3..7668766e34 100644 --- a/patches/server/Fix-harming-potion-dupe.patch +++ b/patches/server/Fix-harming-potion-dupe.patch @@ -39,7 +39,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end if (entityhuman == null || !entityhuman.getAbilities().instabuild) { + // Paper start - Fix harming potion dupe -+ if (user.getHealth() <= 0 && !user.level.getGameRules().getBoolean(net.minecraft.world.level.GameRules.RULE_KEEPINVENTORY)) { ++ if (user.getHealth() <= 0 && !user.level().getGameRules().getBoolean(net.minecraft.world.level.GameRules.RULE_KEEPINVENTORY)) { + user.spawnAtLocation(new ItemStack(Items.GLASS_BOTTLE), 0); + return ItemStack.EMPTY; + } diff --git a/patches/server/Improve-fix-EntityTargetLivingEntityEvent.patch b/patches/server/Improve-fix-EntityTargetLivingEntityEvent.patch index 34ceee266f..ec1dc98b8c 100644 --- a/patches/server/Improve-fix-EntityTargetLivingEntityEvent.patch +++ b/patches/server/Improve-fix-EntityTargetLivingEntityEvent.patch @@ -20,7 +20,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + reason = EntityTargetEvent.TargetReason.FORGOT_TARGET; + } else if (!entityliving.isAlive()) { + reason = EntityTargetEvent.TargetReason.TARGET_DIED; -+ } else if (entityliving.level != entityinsentient.level) { ++ } else if (entityliving.level() != entityinsentient.level()) { + reason = EntityTargetEvent.TargetReason.TARGET_OTHER_LEVEL; + } else { + reason = EntityTargetEvent.TargetReason.TARGET_INVALID; diff --git a/patches/server/Optimize-Collision-to-not-load-chunks.patch b/patches/server/Optimize-Collision-to-not-load-chunks.patch index 7364858ca2..6b011ae480 100644 --- a/patches/server/Optimize-Collision-to-not-load-chunks.patch +++ b/patches/server/Optimize-Collision-to-not-load-chunks.patch @@ -77,7 +77,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + if (blockState == null) { + if (!(source instanceof net.minecraft.server.level.ServerPlayer) || source.level().paperConfig().chunks.preventMovingIntoUnloadedChunks) { -+ return Shapes.create(far ? source.getBoundingBox() : new AABB(new BlockPos(x, y, z))); ++ return this.resultProvider.apply(new BlockPos.MutableBlockPos(x, y, z), Shapes.create(far ? source.getBoundingBox() : new AABB(new BlockPos(x, y, z)))); + } + // Paper end continue;