mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
106 lines
5.3 KiB
Diff
106 lines
5.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
|
Date: Sun, 13 Jul 2025 20:03:51 +0300
|
|
Subject: [PATCH] Cleanup dead code from Paper
|
|
|
|
|
|
diff --git a/net/minecraft/network/Connection.java b/net/minecraft/network/Connection.java
|
|
index 3f85f9e9551b2eed6e66ab8036dbb1f40fb8bbac..78650957bacc0e26d3299a8de7f8bfc57c86627c 100644
|
|
--- a/net/minecraft/network/Connection.java
|
|
+++ b/net/minecraft/network/Connection.java
|
|
@@ -602,13 +602,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
|
if (!(this.packetListener instanceof net.minecraft.server.network.ServerLoginPacketListenerImpl loginPacketListener)
|
|
|| loginPacketListener.state != net.minecraft.server.network.ServerLoginPacketListenerImpl.State.VERIFYING
|
|
|| Connection.joinAttemptsThisTick++ < MAX_PER_TICK) {
|
|
- // Paper start - detailed watchdog information
|
|
- net.minecraft.network.PacketProcessor.packetProcessing.push(this.packetListener);
|
|
- try {
|
|
- tickablePacketListener.tick();
|
|
- } finally {
|
|
- net.minecraft.network.PacketProcessor.packetProcessing.pop();
|
|
- } // Paper end - detailed watchdog information
|
|
+ tickablePacketListener.tick();
|
|
} // Paper end - Buffer joins to world
|
|
}
|
|
|
|
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
|
index 01ad6566c236bac2141f75fa9cf37844e3d97637..a4a2231f5850269a6003afca8db78fa486cf3a71 100644
|
|
--- a/net/minecraft/server/level/ServerLevel.java
|
|
+++ b/net/minecraft/server/level/ServerLevel.java
|
|
@@ -1370,13 +1370,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
|
// Paper end - log detailed entity tick information
|
|
|
|
public void tickNonPassenger(Entity entity) {
|
|
- // Paper start - log detailed entity tick information
|
|
ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread("Cannot tick an entity off-main");
|
|
- try {
|
|
- if (currentlyTickingEntity.get() == null) {
|
|
- currentlyTickingEntity.lazySet(entity);
|
|
- }
|
|
- // Paper end - log detailed entity tick information
|
|
entity.setOldPosAndRot();
|
|
entity.tickCount++;
|
|
entity.totalEntityAge++; // Paper - age-like counter for all entities
|
|
@@ -1389,13 +1383,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
|
for (Entity entity1 : entity.getPassengers()) {
|
|
this.tickPassenger(entity, entity1, isActive); // Paper - EAR 2
|
|
}
|
|
- // Paper start - log detailed entity tick information
|
|
- } finally {
|
|
- if (currentlyTickingEntity.get() == entity) {
|
|
- currentlyTickingEntity.lazySet(null);
|
|
- }
|
|
- }
|
|
- // Paper end - log detailed entity tick information
|
|
}
|
|
|
|
private void tickPassenger(Entity ridingEntity, Entity passengerEntity, final boolean isActive) { // Paper - EAR 2
|
|
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
|
index 6724ef32e4d0de6ca0965b8b96430b68179b4bd7..72628fab95b76b67630594611f894a5ecdad5fc3 100644
|
|
--- a/net/minecraft/world/entity/Entity.java
|
|
+++ b/net/minecraft/world/entity/Entity.java
|
|
@@ -1117,29 +1117,10 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
|
return this.onGround;
|
|
}
|
|
|
|
- // Paper start - detailed watchdog information
|
|
- public final Object posLock = new Object(); // Paper - log detailed entity tick information
|
|
-
|
|
- @Nullable
|
|
- private Vec3 moveVector;
|
|
- private double moveStartX;
|
|
- private double moveStartY;
|
|
- private double moveStartZ;
|
|
- // Paper end - detailed watchdog information
|
|
-
|
|
public void move(MoverType type, Vec3 movement) {
|
|
if (!this.boundingBoxChanged && movement.equals(Vec3.ZERO)) return; // DivineMC - VMP: skip entity move if movement is zero
|
|
final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity
|
|
- // Paper start - detailed watchdog information
|
|
ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread("Cannot move an entity off-main");
|
|
- synchronized (this.posLock) {
|
|
- this.moveStartX = this.getX();
|
|
- this.moveStartY = this.getY();
|
|
- this.moveStartZ = this.getZ();
|
|
- this.moveVector = movement;
|
|
- }
|
|
- try {
|
|
- // Paper end - detailed watchdog information
|
|
if (this.noPhysics) {
|
|
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
|
|
this.horizontalCollision = false;
|
|
@@ -1260,13 +1241,6 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
|
|
this.setDeltaMovement(this.getDeltaMovement().multiply(blockSpeedFactor, 1.0, blockSpeedFactor));
|
|
}
|
|
}
|
|
- // Paper start - detailed watchdog information
|
|
- } finally {
|
|
- synchronized (this.posLock) { // Paper
|
|
- this.moveVector = null;
|
|
- } // Paper
|
|
- }
|
|
- // Paper end - detailed watchdog information
|
|
}
|
|
|
|
private void applyMovementEmissionAndPlaySound(Entity.MovementEmission movementEmission, Vec3 movement, BlockPos pos, BlockState state) {
|