Skip to content

Commit

Permalink
Updated Upstream (Paper)
Browse files Browse the repository at this point in the history
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@1004374a Add further information to thread check errors
PaperMC/Paper@e2f0efd1 Remove nms.Entity#isChunkLoaded
PaperMC/Paper@54b2e9d9 Add buffer to CraftWorld#warnUnsafeChunk
  • Loading branch information
granny committed Jan 29, 2025
1 parent 9b57576 commit 88ed744
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 49 deletions.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ group = org.purpurmc.purpur
version = 1.21.4-R0.1-SNAPSHOT

mcVersion = 1.21.4
paperCommit = a392d475c28c62f25992de49d5d137b098e4ad92
paperCommit = 54b2e9d9738ce32e2f415c321f20e3fc07063c14

org.gradle.configuration-cache = true
org.gradle.caching = true
Expand Down
10 changes: 5 additions & 5 deletions purpur-server/minecraft-patches/features/0001-Ridables.patch
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ index 5cf2c7f8fb05a91ed17f1d9c07f7d3e748738058..3770dc90d9412c6378c0bd57a651b9c3
public LevelChunk getChunkIfLoaded(int x, int z) {
return this.chunkSource.getChunkAtIfLoadedImmediately(x, z); // Paper - Use getChunkIfLoadedImmediately
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
index 11b6149380ea6ca514a607801d499d740ce3d6dd..362e1bd5d19888535eb40f7ca7a9a5ef508f3c4a 100644
index a6f771cbee878eb383b67c61fa2469f2916413b5..d77381237f8a7d1b2f280a5032f5e1c8f0ab8f94 100644
--- a/net/minecraft/server/level/ServerPlayer.java
+++ b/net/minecraft/server/level/ServerPlayer.java
@@ -848,6 +848,15 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
Expand Down Expand Up @@ -75,10 +75,10 @@ index d681e14d33a8de6ca2c7f0a2e1ff9bb9d55adbbb..ee002c2cef9d4810fdacac71de77e948
if ((target instanceof Bucketable && target instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) {
target.resendPossiblyDesyncedEntityData(ServerGamePacketListenerImpl.this.player); // Paper - The entire mob gets deleted, so resend it
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 474e5b8163e82a76aea8c4402d6acfcd366acaef..e4ee886f33ee63ae740cd89067c8ec81c12f2a62 100644
index 43a4427a8f327fbb224cb25e63a5c6b244eb9b09..62a38ecedbd579b32a8fd9cff5a433bfe635fc62 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -3155,6 +3155,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3151,6 +3151,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.passengers = ImmutableList.copyOf(list);
}

Expand All @@ -92,7 +92,7 @@ index 474e5b8163e82a76aea8c4402d6acfcd366acaef..e4ee886f33ee63ae740cd89067c8ec81
this.gameEvent(GameEvent.ENTITY_MOUNT, passenger);
}
}
@@ -3196,6 +3203,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3192,6 +3199,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return false;
}
// CraftBukkit end
Expand All @@ -107,7 +107,7 @@ index 474e5b8163e82a76aea8c4402d6acfcd366acaef..e4ee886f33ee63ae740cd89067c8ec81
if (this.passengers.size() == 1 && this.passengers.get(0) == passenger) {
this.passengers = ImmutableList.of();
} else {
@@ -5119,4 +5134,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -5115,4 +5130,44 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return ((ServerLevel) this.level).isPositionEntityTicking(this.blockPosition());
}
// Paper end - Expose entity id counter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] API for any mob to burn daylight
Co-authored by: Encode42 <[email protected]>

diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index e4ee886f33ee63ae740cd89067c8ec81c12f2a62..f61c29abf75443b206f37b90950d6c0e14ea59ff 100644
index 62a38ecedbd579b32a8fd9cff5a433bfe635fc62..8473a7d9af9d83e97387ddf4cc50f6ad22730def 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -534,6 +534,24 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -530,6 +530,24 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
// Purpur end - Add canSaveToDisk to Entity

Expand Down Expand Up @@ -268,7 +268,7 @@ index 32b7c34d3c68dcfa936b628b2d038524204129a3..0ee817699fffbb929011465029182cc5
}

diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java
index 5d12bc139c81ca342074c7c745635669020d0300..f8d41ce860c5f48ab9b5e4b79a554dab85d2ba9b 100644
index bb8c37c8348172947efe14d48ed9ae203409affa..b1da45df27f02395d793e7eafe576f5f92aa3a7b 100644
--- a/net/minecraft/world/entity/monster/Zombie.java
+++ b/net/minecraft/world/entity/monster/Zombie.java
@@ -89,11 +89,12 @@ public class Zombie extends Monster {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

public void inactiveTick() {
}
@@ -526,10 +_,21 @@
@@ -522,10 +_,21 @@
}
// Paper end - optimise entity tracker

Expand All @@ -62,15 +62,15 @@
this.position = Vec3.ZERO;
this.blockPosition = BlockPos.ZERO;
this.chunkPosition = ChunkPos.ZERO;
@@ -908,6 +_,7 @@
@@ -904,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
+ if (this.level.purpurConfig.teleportOnNetherCeilingDamage && this.level.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER && this instanceof ServerPlayer player) player.teleport(io.papermc.paper.util.MCUtil.toLocation(this.level, this.level.getSharedSpawnPos())); else // Purpur - Add option to teleport to spawn on nether ceiling damage
this.onBelowWorld();
}
}
@@ -1830,7 +_,7 @@
@@ -1826,7 +_,7 @@
}

public boolean fireImmune() {
Expand All @@ -79,7 +79,7 @@
}

public boolean causeFallDamage(float fallDistance, float multiplier, DamageSource source) {
@@ -1899,7 +_,7 @@
@@ -1895,7 +_,7 @@
return this.isInWater() || flag;
}

Expand All @@ -88,7 +88,7 @@
if (this.getVehicle() instanceof AbstractBoat abstractBoat && !abstractBoat.isUnderWater()) {
this.wasTouchingWater = false;
} else if (this.updateFluidHeightAndDoFluidPushing(FluidTags.WATER, 0.014)) {
@@ -2525,6 +_,13 @@
@@ -2521,6 +_,13 @@
compound.putBoolean("Paper.FreezeLock", true);
}
// Paper end
Expand All @@ -102,7 +102,7 @@
return compound;
} catch (Throwable var9) {
CrashReport crashReport = CrashReport.forThrowable(var9, "Saving entity NBT");
@@ -2674,6 +_,13 @@
@@ -2670,6 +_,13 @@
freezeLocked = compound.getBoolean("Paper.FreezeLock");
}
// Paper end
Expand All @@ -116,15 +116,15 @@
} catch (Throwable var17) {
CrashReport crashReport = CrashReport.forThrowable(var17, "Loading entity NBT");
CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being loaded");
@@ -2920,6 +_,7 @@
@@ -2916,6 +_,7 @@
if (this.isAlive() && this instanceof Leashable leashable) {
if (leashable.getLeashHolder() == player) {
if (!this.level().isClientSide()) {
+ if (hand == InteractionHand.OFF_HAND && (level().purpurConfig.villagerCanBeLeashed || level().purpurConfig.wanderingTraderCanBeLeashed) && this instanceof net.minecraft.world.entity.npc.AbstractVillager) return InteractionResult.CONSUME; // Purpur - Allow leashing villagers
// 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());
@@ -3245,15 +_,18 @@
@@ -3241,15 +_,18 @@
return Vec3.directionFromRotation(this.getRotationVector());
}

Expand All @@ -144,7 +144,7 @@
}
}
}
@@ -3458,7 +_,7 @@
@@ -3454,7 +_,7 @@
}

public int getMaxAirSupply() {
Expand All @@ -153,7 +153,7 @@
}

public int getAirSupply() {
@@ -3953,7 +_,7 @@
@@ -3949,7 +_,7 @@
// CraftBukkit end

public boolean canUsePortal(boolean allowPassengers) {
Expand All @@ -162,7 +162,7 @@
}

public boolean canTeleport(Level fromLevel, Level toLevel) {
@@ -4485,6 +_,12 @@
@@ -4481,6 +_,12 @@
return Mth.lerp(partialTick, this.yRotO, this.yRot);
}

Expand All @@ -175,7 +175,7 @@
// Paper start - optimise collisions
public boolean updateFluidHeightAndDoFluidPushing(final TagKey<Fluid> fluid, final double flowScale) {
if (this.touchingUnloadedChunk()) {
@@ -4883,7 +_,7 @@
@@ -4879,7 +_,7 @@
}

public float maxUpStep() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2372,6 +_,50 @@
@@ -2373,6 +_,50 @@
return (this.getHandle().getDragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().getDragonFight());
}

Expand Down

0 comments on commit 88ed744

Please sign in to comment.