Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@cdad49b7 Do not mark plugin tickets as forced; keep correct ticket types
PaperMC/Paper@a1c4fc96 Add generic ticket identifier
PaperMC/Paper@745881bb Update Moonrise common for 1.21.5
PaperMC/Paper@e9d00eb6 Apply Moonrise patch
PaperMC/Paper@ef0f0d10 Copy Moonrise 1.21.5 update over
This commit is contained in:
granny
2025-04-01 22:26:42 -07:00
parent aa0bf38f14
commit b81ab42440
15 changed files with 85 additions and 85 deletions

View File

@@ -3,12 +3,12 @@
@@ -141,6 +_,7 @@
import org.jetbrains.annotations.Contract;
public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess, ScoreHolder, DataComponentGetter {
public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess, ScoreHolder, DataComponentGetter, ca.spottedleaf.moonrise.patches.chunk_system.entity.ChunkSystemEntity, ca.spottedleaf.moonrise.patches.entity_tracker.EntityTrackerEntity { // Paper - rewrite chunk system // Paper - optimise entity tracker
+ public static javax.script.ScriptEngine scriptEngine = new javax.script.ScriptEngineManager().getEngineByName("rhino"); // Purpur - Configurable entity base attributes
// CraftBukkit start
private static final org.slf4j.Logger LOGGER = com.mojang.logging.LogUtils.getLogger();
private static final int CURRENT_LEVEL = 2;
@@ -304,8 +_,9 @@
@@ -260,8 +_,9 @@
public double xOld;
public double yOld;
public double zOld;
@@ -19,7 +19,7 @@
public int tickCount;
private int remainingFireTicks = -this.getFireImmuneTicks();
public boolean wasTouchingWater;
@@ -339,8 +_,8 @@
@@ -295,8 +_,8 @@
public PortalProcessor portalProcess;
public int portalCooldown;
private boolean invulnerable;
@@ -30,7 +30,7 @@
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 double[] pistonDeltas = new double[]{0.0, 0.0, 0.0};
@@ -394,6 +_,7 @@
@@ -350,6 +_,7 @@
public long activatedTick = Integer.MIN_VALUE;
public boolean isTemporarilyActive;
public long activatedImmunityTick = Integer.MIN_VALUE;
@@ -38,9 +38,9 @@
public void inactiveTick() {
}
@@ -406,10 +_,21 @@
@@ -512,10 +_,21 @@
}
// Paper end
// Paper end - optimise entity tracker
+ // Purpur start - Add canSaveToDisk to Entity
+ public boolean canSaveToDisk() {
@@ -60,7 +60,7 @@
this.position = Vec3.ZERO;
this.blockPosition = BlockPos.ZERO;
this.chunkPosition = ChunkPos.ZERO;
@@ -779,6 +_,7 @@
@@ -885,6 +_,7 @@
&& this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> this.getY() >= v)
&& (!(this instanceof Player player) || !player.getAbilities().invulnerable))) {
// Paper end - Configurable nether ceiling damage
@@ -68,7 +68,7 @@
this.onBelowWorld();
}
}
@@ -1682,7 +_,7 @@
@@ -1830,7 +_,7 @@
}
public boolean fireImmune() {
@@ -77,7 +77,7 @@
}
public boolean causeFallDamage(double fallDistance, float damageMultiplier, DamageSource damageSource) {
@@ -1742,7 +_,7 @@
@@ -1890,7 +_,7 @@
return this.isInWater() || flag;
}
@@ -86,7 +86,7 @@
if (this.getVehicle() instanceof AbstractBoat abstractBoat && !abstractBoat.isUnderWater()) {
this.wasTouchingWater = false;
} else if (this.updateFluidHeightAndDoFluidPushing(FluidTags.WATER, 0.014)) {
@@ -2364,6 +_,13 @@
@@ -2512,6 +_,13 @@
compound.putBoolean("Paper.FreezeLock", true);
}
// Paper end
@@ -100,7 +100,7 @@
return compound;
} catch (Throwable var8) {
CrashReport crashReport = CrashReport.forThrowable(var8, "Saving entity NBT");
@@ -2481,6 +_,13 @@
@@ -2629,6 +_,13 @@
freezeLocked = compound.getBooleanOr("Paper.FreezeLock", false);
}
// Paper end
@@ -114,7 +114,7 @@
} catch (Throwable var8) {
CrashReport crashReport = CrashReport.forThrowable(var8, "Loading entity NBT");
CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being loaded");
@@ -2620,6 +_,7 @@
@@ -2857,6 +_,7 @@
if (this.isAlive() && this instanceof Leashable leashable) {
if (leashable.getLeashHolder() == player) {
if (!this.level().isClientSide()) {
@@ -122,7 +122,7 @@
// CraftBukkit start - fire PlayerUnleashEntityEvent
// Paper start - Expand EntityUnleashEvent
org.bukkit.event.player.PlayerUnleashEntityEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerUnleashEntityEvent(this, player, hand, !player.hasInfiniteMaterials());
@@ -2936,15 +_,18 @@
@@ -3173,15 +_,18 @@
return Vec3.directionFromRotation(this.getRotationVector());
}
@@ -142,7 +142,7 @@
}
}
}
@@ -3149,7 +_,7 @@
@@ -3386,7 +_,7 @@
}
public int getMaxAirSupply() {
@@ -151,7 +151,7 @@
}
public int getAirSupply() {
@@ -3677,7 +_,7 @@
@@ -3914,7 +_,7 @@
// CraftBukkit end
public boolean canUsePortal(boolean allowPassengers) {
@@ -160,7 +160,7 @@
}
public boolean canTeleport(Level fromLevel, Level toLevel) {
@@ -4212,6 +_,12 @@
@@ -4451,6 +_,12 @@
return Mth.lerp(partialTick, this.yRotO, this.yRot);
}
@@ -170,10 +170,10 @@
+ }
+ // Purpur end - Stop squids floating on top of water
+
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> fluidTag, double motionScale) {
// Paper start - optimise collisions
public boolean updateFluidHeightAndDoFluidPushing(final TagKey<Fluid> fluid, final double flowScale) {
if (this.touchingUnloadedChunk()) {
return false;
@@ -4552,7 +_,7 @@
@@ -4859,7 +_,7 @@
}
public float maxUpStep() {