13
0
geforkt von Mirrors/Paper

Apply the updated patches

Dieser Commit ist enthalten in:
Nassim Jahnke 2024-12-17 11:05:41 +01:00
Ursprung 6f26d53582
Commit 4e26399002
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F
5 geänderte Dateien mit 9 neuen und 12 gelöschten Zeilen

Datei anzeigen

@ -12,7 +12,6 @@ Subject: [PATCH] Optimize Hoppers
* Don't check for Entities with Inventories if the block above us is also occluding (not just Inventoried) * Don't check for Entities with Inventories if the block above us is also occluding (not just Inventoried)
* Remove Streams from Item Suck In and restore restore 1.12 AABB checks which is simpler and no voxel allocations (was doing TWO Item Suck ins) * Remove Streams from Item Suck In and restore restore 1.12 AABB checks which is simpler and no voxel allocations (was doing TWO Item Suck ins)
diff --git a/io/papermc/paper/event/inventory/PaperInventoryMoveItemEvent.java b/io/papermc/paper/event/inventory/PaperInventoryMoveItemEvent.java diff --git a/io/papermc/paper/event/inventory/PaperInventoryMoveItemEvent.java b/io/papermc/paper/event/inventory/PaperInventoryMoveItemEvent.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..24a2090e068ad3c0d08705050944abdfe19136a2 index 0000000000000000000000000000000000000000..24a2090e068ad3c0d08705050944abdfe19136a2
@ -49,10 +48,10 @@ index 0000000000000000000000000000000000000000..24a2090e068ad3c0d08705050944abdf
+ } + }
+} +}
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index 646c2f2b617ed706021c83c9fc4492860dfdd4e9..415ab7faf371507e278d0da5bf0ffa9972585876 100644 index d450d4af96716caff4b29a84d1d83ec4010854f0..8657e4fd7c5e0e23b69d9a982408a7d038f0a787 100644
--- a/net/minecraft/server/MinecraftServer.java --- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java
@@ -1564,6 +1564,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1563,6 +1563,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
for (ServerLevel serverLevel : this.getAllLevels()) { for (ServerLevel serverLevel : this.getAllLevels()) {
serverLevel.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - BlockPhysicsEvent serverLevel.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - BlockPhysicsEvent
serverLevel.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - Add EntityMoveEvent serverLevel.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - Add EntityMoveEvent
@ -104,7 +103,7 @@ index 2ebdf1ad323bb53dfe9eed319e25856b35a1443c..77618757c0e678532dbab814aceed83f
} }
} }
diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
index 60e1e44f328e66d52ebf08476b533fef83bc5eba..8139868201c2eaca29588b840a2bd85778f1b3d5 100644 index 60e1e44f328e66d52ebf08476b533fef83bc5eba..eb02249b518c2d262315c4cd5965bec5d81166a1 100644
--- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java --- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java
+++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java +++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
@@ -139,18 +139,56 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen @@ -139,18 +139,56 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
@ -116,10 +115,10 @@ index 60e1e44f328e66d52ebf08476b533fef83bc5eba..8139868201c2eaca29588b840a2bd857
+ private static final int HOPPER_HAS_ITEMS = 1; + private static final int HOPPER_HAS_ITEMS = 1;
+ private static final int HOPPER_IS_FULL = 2; + private static final int HOPPER_IS_FULL = 2;
+ +
+ private static int getFullState(final HopperBlockEntity hoper) { + private static int getFullState(final HopperBlockEntity hopper) {
+ hoper.unpackLootTable(null); + hopper.unpackLootTable(null);
+ +
+ final List<ItemStack> hopperItems = hoper.items; + final List<ItemStack> hopperItems = hopper.items;
+ +
+ boolean empty = true; + boolean empty = true;
+ boolean full = true; + boolean full = true;

Datei anzeigen

@ -6,9 +6,8 @@ Subject: [PATCH] Optimize Bit Operations by inlining
Inline bit operations and reduce instruction count to make these hot Inline bit operations and reduce instruction count to make these hot
operations faster operations faster
diff --git a/net/minecraft/core/BlockPos.java b/net/minecraft/core/BlockPos.java diff --git a/net/minecraft/core/BlockPos.java b/net/minecraft/core/BlockPos.java
index 98f0b1cf19d7a035849a9a2fa25e2be3a4c5a980..01ba7bc16e30440e35ce062bc21dae7e59bb6f8d 100644 index 98f0b1cf19d7a035849a9a2fa25e2be3a4c5a980..0822a0faf7af9e746e7936ac17597b1f51e40a92 100644
--- a/net/minecraft/core/BlockPos.java --- a/net/minecraft/core/BlockPos.java
+++ b/net/minecraft/core/BlockPos.java +++ b/net/minecraft/core/BlockPos.java
@@ -51,15 +51,17 @@ public class BlockPos extends Vec3i { @@ -51,15 +51,17 @@ public class BlockPos extends Vec3i {
@ -85,7 +84,7 @@ index 98f0b1cf19d7a035849a9a2fa25e2be3a4c5a980..01ba7bc16e30440e35ce062bc21dae7e
public static long getFlatIndex(long packedPos) { public static long getFlatIndex(long packedPos) {
diff --git a/net/minecraft/core/SectionPos.java b/net/minecraft/core/SectionPos.java diff --git a/net/minecraft/core/SectionPos.java b/net/minecraft/core/SectionPos.java
index 1780d8e14cea62971da75e4dcc80d1805434037b..737f853a264d720ce15f6bbffc206e3003fff380 100644 index 1780d8e14cea62971da75e4dcc80d1805434037b..ce8c394ea1a7bc5bf5c568c82e6158b19df517d8 100644
--- a/net/minecraft/core/SectionPos.java --- a/net/minecraft/core/SectionPos.java
+++ b/net/minecraft/core/SectionPos.java +++ b/net/minecraft/core/SectionPos.java
@@ -38,7 +38,7 @@ public class SectionPos extends Vec3i { @@ -38,7 +38,7 @@ public class SectionPos extends Vec3i {

Datei anzeigen

@ -15,7 +15,6 @@ Optimize collection by creating a list instead of a set of the key and value.
This lets us get faster foreach iteration, as well as avoids map lookups on This lets us get faster foreach iteration, as well as avoids map lookups on
the values when needed. the values when needed.
diff --git a/net/minecraft/world/level/pathfinder/PathFinder.java b/net/minecraft/world/level/pathfinder/PathFinder.java diff --git a/net/minecraft/world/level/pathfinder/PathFinder.java b/net/minecraft/world/level/pathfinder/PathFinder.java
index a6ef296f7af1f784e1f0772947a6cb3519a3bc2a..81de6c1bbef1cafd3036e736dd305fbedc8368c6 100644 index a6ef296f7af1f784e1f0772947a6cb3519a3bc2a..81de6c1bbef1cafd3036e736dd305fbedc8368c6 100644
--- a/net/minecraft/world/level/pathfinder/PathFinder.java --- a/net/minecraft/world/level/pathfinder/PathFinder.java

Datei anzeigen

@ -30621,7 +30621,7 @@ index 1110ca4075a1bbaa46b66686435dab91b275c945..c2218630c3074c8b3f82364e37503b12
return structureTemplate.save(new CompoundTag()); return structureTemplate.save(new CompoundTag());
} }
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index d450d4af96716caff4b29a84d1d83ec4010854f0..646c2f2b617ed706021c83c9fc4492860dfdd4e9 100644 index 8657e4fd7c5e0e23b69d9a982408a7d038f0a787..415ab7faf371507e278d0da5bf0ffa9972585876 100644
--- a/net/minecraft/server/MinecraftServer.java --- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java
@@ -301,6 +301,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -301,6 +301,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa