diff --git a/patches/server/0018-Remove-vanilla-profiler.patch b/patches/server/0018-Remove-vanilla-profiler.patch index 876074f..cb099f1 100644 --- a/patches/server/0018-Remove-vanilla-profiler.patch +++ b/patches/server/0018-Remove-vanilla-profiler.patch @@ -1458,6 +1458,22 @@ index cfa904d42734d0fb0c1ed8b18f4d8bc131027962..ef584de97ba678176ab9bf61365d97ca super.customServerAiStep(); } +diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java +index c6949c7ec0766bda07324a6f004b29cbd37d0f1f..b7e248b9589a52f561bddacdbdf873cdfec290b4 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java ++++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java +@@ -435,11 +435,8 @@ public class Sniffer extends Animal { + + @Override + protected void customServerAiStep() { +- this.level.getProfiler().push("snifferBrain"); + this.getBrain().tick((ServerLevel) this.level, this); +- this.level.getProfiler().popPush("snifferActivityUpdate"); + SnifferAi.updateActivity(this); +- this.level.getProfiler().pop(); + super.customServerAiStep(); + } + diff --git a/src/main/java/net/minecraft/world/entity/monster/Zoglin.java b/src/main/java/net/minecraft/world/entity/monster/Zoglin.java index 51ad507a3b625201ecca50bd92f8f089f3b4d60a..818d1f09b63ad0df9e3fae059a05801571a5606d 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Zoglin.java diff --git a/patches/server/0054-Reduce-hopper-item-checks.patch b/patches/server/0054-Reduce-hopper-item-checks.patch index d4be363..83d95cf 100644 --- a/patches/server/0054-Reduce-hopper-item-checks.patch +++ b/patches/server/0054-Reduce-hopper-item-checks.patch @@ -119,7 +119,7 @@ index a05acf709735b40ca86f978508c63a86065fd405..3752b4ba7fb0d680d4b4a61bf44d54d5 double getLevelY(); diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java -index b925173cba818e740f490e5b9f21ffafb043a217..81ad831d878c303efe62cc0f9b24f55bc0d5b1d7 100644 +index b925173cba818e740f490e5b9f21ffafb043a217..c4208b01d4bfb02eed09949e31821cd8e40b6eca 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java @@ -11,6 +11,7 @@ import net.minecraft.core.Direction; @@ -130,7 +130,15 @@ index b925173cba818e740f490e5b9f21ffafb043a217..81ad831d878c303efe62cc0f9b24f55b import net.minecraft.world.CompoundContainer; import net.minecraft.world.Container; import net.minecraft.world.ContainerHelper; -@@ -501,7 +502,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen +@@ -20,6 +21,7 @@ import net.minecraft.world.entity.Entity; + import net.minecraft.world.entity.EntitySelector; + import net.minecraft.world.entity.item.ItemEntity; + import net.minecraft.world.entity.player.Player; ++import net.minecraft.world.entity.vehicle.MinecartHopper; + import net.minecraft.world.inventory.AbstractContainerMenu; + import net.minecraft.world.inventory.HopperMenu; + import net.minecraft.world.item.ItemStack; +@@ -501,7 +503,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen } // Paper end }); @@ -139,7 +147,7 @@ index b925173cba818e740f490e5b9f21ffafb043a217..81ad831d878c303efe62cc0f9b24f55b Iterator iterator = HopperBlockEntity.getItemsAtAndAbove(world, hopper).iterator(); ItemEntity entityitem; -@@ -516,6 +517,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen +@@ -516,6 +518,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen return true; } @@ -147,7 +155,7 @@ index b925173cba818e740f490e5b9f21ffafb043a217..81ad831d878c303efe62cc0f9b24f55b } @io.papermc.paper.annotation.DoNotUse // Paper - method unused as logic is inlined above -@@ -805,6 +807,31 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen +@@ -805,6 +808,31 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen return !first.is(second.getItem()) ? false : (first.getDamageValue() != second.getDamageValue() ? false : (first.getCount() > first.getMaxStackSize() ? false : ItemStack.tagMatches(first, second))); } diff --git a/patches/server/0083-Reduce-array-allocations.patch b/patches/server/0083-Reduce-array-allocations.patch index dca5135..0290931 100644 --- a/patches/server/0083-Reduce-array-allocations.patch +++ b/patches/server/0083-Reduce-array-allocations.patch @@ -889,10 +889,10 @@ index 2a786c9fd29dc2139cf487fa645cd43345d60167..ea427d38452dddcd1ab67b4699554289 private static final int[] SLOTS_FOR_SIDES = new int[]{1}; public static final int DATA_LIT_DURATION = 1; diff --git a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java -index 36af81f0957d17e170d229059c66f4eb4539dfeb..ddf11cf359bf621e88c93fc43739af424faf65e3 100644 +index 36af81f0957d17e170d229059c66f4eb4539dfeb..d6693314e7814763bf216d62ccf6c2211e8f5341 100644 --- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java +++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java -@@ -4,12 +4,12 @@ import com.mojang.datafixers.DataFixer; +@@ -4,12 +4,13 @@ import com.mojang.datafixers.DataFixer; import com.mojang.logging.LogUtils; import java.io.File; import javax.annotation.Nullable; @@ -901,13 +901,13 @@ index 36af81f0957d17e170d229059c66f4eb4539dfeb..ddf11cf359bf621e88c93fc43739af42 import net.minecraft.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.NbtIo; --import net.minecraft.nbt.NbtUtils; + import net.minecraft.nbt.NbtUtils; import net.minecraft.server.level.ServerPlayer; -import net.minecraft.util.datafix.DataFixTypes; import net.minecraft.world.entity.player.Player; import org.slf4j.Logger; -@@ -119,7 +119,7 @@ public class PlayerDataStorage { +@@ -119,7 +120,7 @@ public class PlayerDataStorage { String[] astring = this.playerDir.list(); if (astring == null) { diff --git a/patches/server/0121-Load-portal-destination-chunk-before-entity-teleport.patch b/patches/server/0121-Load-portal-destination-chunk-before-entity-teleport.patch index 67ae7a3..ea96ae6 100644 --- a/patches/server/0121-Load-portal-destination-chunk-before-entity-teleport.patch +++ b/patches/server/0121-Load-portal-destination-chunk-before-entity-teleport.patch @@ -13,7 +13,7 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 70b9efbbee8ad78538379459d4e3b10c688acad6..08f0497a51da53646c347a010e412760245290da 100644 +index 70b9efbbee8ad78538379459d4e3b10c688acad6..7945c979d229d0cae099ffee8568f4a9906ea819 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -3475,6 +3475,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -22,7 +22,7 @@ index 70b9efbbee8ad78538379459d4e3b10c688acad6..08f0497a51da53646c347a010e412760 if (entity != null) { + // Gale start - MultiPaper - load portal destination chunk before entity teleport + if (entity.level.galeConfig().gameplayMechanics.technical.loadPortalDestinationChunkBeforeEntityTeleport) { -+ BlockPos pos = new BlockPos(position); ++ BlockPos pos = BlockPos.containing(position); + worldserver.getChunkSource().addRegionTicket(TicketType.PORTAL, new ChunkPos(pos), 1, pos); + worldserver.getChunkAt(pos); + } diff --git a/patches/server/0128-Prevent-entities-random-strolling-into-non-ticking-c.patch b/patches/server/0128-Prevent-entities-random-strolling-into-non-ticking-c.patch index e41f077..85596fe 100644 --- a/patches/server/0128-Prevent-entities-random-strolling-into-non-ticking-c.patch +++ b/patches/server/0128-Prevent-entities-random-strolling-into-non-ticking-c.patch @@ -13,7 +13,7 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/RandomStrollGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/RandomStrollGoal.java -index 216929c838446c3c14d9b9906ffa625ef35fcbc8..29c7f53a4fa88a77c4076a6294e689e4dff9977b 100644 +index 216929c838446c3c14d9b9906ffa625ef35fcbc8..f9e0cf073abf3e0ffcedd4418a66c310e057d368 100644 --- a/src/main/java/net/minecraft/world/entity/ai/goal/RandomStrollGoal.java +++ b/src/main/java/net/minecraft/world/entity/ai/goal/RandomStrollGoal.java @@ -2,6 +2,9 @@ package net.minecraft.world.entity.ai.goal; @@ -31,7 +31,7 @@ index 216929c838446c3c14d9b9906ffa625ef35fcbc8..29c7f53a4fa88a77c4076a6294e689e4 Vec3 vec3 = this.getPosition(); - if (vec3 == null) { -+ if (vec3 == null || (!this.mob.level.galeConfig().gameplayMechanics.entitiesCanRandomStrollIntoNonTickingChunks && !((ServerLevel) this.mob.level).isPositionEntityTicking(new BlockPos(vec3)))) { // Gale - MultiPaper - prevent entities random strolling into non-ticking chunks ++ if (vec3 == null || (!this.mob.level.galeConfig().gameplayMechanics.entitiesCanRandomStrollIntoNonTickingChunks && !((ServerLevel) this.mob.level).isPositionEntityTicking(BlockPos.containing(vec3)))) { // Gale - MultiPaper - prevent entities random strolling into non-ticking chunks return false; } else { this.wantedX = vec3.x; diff --git a/patches/server/0169-fixup-load-portal-destination-chunk-before-entity-te.patch b/patches/server/0169-fixup-load-portal-destination-chunk-before-entity-te.patch deleted file mode 100644 index 341be67..0000000 --- a/patches/server/0169-fixup-load-portal-destination-chunk-before-entity-te.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Martijn Muijsers -Date: Tue, 21 Mar 2023 17:56:47 +0100 -Subject: [PATCH] fixup load portal destination chunk before entity teleport - - -diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index b6404bfac381352b6ceb23a1b95ed5f3ccabe606..697fad59a6ab4fb41aac65979b42d8ed4b4c8c21 100644 ---- a/src/main/java/net/minecraft/world/entity/Entity.java -+++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3486,7 +3486,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { - if (entity != null) { - // Gale start - MultiPaper - load portal destination chunk before entity teleport - if (entity.level.galeConfig().gameplayMechanics.technical.loadPortalDestinationChunkBeforeEntityTeleport) { -- BlockPos pos = new BlockPos(position); -+ BlockPos pos = BlockPos.containing(position); - worldserver.getChunkSource().addRegionTicket(TicketType.PORTAL, new ChunkPos(pos), 1, pos); - worldserver.getChunkAt(pos); - } diff --git a/patches/server/0170-fixup-reduce-array-allocations.patch b/patches/server/0170-fixup-reduce-array-allocations.patch deleted file mode 100644 index 3293c00..0000000 --- a/patches/server/0170-fixup-reduce-array-allocations.patch +++ /dev/null @@ -1,18 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Martijn Muijsers -Date: Tue, 21 Mar 2023 17:57:43 +0100 -Subject: [PATCH] fixup reduce array allocations - - -diff --git a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java -index ddf11cf359bf621e88c93fc43739af424faf65e3..d6693314e7814763bf216d62ccf6c2211e8f5341 100644 ---- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java -+++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java -@@ -9,6 +9,7 @@ import me.titaniumtown.ArrayConstants; - import net.minecraft.Util; - import net.minecraft.nbt.CompoundTag; - import net.minecraft.nbt.NbtIo; -+import net.minecraft.nbt.NbtUtils; - import net.minecraft.server.level.ServerPlayer; - import net.minecraft.world.entity.player.Player; - import org.slf4j.Logger; diff --git a/patches/server/0171-fixup-prevent-entities-random-strolling-into-non-tic.patch b/patches/server/0171-fixup-prevent-entities-random-strolling-into-non-tic.patch deleted file mode 100644 index 5f20821..0000000 --- a/patches/server/0171-fixup-prevent-entities-random-strolling-into-non-tic.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Martijn Muijsers -Date: Tue, 21 Mar 2023 17:58:28 +0100 -Subject: [PATCH] fixup prevent entities random strolling into non-ticking - chunks - - -diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/RandomStrollGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/RandomStrollGoal.java -index 29c7f53a4fa88a77c4076a6294e689e4dff9977b..f9e0cf073abf3e0ffcedd4418a66c310e057d368 100644 ---- a/src/main/java/net/minecraft/world/entity/ai/goal/RandomStrollGoal.java -+++ b/src/main/java/net/minecraft/world/entity/ai/goal/RandomStrollGoal.java -@@ -52,7 +52,7 @@ public class RandomStrollGoal extends Goal { - } - - Vec3 vec3 = this.getPosition(); -- if (vec3 == null || (!this.mob.level.galeConfig().gameplayMechanics.entitiesCanRandomStrollIntoNonTickingChunks && !((ServerLevel) this.mob.level).isPositionEntityTicking(new BlockPos(vec3)))) { // Gale - MultiPaper - prevent entities random strolling into non-ticking chunks -+ if (vec3 == null || (!this.mob.level.galeConfig().gameplayMechanics.entitiesCanRandomStrollIntoNonTickingChunks && !((ServerLevel) this.mob.level).isPositionEntityTicking(BlockPos.containing(vec3)))) { // Gale - MultiPaper - prevent entities random strolling into non-ticking chunks - return false; - } else { - this.wantedX = vec3.x; diff --git a/patches/server/0172-fixup-remove-profiler.patch b/patches/server/0172-fixup-remove-profiler.patch deleted file mode 100644 index 204a632..0000000 --- a/patches/server/0172-fixup-remove-profiler.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Martijn Muijsers -Date: Tue, 21 Mar 2023 17:59:14 +0100 -Subject: [PATCH] fixup remove profiler - - -diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java -index c6949c7ec0766bda07324a6f004b29cbd37d0f1f..b7e248b9589a52f561bddacdbdf873cdfec290b4 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java -+++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java -@@ -435,11 +435,8 @@ public class Sniffer extends Animal { - - @Override - protected void customServerAiStep() { -- this.level.getProfiler().push("snifferBrain"); - this.getBrain().tick((ServerLevel) this.level, this); -- this.level.getProfiler().popPush("snifferActivityUpdate"); - SnifferAi.updateActivity(this); -- this.level.getProfiler().pop(); - super.customServerAiStep(); - } - diff --git a/patches/server/0173-fixup-reduce-hopper-item-checks.patch b/patches/server/0173-fixup-reduce-hopper-item-checks.patch deleted file mode 100644 index 9e15a67..0000000 --- a/patches/server/0173-fixup-reduce-hopper-item-checks.patch +++ /dev/null @@ -1,18 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Martijn Muijsers -Date: Tue, 21 Mar 2023 18:00:19 +0100 -Subject: [PATCH] fixup reduce hopper item checks - - -diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java -index 81ad831d878c303efe62cc0f9b24f55bc0d5b1d7..c4208b01d4bfb02eed09949e31821cd8e40b6eca 100644 ---- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java -+++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java -@@ -21,6 +21,7 @@ import net.minecraft.world.entity.Entity; - import net.minecraft.world.entity.EntitySelector; - import net.minecraft.world.entity.item.ItemEntity; - import net.minecraft.world.entity.player.Player; -+import net.minecraft.world.entity.vehicle.MinecartHopper; - import net.minecraft.world.inventory.AbstractContainerMenu; - import net.minecraft.world.inventory.HopperMenu; - import net.minecraft.world.item.ItemStack;