Update Upstream(Luminol)

This commit is contained in:
Helvetica Volubi
2025-07-26 00:01:35 +08:00
parent 01582648ee
commit 94e7c4e822
3 changed files with 9 additions and 9 deletions
@@ -18,7 +18,7 @@ index 6868b915bf3deb85783a638d4441a15fea6da2dc..70740381c6501c1a518c52b24381edd1
double rangeY = level.paperConfig().entities.trackingRangeY.get(this.entity, -1);
if (rangeY != -1) {
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index dc3d29b7d1590ba366755fef51e4254d901d0da8..34b1597c56046f8fc5ab5fe9d8a5d3c96a4bc134 100644
index 894897a120123cb54f9dba898748724173c01f57..312c385780019bf483e79022bba3fe6e12ca3be7 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -147,7 +147,7 @@ import net.minecraft.world.waypoints.WaypointTransmitter;
@@ -30,7 +30,7 @@ index dc3d29b7d1590ba366755fef51e4254d901d0da8..34b1597c56046f8fc5ab5fe9d8a5d3c9
// CraftBukkit start
private static final int CURRENT_LEVEL = 2;
public boolean preserveMotion = true; // Paper - Fix Entity Teleportation and cancel velocity if teleported; keep initial motion on first snapTo
@@ -6352,4 +6352,46 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -6365,4 +6365,46 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
// Paper end - Expose entity id counter
public boolean shouldTickHot() { return this.tickCount > 20 * 10 && this.isAlive(); } // KioCG
@@ -37,10 +37,10 @@ index 5a1c21b05545a03fbb00cf734605049870d3eecb..2ade5ce23cdab08b1746e2cbe99bfe1d
if (count > i) {
source.sendFailure(Component.translatable("commands.give.failed.toomanyitems", i, itemStack.getDisplayName()));
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 3a78b917cfa2947f26a25e4d77d825e8113a83ef..bec1592ea6ce909bf9b1067e0a32d00c2c4e43f5 100644
index 68f0023c4234585a8385a830ed410883c8bd1549..1aed2578bb5f4e605fe68d1cfe4dce6a4cf5a1f7 100644
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3072,7 +3072,7 @@ public class ServerGamePacketListenerImpl
@@ -3076,7 +3076,7 @@ public class ServerGamePacketListenerImpl
} else if (slot.mayPlace(cursor)) {
if (ItemStack.isSameItemSameComponents(clickedItem, cursor)) {
int toPlace = packet.buttonNum() == 0 ? cursor.getCount() : 1;
@@ -49,7 +49,7 @@ index 3a78b917cfa2947f26a25e4d77d825e8113a83ef..bec1592ea6ce909bf9b1067e0a32d00c
toPlace = Math.min(toPlace, slot.container.getMaxStackSize() - clickedItem.getCount());
if (toPlace == 1) {
action = InventoryAction.PLACE_ONE;
@@ -3108,7 +3108,7 @@ public class ServerGamePacketListenerImpl
@@ -3112,7 +3112,7 @@ public class ServerGamePacketListenerImpl
}
} else if (ItemStack.isSameItemSameComponents(cursor, clickedItem)) {
if (clickedItem.getCount() >= 0) {
@@ -58,7 +58,7 @@ index 3a78b917cfa2947f26a25e4d77d825e8113a83ef..bec1592ea6ce909bf9b1067e0a32d00c
// As of 1.5, this is result slots only
action = InventoryAction.PICKUP_ALL;
}
@@ -3319,6 +3319,7 @@ public class ServerGamePacketListenerImpl
@@ -3323,6 +3323,7 @@ public class ServerGamePacketListenerImpl
this.player.containerMenu.broadcastFullState();
} else {
this.player.containerMenu.broadcastChanges();
@@ -66,7 +66,7 @@ index 3a78b917cfa2947f26a25e4d77d825e8113a83ef..bec1592ea6ce909bf9b1067e0a32d00c
}
if (io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.updateEquipmentOnPlayerActions) this.player.detectEquipmentUpdates(); // Paper - Force update attributes.
}
@@ -3429,7 +3430,7 @@ public class ServerGamePacketListenerImpl
@@ -3433,7 +3434,7 @@ public class ServerGamePacketListenerImpl
}
boolean flag1 = packet.slotNum() >= 1 && packet.slotNum() <= 45;
@@ -75,7 +75,7 @@ index 3a78b917cfa2947f26a25e4d77d825e8113a83ef..bec1592ea6ce909bf9b1067e0a32d00c
if (flag || (flag1 && !ItemStack.matches(this.player.inventoryMenu.getSlot(packet.slotNum()).getItem(), packet.itemStack()))) { // Insist on valid slot
// CraftBukkit start - Call click event
org.bukkit.inventory.InventoryView inventory = this.player.inventoryMenu.getBukkitView();
@@ -3471,6 +3472,7 @@ public class ServerGamePacketListenerImpl
@@ -3475,6 +3476,7 @@ public class ServerGamePacketListenerImpl
this.player.inventoryMenu.getSlot(packet.slotNum()).setByPlayer(itemStack);
this.player.inventoryMenu.setRemoteSlot(packet.slotNum(), itemStack);
this.player.inventoryMenu.broadcastChanges();