mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 02:47:43 +01:00
fix ATs getting stuck in file patches
This commit is contained in:
@@ -48,10 +48,10 @@
|
|||||||
+ if (org.purpurmc.purpur.PurpurConfig.useAlternateKeepAlive) {
|
+ if (org.purpurmc.purpur.PurpurConfig.useAlternateKeepAlive) {
|
||||||
+ if (this.checkIfClosed(millis) && !this.processedDisconnect) {
|
+ if (this.checkIfClosed(millis) && !this.processedDisconnect) {
|
||||||
+ long currTime = System.nanoTime();
|
+ long currTime = System.nanoTime();
|
||||||
+ if ((currTime - this.player.lastKeepAliveTx) >= java.util.concurrent.TimeUnit.SECONDS.toNanos(1L)) { // 1 second
|
+ if ((currTime - this.keepAlive.lastKeepAliveTx) >= java.util.concurrent.TimeUnit.SECONDS.toNanos(1L)) { // 1 second
|
||||||
+ this.player.lastKeepAliveTx = currTime;
|
+ this.keepAlive.lastKeepAliveTx = currTime;
|
||||||
+ if (this.keepAlivePending && !this.processedDisconnect && keepAlives.size() * 1000L >= KEEPALIVE_LIMIT) {
|
+ if (this.keepAlivePending && !this.processedDisconnect && keepAlives.size() * 1000L >= KEEPALIVE_LIMIT) {
|
||||||
+ this.disconnect(ServerCommonPacketListenerImpl.TIMEOUT_DISCONNECTION_MESSAGE, org.bukkit.event.player.PlayerKickEvent.Cause.TIMEOUT);
|
+ this.disconnect(TIMEOUT_DISCONNECTION_MESSAGE, io.papermc.paper.connection.DisconnectionReason.TIMEOUT);
|
||||||
+ } else if (this.checkIfClosed(millis)) {
|
+ } else if (this.checkIfClosed(millis)) {
|
||||||
+ this.keepAlivePending = true;
|
+ this.keepAlivePending = true;
|
||||||
+ this.keepAlives.add(millis); // currentTime is ID
|
+ this.keepAlives.add(millis); // currentTime is ID
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
public int tickCount;
|
public int tickCount;
|
||||||
private int remainingFireTicks;
|
private int remainingFireTicks;
|
||||||
public boolean wasTouchingWater;
|
public boolean wasTouchingWater;
|
||||||
@@ -315,13 +_,13 @@
|
@@ -315,8 +_,8 @@
|
||||||
public PortalProcessor portalProcess;
|
public PortalProcessor portalProcess;
|
||||||
public int portalCooldown;
|
public int portalCooldown;
|
||||||
private boolean invulnerable;
|
private boolean invulnerable;
|
||||||
@@ -30,12 +30,6 @@
|
|||||||
private boolean hasGlowingTag;
|
private boolean hasGlowingTag;
|
||||||
private final Set<String> tags = new io.papermc.paper.util.SizeLimitedSet<>(new it.unimi.dsi.fastutil.objects.ObjectOpenHashSet<>(), MAX_ENTITY_TAG_COUNT); // Paper - fully limit tag size - replace set impl
|
private final Set<String> tags = new io.papermc.paper.util.SizeLimitedSet<>(new it.unimi.dsi.fastutil.objects.ObjectOpenHashSet<>(), MAX_ENTITY_TAG_COUNT); // Paper - fully limit tag size - replace set impl
|
||||||
private final double[] pistonDeltas = new double[]{0.0, 0.0, 0.0};
|
private final double[] pistonDeltas = new double[]{0.0, 0.0, 0.0};
|
||||||
private long pistonDeltasGameTime;
|
|
||||||
- protected EntityDimensions dimensions;
|
|
||||||
+ private EntityDimensions dimensions;
|
|
||||||
private float eyeHeight;
|
|
||||||
public boolean isInPowderSnow;
|
|
||||||
public boolean wasInPowderSnow;
|
|
||||||
@@ -371,6 +_,7 @@
|
@@ -371,6 +_,7 @@
|
||||||
public long activatedTick = Integer.MIN_VALUE;
|
public long activatedTick = Integer.MIN_VALUE;
|
||||||
public boolean isTemporarilyActive;
|
public boolean isTemporarilyActive;
|
||||||
@@ -83,15 +77,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean causeFallDamage(double fallDistance, float damageMultiplier, DamageSource damageSource) {
|
public boolean causeFallDamage(double fallDistance, float damageMultiplier, DamageSource damageSource) {
|
||||||
@@ -1964,7 +_,7 @@
|
|
||||||
return this.isInWater() || flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
- public void updateInWaterStateAndDoWaterCurrentPushing() {
|
|
||||||
+ void updateInWaterStateAndDoWaterCurrentPushing() {
|
|
||||||
if (this.getVehicle() instanceof AbstractBoat abstractBoat && !abstractBoat.isUnderWater()) {
|
|
||||||
this.wasTouchingWater = false;
|
|
||||||
} else if (this.updateFluidHeightAndDoFluidPushing(FluidTags.WATER, 0.014)) {
|
|
||||||
@@ -2585,6 +_,11 @@
|
@@ -2585,6 +_,11 @@
|
||||||
output.putBoolean("Paper.FreezeLock", true);
|
output.putBoolean("Paper.FreezeLock", true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
--- a/net/minecraft/world/entity/monster/Shulker.java
|
--- a/net/minecraft/world/entity/monster/Shulker.java
|
||||||
+++ b/net/minecraft/world/entity/monster/Shulker.java
|
+++ b/net/minecraft/world/entity/monster/Shulker.java
|
||||||
@@ -80,7 +_,7 @@
|
|
||||||
Vec3i unitVec3i = Direction.SOUTH.getUnitVec3i();
|
|
||||||
return new Vector3f(unitVec3i.getX(), unitVec3i.getY(), unitVec3i.getZ());
|
|
||||||
});
|
|
||||||
- public static final float MAX_SCALE = 3.0F;
|
|
||||||
+ private static final float MAX_SCALE = 3.0F;
|
|
||||||
private float currentPeekAmountO;
|
|
||||||
private float currentPeekAmount;
|
|
||||||
@Nullable
|
|
||||||
@@ -94,6 +_,21 @@
|
@@ -94,6 +_,21 @@
|
||||||
this.lookControl = new Shulker.ShulkerLookControl(this);
|
this.lookControl = new Shulker.ShulkerLookControl(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,15 +70,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
float f2 = f + f1;
|
float f2 = f + f1;
|
||||||
@@ -1579,7 +_,7 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
- public boolean canGlide() {
|
|
||||||
+ protected boolean canGlide() {
|
|
||||||
return !this.abilities.flying && super.canGlide();
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1823,7 +_,23 @@
|
@@ -1823,7 +_,23 @@
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
--- a/net/minecraft/world/level/block/entity/FuelValues.java
|
|
||||||
+++ b/net/minecraft/world/level/block/entity/FuelValues.java
|
|
||||||
@@ -17,7 +_,7 @@
|
|
||||||
import net.minecraft.world.level.block.Blocks;
|
|
||||||
|
|
||||||
public class FuelValues {
|
|
||||||
- public final Object2IntSortedMap<Item> values;
|
|
||||||
+ private final Object2IntSortedMap<Item> values;
|
|
||||||
|
|
||||||
FuelValues(Object2IntSortedMap<Item> values) {
|
|
||||||
this.values = values;
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
--- a/net/minecraft/world/level/block/state/BlockBehaviour.java
|
|
||||||
+++ b/net/minecraft/world/level/block/state/BlockBehaviour.java
|
|
||||||
@@ -90,7 +_,7 @@
|
|
||||||
Direction.WEST, Direction.EAST, Direction.NORTH, Direction.SOUTH, Direction.DOWN, Direction.UP
|
|
||||||
};
|
|
||||||
public final boolean hasCollision;
|
|
||||||
- public float explosionResistance;
|
|
||||||
+ protected final float explosionResistance;
|
|
||||||
protected final boolean isRandomlyTicking;
|
|
||||||
protected final SoundType soundType;
|
|
||||||
protected final float friction;
|
|
||||||
Reference in New Issue
Block a user