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@20ec622 use correct types for preloading CraftRegistry
PaperMC/Paper@627cc64 Adjust HAProxy's existance to log for console masters (#11433)
PaperMC/Paper@01c4820 Call EntityDropItemEvent when a container item drops its contents (#11441)
PaperMC/Paper@9c76642 Deprecate for removal Block#isValidTool (#11439)
PaperMC/Paper@dd6d184 Remove redundant fillUsableCommands call (#11425)
PaperMC/Paper@f33611c fix ItemStack#removeEnchantments creating non-stackable items (#11442)
PaperMC/Paper@8f56db8 Add enchantWithLevels with tag specification (#11438)
PaperMC/Paper@b7ab22d Fix console completions on invalid commands (#7603)
PaperMC/Paper@41bc31b Update paperweight to 1.7.3 (#11445)
PaperMC/Paper@e17eb6b Improve entity effect API (#11444)
PaperMC/Paper@7b03141 Add startingBrewTime (#11406)
PaperMC/Paper@355b1cb Add API for explosions to damage the explosion cause (#11180)
PaperMC/Paper@6d7a438 Call bucket events for cauldrons (#7486)
PaperMC/Paper@f9c7f2a Begin switching to JSpecify annotations (#11448)
PaperMC/Paper@e3c8a8e Add PlayerInsertLecternBookEvent [1.20 port] (#7305)
PaperMC/Paper@b410fe8 Configurable per-world void damage offset/damage(#11436)
PaperMC/Paper@ea00be3 Do not NPE on uuid resolution in player profile (#11449)
PaperMC/Paper@ba3c29b Finish converting all events to jspecify annotations
PaperMC/Paper@e7e1ab5 Finish converting most of the undeprecated api to jspecify
PaperMC/Paper@69ffbec Fix hex color check
PaperMC/Paper@709f0f2 Use components properly in ProfileWhitelistVerifyEvent (#11456)
PaperMC/Paper@fb76840 Add section on nullability annotations (#11461)
  • Loading branch information
booky10 committed Oct 2, 2024
1 parent 7fa1833 commit e9e6f40
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This fork is mainly designed to fit the CloudCraft Minecraft network.

## Download

https://dl.cloudcraftmc.de/CloudPlane
https://dl.cloudcraftmc.de/cloudplane

## Building

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id("java-library")
id("io.papermc.paperweight.patcher") version "1.7.2"
id("io.papermc.paperweight.patcher") version "1.7.3"
}

repositories {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version = 1.21.1-R0.1-SNAPSHOT

mcVersion = 1.21.1
packageVersion = 1_21_R1
paperRef = 1bc02e6b23bf18ba43054bf978769411bd96a04d
paperRef = fb768404aa8bdd35b95c88132b95f5cb529cc098

org.gradle.jvmargs = -Xmx2G

Expand Down
6 changes: 3 additions & 3 deletions patches/api/0001-Pufferfish-api-patches.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Pufferfish api patches


diff --git a/build.gradle.kts b/build.gradle.kts
index fd39ed209b20c927054b8482c400beeeeab460a3..ac88e0c9fdf01b58f69cf4d68ac1331dfe9dcb16 100644
index ab84a1405acc1f0d5f267892243b82b8dab03e21..10c5f8d45bb896a212d45b6ebb67b4239398d23f 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -76,6 +76,8 @@ dependencies {
@@ -77,6 +77,8 @@ dependencies {
testImplementation("org.hamcrest:hamcrest:2.2")
testImplementation("org.mockito:mockito-core:5.11.0")
testImplementation("org.ow2.asm:asm-tree:9.7")
Expand All @@ -17,7 +17,7 @@ index fd39ed209b20c927054b8482c400beeeeab460a3..ac88e0c9fdf01b58f69cf4d68ac1331d
}

// Paper start
@@ -130,6 +132,13 @@ val generateApiVersioningFile by tasks.registering {
@@ -131,6 +133,13 @@ val generateApiVersioningFile by tasks.registering {
}
}

Expand Down
16 changes: 8 additions & 8 deletions patches/server/0002-Pufferfish-Server-Patches.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2122,7 +2122,7 @@ index dcb5651d1d9b10b40430fb2f713beedf68336704..ee1af3ed8f3d486ea2579ea01921ec41

private void getFullChunk(long pos, Consumer<LevelChunk> chunkConsumer) {
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index c96f3dcd365bc140b1f4680ef6bd770c80f8eda1..b5d2e1bd9b03d17e9958af3778e65733c17c7342 100644
index f9abf63e12ea930275121b470e4e4906cff0fc12..1b062dccff209405e9bb63960bc9483f3fdb434f 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -715,6 +715,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
Expand Down Expand Up @@ -2340,7 +2340,7 @@ index 5db5ba026462ca642dcee718af732f80fadabef5..9869646d634f11b707a0c2238b6b62f8

boolean isEmpty();
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index bc45c74987974b4828201e06fc8b1f3fbc0af8b4..4cb548ea68b3845b45c720b308e9d0eabf27184c 100644
index 4b54d0ea31062972e68ee8fafe3cfaf68f65a5cd..f0bf97b3f1ae028e3e9292bf9ba4eacf8f706886 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -315,7 +315,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
Expand Down Expand Up @@ -2377,7 +2377,7 @@ index bc45c74987974b4828201e06fc8b1f3fbc0af8b4..4cb548ea68b3845b45c720b308e9d0ea
this.baseTick();
}

@@ -4450,7 +4461,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4452,7 +4463,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}

public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tag, double speed) {
Expand All @@ -2386,7 +2386,7 @@ index bc45c74987974b4828201e06fc8b1f3fbc0af8b4..4cb548ea68b3845b45c720b308e9d0ea
return false;
} else {
AABB axisalignedbb = this.getBoundingBox().deflate(0.001D);
@@ -4467,13 +4478,60 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4469,13 +4480,60 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
int k1 = 0;
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();

Expand Down Expand Up @@ -2452,7 +2452,7 @@ index bc45c74987974b4828201e06fc8b1f3fbc0af8b4..4cb548ea68b3845b45c720b308e9d0ea
double d2 = (double) ((float) i2 + fluid.getHeight(this.level(), blockposition_mutableblockposition));

if (d2 >= axisalignedbb.minY) {
@@ -4496,9 +4554,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4498,9 +4556,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
// CraftBukkit end
}
}
Expand Down Expand Up @@ -2480,7 +2480,7 @@ index cb61462d4691a055a4b25f7b953609d8a154fdfe..6a19ff5b84a0ab72bb5bdc04d9b837fb
return (EntityType) Registry.register(BuiltInRegistries.ENTITY_TYPE, id, (EntityType<T>) type.build(id)); // CraftBukkit - decompile error
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 30f4f1254fc295442d72d50479e8af635f2fe983..71eea3665ee31d67b63ec3b69c4ba77ee169146c 100644
index 2aa6374cd4a96efd85899be8cd3172a8257bfe6b..345b7aad5ad60a4ff9974104f474039485f4f481 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -449,7 +449,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
Expand Down Expand Up @@ -3163,7 +3163,7 @@ index 5f51e64cb0611a4ba6bdcdcacbcba1063a7f3a5c..639ddfa5ec0d0919b4a14d7b95cf1c58
enderdragonbattle.tryRespawn(aboveBlockPosition); // Paper - Perf: Do crystal-portal proximity check before entity lookup
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index e2a0487089eb5a7bdc1433e4c75f69d8e9f9d5f9..c92fe79103e43cb5a12fc80a8e2eae8287fba861 100644
index 507671476c3d2d92a2fdb05be24443af27d26dcf..0151183e57444fb20f7b75b9db79f3a91de75bfa 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -684,6 +684,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
Expand Down Expand Up @@ -3258,7 +3258,7 @@ index e2a0487089eb5a7bdc1433e4c75f69d8e9f9d5f9..c92fe79103e43cb5a12fc80a8e2eae82
// Paper end - Prevent block entity and entity crashes
}
this.moonrise$midTickTasks(); // Paper - rewrite chunk system
@@ -1944,6 +1986,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
@@ -1961,6 +2003,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
}

public ProfilerFiller getProfiler() {
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0022-Improve-Player-canSee-performance.patch
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ index dfea98dc0bff5abdf4d8088ef8b26d4473b96911..da78d78d8bc802f7dba1c0ff6aa7e0af
}
// CraftBukkit end
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index ad740739437be632fc7fedec488a7d0c49534688..06d243bb0fb3a645acee43953b6c8829b9b992bf 100644
index 42d7660efe5baa6f796f2a7606686c765b6f2478..83799caf96b2d35af30f8592da64ac9605c3239e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2247,7 +2247,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2252,7 +2252,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

@Override
public boolean canSee(org.bukkit.entity.Entity entity) {
Expand Down
22 changes: 11 additions & 11 deletions patches/server/0023-Further-improve-Player-canSee-performance.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Further improve Player#canSee performance


diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index e908e58eebda88d66ece593ff05c1868d2806d29..eb3368619bfaacfe20f4e45d0b96c34fb99808be 100644
index 6dc800078df0d23340b0f651ff6ceff6197e1d3d..99908f2c60c6fd7ed47c27750bec30ab9f8f27f6 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -379,6 +379,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
Expand Down Expand Up @@ -34,7 +34,7 @@ index e908e58eebda88d66ece593ff05c1868d2806d29..eb3368619bfaacfe20f4e45d0b96c34f
this.tags = Sets.newHashSet();
this.pistonDeltas = new double[]{0.0D, 0.0D, 0.0D};
this.mainSupportingBlockPos = Optional.empty();
@@ -2605,8 +2613,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -2607,8 +2615,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.invulnerable = nbt.getBoolean("Invulnerable");
this.portalCooldown = nbt.getInt("PortalCooldown");
if (nbt.hasUUID("UUID")) {
Expand All @@ -44,7 +44,7 @@ index e908e58eebda88d66ece593ff05c1868d2806d29..eb3368619bfaacfe20f4e45d0b96c34f
}

if (Double.isFinite(this.getX()) && Double.isFinite(this.getY()) && Double.isFinite(this.getZ())) {
@@ -3933,6 +3940,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3935,6 +3942,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public void setUUID(UUID uuid) {
this.uuid = uuid;
this.stringUUID = this.uuid.toString();
Expand All @@ -54,7 +54,7 @@ index e908e58eebda88d66ece593ff05c1868d2806d29..eb3368619bfaacfe20f4e45d0b96c34f
}

@Override
@@ -3944,6 +3954,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3946,6 +3956,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return this.stringUUID;
}

Expand All @@ -68,7 +68,7 @@ index e908e58eebda88d66ece593ff05c1868d2806d29..eb3368619bfaacfe20f4e45d0b96c34f
public String getScoreboardName() {
return this.stringUUID;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 06d243bb0fb3a645acee43953b6c8829b9b992bf..581ddf14105b82fd13039f2d770b097ebc56d4c2 100644
index 83799caf96b2d35af30f8592da64ac9605c3239e..de649589f1020ab5c6918d2edaa57233af1d73f5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -200,6 +200,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
Expand All @@ -79,47 +79,47 @@ index 06d243bb0fb3a645acee43953b6c8829b9b992bf..581ddf14105b82fd13039f2d770b097e
private final Map<UUID, Set<WeakReference<Plugin>>> invertedVisibilityEntities = new HashMap<>();
private final Set<UUID> unlistedEntities = new HashSet<>(); // Paper - Add Listing API for Player
private static final WeakHashMap<Plugin, WeakReference<Plugin>> pluginWeakReferences = new WeakHashMap<>();
@@ -2044,6 +2045,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2049,6 +2050,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
invertedPlugins = new HashSet<>();
invertedPlugins.add(CraftPlayer.getPluginWeakReference(plugin));
this.invertedVisibilityEntities.put(entity.getUniqueId(), invertedPlugins);
+ this.invertedVisibilityEntitySet.add(((CraftEntity) entity).getHandle().getLongUUID()); // CloudPlane - further improve Player#canSee performance

return true;
}
@@ -2082,6 +2084,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2087,6 +2089,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (this.invertedVisibilityEntities.remove(entity.getUniqueId()) == null) {
this.untrackAndHideEntity(entity);
}
+ else this.invertedVisibilityEntitySet.remove(((CraftEntity) entity).getHandle().getLongUUID()); // CloudPlane - further improve Player#canSee performance
}

@Override
@@ -2130,6 +2133,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2135,6 +2138,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return false; // Some other plugins still want the entity inverted
}
this.invertedVisibilityEntities.remove(entity.getUniqueId());
+ this.invertedVisibilityEntitySet.remove(((CraftEntity) entity).getHandle().getLongUUID()); // CloudPlane - further improve Player#canSee performance

return true;
}
@@ -2206,6 +2210,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2211,6 +2215,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (this.invertedVisibilityEntities.remove(entity.getUniqueId()) == null) {
this.trackAndShowEntity(entity);
}
+ else this.invertedVisibilityEntitySet.remove(((CraftEntity) entity).getHandle().getLongUUID()); // CloudPlane - further improve Player#canSee performance
}
// Paper start
public com.destroystokyo.paper.profile.PlayerProfile getPlayerProfile() {
@@ -2238,6 +2243,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2243,6 +2248,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

public void onEntityRemove(Entity entity) {
this.invertedVisibilityEntities.remove(entity.getUUID());
+ this.invertedVisibilityEntitySet.remove(entity.getLongUUID()); // CloudPlane - further improve Player#canSee performance
}

@Override
@@ -2253,7 +2259,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2258,7 +2264,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

public boolean canSee(Entity entity) {
return this.entity == entity // SPIGOT-7312: Can always see self
Expand Down

0 comments on commit e9e6f40

Please sign in to comment.