Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@04a97aac more renames
PaperMC/Paper@bc310d25 fix wrong absorb
PaperMC/Paper@546acb55 fix debug pathfinding flag
PaperMC/Paper@dfa3e44f Reorganize level storage layout to closer mirror 26.1 vanilla with CB per-level 'world container' behavior.
PaperMC/Paper@b50fa5ca Call BlockDispenseEvent for SpawnEggItem
PaperMC/Paper@15af4554 Cleanup final CombatTracker diff
PaperMC/Paper@439972cd Readd BlockGrowEvent for cactus flower
PaperMC/Paper@57e26551 Correctly replace setBlock in TripWireHookBlock
PaperMC/Paper@c20b0909 Skip villager treasure map trade if disabled
PaperMC/Paper@fd22888e Get MapData from server data storage
PaperMC/Paper@17e063ac cleanup block data
PaperMC/Paper@c7003253 [ci/skip] revert command size limit to vanilla for test server
PaperMC/Paper@3ed80980 Adjust tick loop logic
PaperMC/Paper@af7555e5 Fix block entity ticking list (#13724)
PaperMC/Paper@062aadc6 remove type id from note block instruments
PaperMC/Paper@6a08bca0 finish TagKey -> HolderSet migration
PaperMC/Paper@fe91bd9e fix SO error for breeze target
PaperMC/Paper@a12cd1a5 update crystal proximity checks for new range
PaperMC/Paper@a44c689a Reduce diff in VineBlock.java
PaperMC/Paper@b3fabd13 Correctly move FarmlandBlock#fallOn super call
PaperMC/Paper@4932672f Simplify diff in AbstractPiglin
PaperMC/Paper@71497253 Readd dropped StemBlock BlockGrowEvent hunk
PaperMC/Paper@0110d9fe Simplify diff in DoublePlantBlock
PaperMC/Paper@5b507f54 Readd dropped isInWorldBounds "inline"
PaperMC/Paper@63078f4b Simplify diff in ConduitBlockEntity
PaperMC/Paper@fd98513c fix provides_banner_patterns component type
PaperMC/Paper@6a154f13 fix some client desync
PaperMC/Paper@d6b3a3f3 missed one case
PaperMC/Paper@d957fb49 Call WorldGameRuleChangeEvent for World Options Menu (#13720)
PaperMC/Paper@03853ba2 Skip transient components in dumpitem command (#13689)
This commit is contained in:
granny
2026-03-28 16:39:36 -07:00
parent a928e52fca
commit c3bd0f73fc
25 changed files with 74 additions and 71 deletions

View File

@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Purpur Paperclip Jar" type="JarApplication">
<option name="JAR_PATH" value="$PROJECT_DIR$/purpur-server/build/libs/purpur-paperclip-1.21.11-R0.1-SNAPSHOT-mojmap.jar" />
<option name="JAR_PATH" value="$PROJECT_DIR$/purpur-server/build/libs/purpur-paperclip-26.1-R0.1-SNAPSHOT.jar" />
<option name="VM_PARAMETERS" value="-Dcom.mojang.eula.agree" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/run" />
<option name="ALTERNATIVE_JRE_PATH" />

View File

@@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Upstream Paper [createMojmapPaperclipJar]" type="GradleRunConfiguration" factoryName="Gradle">
<configuration default="false" name="Upstream Paper [createPaperclipJar]" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
@@ -10,15 +10,18 @@
</option>
<option name="taskNames">
<list>
<option value="createMojmapPaperclipJar" />
<option value="createPaperclipJar" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<ExternalSystemDebugDisabled>false</ExternalSystemDebugDisabled>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<GradleProfilingDisabled>false</GradleProfilingDisabled>
<GradleCoverageDisabled>false</GradleCoverageDisabled>
<method v="2">
<option name="RunConfigurationTask" enabled="true" run_configuration_name="Upstream Paper [build]" run_configuration_type="GradleRunConfiguration" />
</method>

View File

@@ -3,7 +3,7 @@ version=26.1-R0.1-SNAPSHOT
mcVersion=26.1
apiVersion = 26.1
paperCommit = cca018fe7d089430807ad06c63a59ab0c612929e
paperCommit = 03853ba2fc406fc5466f3e764beaac6a4826c601
org.gradle.configuration-cache = true
org.gradle.caching = true

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -4011,4 +_,123 @@
@@ -4012,4 +_,123 @@
*/
@ApiStatus.Experimental
PlayerGameConnection getConnection();

View File

@@ -113,7 +113,7 @@
idea {
module {
generatedSourceDirs.add(generatedDir.toFile())
@@ -314,7 +_,7 @@
@@ -315,7 +_,7 @@
mainClass.set(null as String?)
}
@@ -122,7 +122,7 @@
project("paper")
versionFamily(paperweight.minecraftVersion.map { it.split(".", "-").takeWhile { part -> part.toIntOrNull() != null }.take(2).joinToString(".") })
version(paperweight.minecraftVersion)
@@ -329,4 +_,47 @@
@@ -330,4 +_,47 @@
}
}
}

View File

@@ -18,10 +18,10 @@ index 64a82b414afd093c010878c150592c681665b735..1db70e2397137158c3df9603ea90743e
public boolean isClientAuthoritative() {
return false;
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index 8ac4752585f8869d0802a71419499c55c48ba583..0d5558444e9b775c015148d79eb4b04355671cf9 100644
index e9b3c2a767dc6ecc5044e45c51e3231c68768316..50ac39c620aae79d9111089eb55d979d0ae3b5db 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -1682,6 +1682,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1716,6 +1716,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
for (ServerLevel level : this.getAllLevels()) {
level.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - BlockPhysicsEvent
level.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - Add EntityMoveEvent
@@ -30,10 +30,10 @@ index 8ac4752585f8869d0802a71419499c55c48ba583..0d5558444e9b775c015148d79eb4b043
profiler.push(() -> level + " " + level.dimension().identifier());
profiler.push("tick");
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index c04d81aeafeb17458d73620770ca3ae2b40794fb..d2746087c0ab4d0f135dc7907b99a33e7ceb8f80 100644
index 37dbb1724b63f266ced21be72f4b6429c239c9ef..2d74b41a44f65285a38d42a33a83177685601375 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -234,6 +234,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
@@ -235,6 +235,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
public boolean hasPhysicsEvent = true; // Paper - BlockPhysicsEvent
public boolean hasEntityMoveEvent; // Paper - Add EntityMoveEvent
private final alternate.current.wire.WireHandler wireHandler = new alternate.current.wire.WireHandler(this); // Paper - optimize redstone (Alternate Current)
@@ -62,7 +62,7 @@ index 25e3229ba9ede30d125e566c06b58a36c96bc776..e5d9c8e6999f3b7a40269fc5b06da487
private void updatePlayerAttributes() {
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 28f8b8804890cc3607a12ac6c0bfcce1d74a1fd6..b8fb8bcfa15036e031e49e5b17e0aa6ab4a64ed4 100644
index a81b553a209834883a99ae971fed18d3a6d2ff32..2162dc6a29d89193030d263c9f8104206e8720cc 100644
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2930,6 +2930,8 @@ public class ServerGamePacketListenerImpl
@@ -75,7 +75,7 @@ index 28f8b8804890cc3607a12ac6c0bfcce1d74a1fd6..b8fb8bcfa15036e031e49e5b17e0aa6a
if (itemType == Items.WATER_BUCKET && target instanceof net.minecraft.world.entity.animal.Bucketable && target instanceof LivingEntity && resendData) {
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 9afb6860a93c44ce508a9c1c5df4816d7feb2f4a..afcdf4aa479e27c858afab01191344e14a1f4ecc 100644
index ce4d619ea9a5abb3f1bcbd4098a75c8d6155a7a7..65d63d55c74b1e336fc745e51ed2d6cf9f5747eb 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -3159,6 +3159,13 @@ public abstract class Entity
@@ -107,7 +107,7 @@ index 9afb6860a93c44ce508a9c1c5df4816d7feb2f4a..afcdf4aa479e27c858afab01191344e1
if (this.passengers.size() == 1 && this.passengers.get(0) == passenger) {
this.passengers = ImmutableList.of();
} else {
@@ -5157,4 +5172,44 @@ public abstract class Entity
@@ -5159,4 +5174,44 @@ public abstract class Entity
return ((ServerLevel) this.level()).isPositionEntityTicking(this.blockPosition());
}
// Paper end - Expose entity id counter
@@ -153,7 +153,7 @@ index 9afb6860a93c44ce508a9c1c5df4816d7feb2f4a..afcdf4aa479e27c858afab01191344e1
+ // Purpur end - Ridables
}
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index 61872c754fec8e93ebd187af2f0ebe7548b668d5..e19911cbf8abf29f8182755d96f10507bc3d757b 100644
index dccca794a79665db0dedddc6a42885a5738abd42..5a14b813628c7656e2ab0497ed3e13a3bf45117b 100644
--- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java
@@ -243,9 +243,9 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
@@ -2700,7 +2700,7 @@ index d03a219af35e3c577386b87d553cc53c1e922553..53fc1012d46e20b623246cecae87b3fe
this.turtle.setDeltaMovement(this.turtle.getDeltaMovement().add(0.0, this.turtle.getSpeed() * yd * 0.1, 0.0));
}
diff --git a/net/minecraft/world/entity/animal/wolf/Wolf.java b/net/minecraft/world/entity/animal/wolf/Wolf.java
index 96707c6f2375754d001eafbf4bd0773df6843b38..97cd55916166ffabdfdc50a493ff1642d952001e 100644
index c198c1787d94c8b82ba85bb62f5916f0c46639bd..59bb551c689a04486564d89b4912935acec644e2 100644
--- a/net/minecraft/world/entity/animal/wolf/Wolf.java
+++ b/net/minecraft/world/entity/animal/wolf/Wolf.java
@@ -183,9 +183,32 @@ public class Wolf extends TamableAnimal implements NeutralMob {
@@ -2745,7 +2745,7 @@ index 96707c6f2375754d001eafbf4bd0773df6843b38..97cd55916166ffabdfdc50a493ff1642
this.targetSelector.addGoal(2, new OwnerHurtTargetGoal(this));
this.targetSelector.addGoal(3, new HurtByTargetGoal(this).setAlertOthers());
diff --git a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
index 6f12d8dc51e1052abb9ce7d4170efda3fe9e05f9..366ca403757c274fadae2578772d97a903da3174 100644
index 4f17918b4248dc56fa3ce51e5f491e81198807bc..dcf88c6171655daec1f031e41d9eb8237744bfb3 100644
--- a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -90,6 +90,7 @@ public class EnderDragon extends Mob implements Enemy {
@@ -4296,7 +4296,7 @@ index 95e5773fe060bdc42847fdf56801eb4fe1494c56..1a5e3a38671602e097e1e7f00d8f80e4
profiler.pop();
this.updateActivity();
diff --git a/net/minecraft/world/entity/monster/breeze/Breeze.java b/net/minecraft/world/entity/monster/breeze/Breeze.java
index c1e995f5605748a02e2725cb7340ae4f7b1182c2..a1f6bc282a20bf69955082632f560123edf7f791 100644
index a58ad6176864c299725f5d51b3c239259f3b9c20..ec4d124b6a714d6b57d006ba70d838a35e62df75 100644
--- a/net/minecraft/world/entity/monster/breeze/Breeze.java
+++ b/net/minecraft/world/entity/monster/breeze/Breeze.java
@@ -233,6 +233,7 @@ public class Breeze extends Monster {

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Configurable entity base attributes
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index e19911cbf8abf29f8182755d96f10507bc3d757b..7119a83b5b9811ab3ef2622f91c966741818e48f 100644
index 5a14b813628c7656e2ab0497ed3e13a3bf45117b..c1f19735220eac34ce48ffa22af8af90a0735ec9 100644
--- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java
@@ -296,6 +296,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
@@ -955,7 +955,7 @@ index 53fc1012d46e20b623246cecae87b3feb1a0fda6..2dfcf0c9f8eb762d1683d2841a05219c
this.homePos = pos;
}
diff --git a/net/minecraft/world/entity/animal/wolf/Wolf.java b/net/minecraft/world/entity/animal/wolf/Wolf.java
index 97cd55916166ffabdfdc50a493ff1642d952001e..5605c3ecb8ffaace4b21e3bd5bd3d7714b7ea83c 100644
index 59bb551c689a04486564d89b4912935acec644e2..70e04817bc1e3cfacd9a6325918e7852cae0bd43 100644
--- a/net/minecraft/world/entity/animal/wolf/Wolf.java
+++ b/net/minecraft/world/entity/animal/wolf/Wolf.java
@@ -205,6 +205,14 @@ public class Wolf extends TamableAnimal implements NeutralMob {
@@ -974,7 +974,7 @@ index 97cd55916166ffabdfdc50a493ff1642d952001e..5605c3ecb8ffaace4b21e3bd5bd3d771
protected void registerGoals() {
this.goalSelector.addGoal(1, new FloatGoal(this));
diff --git a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
index 366ca403757c274fadae2578772d97a903da3174..7e39604a02561880a10d4bcebcd76135f9c1a122 100644
index dcf88c6171655daec1f031e41d9eb8237744bfb3..671ad18c0d18f9773ef7b868a8d1d33d574986fb 100644
--- a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -163,6 +163,13 @@ public class EnderDragon extends Mob implements Enemy {
@@ -991,7 +991,7 @@ index 366ca403757c274fadae2578772d97a903da3174..7e39604a02561880a10d4bcebcd76135
public static AttributeSupplier.Builder createAttributes() {
return Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 200.0).add(Attributes.CAMERA_DISTANCE, 16.0);
}
@@ -1065,7 +1072,7 @@ public class EnderDragon extends Mob implements Enemy {
@@ -1066,7 +1073,7 @@ public class EnderDragon extends Mob implements Enemy {
@Override
protected float sanitizeScale(final float scale) {

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Setting to reintroduce end void rings
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index 0d5558444e9b775c015148d79eb4b04355671cf9..ffc75fc2b04088573877b95c948f457ee2458bd7 100644
index 50ac39c620aae79d9111089eb55d979d0ae3b5db..e19b4e449abd213fce902feecec3c697114f573a 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -1205,6 +1205,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1225,6 +1225,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
// Purpur end - config for startup commands

View File

@@ -17,7 +17,7 @@
// Paper start - improve tick loop
public final ca.spottedleaf.moonrise.common.time.TickData tickTimes1s = new ca.spottedleaf.moonrise.common.time.TickData(java.util.concurrent.TimeUnit.SECONDS.toNanos(1L));
public final ca.spottedleaf.moonrise.common.time.TickData tickTimes5s = new ca.spottedleaf.moonrise.common.time.TickData(java.util.concurrent.TimeUnit.SECONDS.toNanos(5L));
@@ -404,6 +_,7 @@
@@ -419,6 +_,7 @@
public double[] computeTPS() {
final long interval = this.tickRateManager().nanosecondsPerTick();
return new double[] {
@@ -25,7 +25,7 @@
getTPS(this.tickTimes1m, interval),
getTPS(this.tickTimes5m, interval),
getTPS(this.tickTimes15m, interval)
@@ -925,6 +_,15 @@
@@ -941,6 +_,15 @@
LOGGER.info("Stopping server");
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
@@ -41,7 +41,7 @@
// CraftBukkit start
if (this.server != null) {
this.server.spark.disable(); // Paper - spark
@@ -1014,6 +_,8 @@
@@ -1030,6 +_,8 @@
this.safeShutdown(wait, false);
}
public void safeShutdown(final boolean wait, final boolean isRestarting) {
@@ -50,7 +50,7 @@
this.isRestarting = isRestarting;
this.hasLoggedStop = true; // Paper - Debugging
if (this.isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging
@@ -1176,11 +_,21 @@
@@ -1196,11 +_,21 @@
}
// Paper end - Add onboarding message for initial server start
// Paper start - Improve outdated version checking
@@ -73,7 +73,7 @@
while (this.running) {
final long tickStart = System.nanoTime(); // Paper - improve tick loop
long thisTickNanos; // Paper - improve tick loop - diff on change, expect this to be tick interval
@@ -1194,9 +_,11 @@
@@ -1214,9 +_,11 @@
final long ticksBehind = Math.max(1L, this.tickSchedule.getPeriodsAhead(thisTickNanos, tickStart));
final long catchup = (long)Math.max(
1,
@@ -84,9 +84,9 @@
+ lagging = getTPS()[0] < org.purpurmc.purpur.PurpurConfig.laggingThreshold; // Purpur - Lagging threshold
+
// adjust ticksBehind so that it is not greater-than catchup
if (ticksBehind > catchup) {
if (ticksBehind - catchup > 0L) {
final long difference = ticksBehind - catchup;
@@ -1784,7 +_,7 @@
@@ -1818,7 +_,7 @@
}
public String getServerModName() {

View File

@@ -9,7 +9,7 @@
private final LevelDebugSynchronizers debugSynchronizers = new LevelDebugSynchronizers(this);
// CraftBukkit start
@@ -378,8 +_,25 @@
@@ -380,8 +_,25 @@
// CraftBukkit end
this.tickTime = tickTime;
this.server = server;
@@ -36,7 +36,7 @@
ChunkGenerator generator = levelStem.generator();
// CraftBukkit start
this.serverLevelData.setWorld(this);
@@ -464,6 +_,7 @@
@@ -465,6 +_,7 @@
this.environmentAttributes = EnvironmentAttributeSystem.builder().addDefaultLayers(this).build();
this.updateSkyBrightness();
this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit
@@ -44,7 +44,7 @@
}
// Paper start
@@ -520,7 +_,7 @@
@@ -521,7 +_,7 @@
}
int percentage = this.getGameRules().get(GameRules.PLAYERS_SLEEPING_PERCENTAGE);
@@ -53,7 +53,7 @@
Optional<Holder<WorldClock>> defaultClock = this.dimensionType().defaultClock();
org.bukkit.event.world.TimeSkipEvent event = null; // Paper - time skip event
if (this.getGameRules().get(GameRules.ADVANCE_TIME) && defaultClock.isPresent()) {
@@ -728,9 +_,18 @@
@@ -729,9 +_,18 @@
&& this.random.nextDouble() < difficulty.getEffectiveDifficulty() * this.paperConfig().entities.spawning.skeletonHorseThunderSpawnChance.or(0.01) // Paper - Configurable spawn chances for skeleton horses
&& !this.getBlockState(pos.below()).is(BlockTags.LIGHTNING_RODS);
if (isTrap) {
@@ -73,7 +73,7 @@
horse.setAge(0);
horse.setPos(pos.getX(), pos.getY(), pos.getZ());
this.addFreshEntity(horse, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.LIGHTNING); // CraftBukkit
@@ -765,9 +_,35 @@
@@ -766,9 +_,35 @@
if (state.is(Blocks.SNOW)) {
int currentLayers = state.getValue(SnowLayerBlock.LAYERS);
if (currentLayers < Math.min(maxHeight, 8)) {
@@ -109,7 +109,7 @@
}
} else {
org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this, topPos, Blocks.SNOW.defaultBlockState(), Block.UPDATE_ALL, null); // CraftBukkit
@@ -788,7 +_,7 @@
@@ -789,7 +_,7 @@
p -> p.is(PoiTypes.LIGHTNING_ROD),
lightningRodPos -> lightningRodPos.getY() == this.getHeight(Heightmap.Types.WORLD_SURFACE, lightningRodPos.getX(), lightningRodPos.getZ()) - 1,
center,
@@ -118,7 +118,7 @@
PoiManager.Occupancy.ANY
);
return nearbyLightningRod.map(blockPos -> blockPos.above(1));
@@ -836,8 +_,26 @@
@@ -837,8 +_,26 @@
int percentage = this.getGameRules().get(GameRules.PLAYERS_SLEEPING_PERCENTAGE);
Component message;
if (this.sleepStatus.areEnoughSleeping(percentage)) {
@@ -145,7 +145,7 @@
message = Component.translatable("sleep.players_sleeping", this.sleepStatus.amountSleeping(), this.sleepStatus.sleepersNeeded(percentage));
}
@@ -1003,6 +_,7 @@
@@ -1004,6 +_,7 @@
public void resetWeatherCycle() {
WeatherData weatherData = this.getWeatherData();
// CraftBukkit start
@@ -153,7 +153,7 @@
weatherData.setRaining(false, org.bukkit.event.weather.WeatherChangeEvent.Cause.SLEEP); // Paper - Add cause to Weather/ThunderChangeEvents
// If we stop due to everyone sleeping we should reset the weather duration to some other random value.
// Not that everyone ever manages to get the whole server to sleep at the same time....
@@ -1010,6 +_,7 @@
@@ -1011,6 +_,7 @@
weatherData.setRainTime(0);
}
// CraftBukkit end
@@ -161,7 +161,7 @@
weatherData.setThundering(false, org.bukkit.event.weather.ThunderChangeEvent.Cause.SLEEP); // Paper - Add cause to Weather/ThunderChangeEvents
// CraftBukkit start
// If we stop due to everyone sleeping we should reset the weather duration to some other random value.
@@ -1655,7 +_,7 @@
@@ -1662,7 +_,7 @@
Explosion.BlockInteraction blockInteraction = switch (interactionType) {
case NONE -> Explosion.BlockInteraction.KEEP;
case BLOCK -> this.getDestroyType(GameRules.BLOCK_EXPLOSION_DROP_DECAY);
@@ -170,7 +170,7 @@
? this.getDestroyType(GameRules.MOB_EXPLOSION_DROP_DECAY)
: Explosion.BlockInteraction.KEEP;
case TNT -> this.getDestroyType(GameRules.TNT_EXPLOSION_DROP_DECAY);
@@ -2561,7 +_,7 @@
@@ -2569,7 +_,7 @@
// Spigot start
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
// Paper start - Fix merchant inventory not closing on entity removal

View File

@@ -137,7 +137,7 @@
}
}
}
@@ -3998,7 +_,7 @@
@@ -4000,7 +_,7 @@
}
public boolean canUsePortal(final boolean ignorePassenger) {
@@ -146,7 +146,7 @@
}
public boolean canTeleport(final Level from, final Level to) {
@@ -4546,6 +_,12 @@
@@ -4548,6 +_,12 @@
return Mth.lerp(partial, this.yRotO, this.yRot);
}
@@ -159,7 +159,7 @@
public boolean touchingUnloadedChunk() {
AABB box = this.getBoundingBox().inflate(1.0);
int x0 = Mth.floor(box.minX);
@@ -4840,7 +_,7 @@
@@ -4842,7 +_,7 @@
}
public float maxUpStep() {

View File

@@ -137,7 +137,7 @@
this.interestedAngleO = this.interestedAngle;
if (this.isInterested()) {
this.interestedAngle = this.interestedAngle + (1.0F - this.interestedAngle) * 0.4F;
@@ -504,13 +_,27 @@
@@ -516,13 +_,27 @@
itemStack.consume(1, player);
this.tryToTame(player);
return InteractionResult.SUCCESS_SERVER;

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -964,6 +_,7 @@
@@ -965,6 +_,7 @@
@Override
protected boolean canRide(final Entity vehicle) {
@@ -8,7 +8,7 @@
return false;
}
@@ -999,7 +_,7 @@
@@ -1000,7 +_,7 @@
boolean shouldDrop = level.getGameRules().get(GameRules.MOB_DROPS);
int xpCount = 500;

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/item/BlockItem.java
+++ b/net/minecraft/world/item/BlockItem.java
@@ -138,7 +_,16 @@
@@ -132,7 +_,16 @@
protected boolean updateCustomBlockEntityTag(
final BlockPos pos, final Level level, final @Nullable Player player, final ItemStack itemStack, final BlockState placedState
) {
@@ -18,7 +18,7 @@
}
protected @Nullable BlockState getPlacementState(final BlockPlaceContext context) {
@@ -200,6 +_,7 @@
@@ -194,6 +_,7 @@
}
if (!type.onlyOpCanSetNbt() || player != null && (player.canUseGameMasterBlocks() || (player.getAbilities().instabuild && player.getBukkitEntity().hasPermission("minecraft.nbt.place")))) { // Spigot - add permission
@@ -26,7 +26,7 @@
return customData.loadInto(blockEntity, level.registryAccess());
}
@@ -240,6 +_,7 @@
@@ -234,6 +_,7 @@
public void onDestroyed(final ItemEntity entity) {
ItemContainerContents container = entity.getItem().set(DataComponents.CONTAINER, ItemContainerContents.EMPTY);
if (container != null) {

View File

@@ -4,7 +4,7 @@
// revert back all captured blocks
for (org.bukkit.block.BlockState blockstate : blocks) {
((org.bukkit.craftbukkit.block.CraftBlockState) blockstate).revertPlace();
+ ((org.bukkit.craftbukkit.block.CraftBlock) blockstate.getBlock()).getNMS().getBlock().forgetPlacer(); // Purpur - Store placer on Block when placed
+ ((org.bukkit.craftbukkit.block.CraftBlock) blockstate.getBlock()).getBlockState().getBlock().forgetPlacer(); // Purpur - Store placer on Block when placed
}
SignItem.openSign = null; // SPIGOT-6758 - Reset on early return

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/EntityGetter.java
+++ b/net/minecraft/world/level/EntityGetter.java
@@ -146,7 +_,7 @@
@@ -142,7 +_,7 @@
default boolean hasNearbyAlivePlayer(final double x, final double y, final double z, final double range) {
for (Player player : this.players()) {

View File

@@ -9,7 +9,7 @@
public static final MapCodec<CactusBlock> CODEC = simpleCodec(CactusBlock::new);
public static final IntegerProperty AGE = BlockStateProperties.AGE_15;
public static final int MAX_AGE = 15;
@@ -117,7 +_,7 @@
@@ -113,7 +_,7 @@
protected boolean canSurvive(final BlockState state, final LevelReader level, final BlockPos pos) {
for (Direction direction : Direction.Plane.HORIZONTAL) {
BlockState neighbor = level.getBlockState(pos.relative(direction));
@@ -18,7 +18,7 @@
return false;
}
}
@@ -148,4 +_,34 @@
@@ -144,4 +_,34 @@
protected boolean isPathfindable(final BlockState state, final PathComputationType type) {
return false;
}

View File

@@ -19,8 +19,8 @@
} else if (this == Blocks.CAVE_VINES) {
modifier = level.spigotConfig.caveVinesModifier;
}
- if (state.getValue(AGE) < 25 && random.nextDouble() < ((modifier / 100.0D) * this.growPerTickProbability)) { // Spigot - SPIGOT-7159: Better modifier resolution
+ if (state.getValue(AGE) < getMaxGrowthAge() && random.nextDouble() < ((modifier / 100.0D) * this.growPerTickProbability)) { // Spigot - SPIGOT-7159: Better modifier resolution // Purpur - kelp, cave, weeping, and twisting configurable max growth age
- if (state.getValue(AGE) < 25 && random.nextDouble() < ((modifier / 100.0) * this.growPerTickProbability)) { // Spigot - SPIGOT-7159: Better modifier resolution
+ if (state.getValue(AGE) < getMaxGrowthAge() && random.nextDouble() < ((modifier / 100.0) * this.growPerTickProbability)) { // Spigot - SPIGOT-7159: Better modifier resolution // Purpur - kelp, cave, weeping, and twisting configurable max growth age
// Spigot end
BlockPos growthPos = pos.relative(this.growthDirection);
if (this.canGrowInto(level.getBlockState(growthPos))) {

View File

@@ -36,10 +36,10 @@ index c5a866735d7d918ea58306ea2299a8b82be52f3f..d6ddbcff911ce4c97a20883af10d2b47
+ // Purpur end - Ridables
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 2618ace4a77efb66f94a5b0755dd60f14626e343..7297e8cee2831069530c3266aed0bdb43d344280 100644
index 29124cd1cf3b8fcbaa82430f6aecac5662d0a9b8..ad65c2c26195ffa423a59ae6b67d910d528aee09 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -653,6 +653,15 @@ public class CraftEventFactory {
@@ -646,6 +646,15 @@ public class CraftEventFactory {
}
craftServer.getPluginManager().callEvent(event);
@@ -55,7 +55,7 @@ index 2618ace4a77efb66f94a5b0755dd60f14626e343..7297e8cee2831069530c3266aed0bdb4
return event;
}
@@ -1174,6 +1183,7 @@ public class CraftEventFactory {
@@ -1167,6 +1176,7 @@ public class CraftEventFactory {
EntityDamageEvent event;
if (damager != null) {
event = new EntityDamageByEntityEvent(damager.getBukkitEntity(), damagee.getBukkitEntity(), cause, bukkitDamageSource, modifiers, modifierFunctions, critical);

View File

@@ -24,10 +24,10 @@ index d6ddbcff911ce4c97a20883af10d2b4752b63f55..7db0454a8c9251faa815500c307d116b
Preconditions.checkArgument(entity != null, "Unknown entity");
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 4f31c5604639b4699631449569ba73d064f83dc3..2eeb96681ac9bbc8ba2cba2dfe1cef4a7e61e500 100644
index 18709cf2d7d69dc8f4313eca0c0358f60f58b16b..fe9d7ecfec87a8914edb32561210ced95b599a7b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1132,4 +1132,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -1133,4 +1133,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
manager.untrackWaypoint(getHandle());
manager.trackWaypoint(getHandle());
}

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftConduit.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftConduit.java
@@ -75,7 +_,7 @@
@@ -74,7 +_,7 @@
public int getRange() {
this.ensureNoWorldGeneration();
ConduitBlockEntity conduit = (ConduitBlockEntity) this.getBlockEntityFromWorld();

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -490,7 +_,7 @@
@@ -491,7 +_,7 @@
net.minecraft.server.level.ServerPlayer nmsKiller = killer == null ? null : ((CraftPlayer) killer).getHandle();
this.getHandle().setLastHurtByMob(nmsKiller);
if (nmsKiller != null) {

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -586,10 +_,15 @@
@@ -585,10 +_,15 @@
@Override
public void setPlayerListName(String name) {
@@ -17,7 +17,7 @@
if (this.getHandle().connection == null) return; // Paper - Updates are possible before the player has fully joined
for (ServerPlayer player : this.server.getHandle().players) {
if (player.getBukkitEntity().canSee(this)) {
@@ -990,6 +_,80 @@
@@ -989,6 +_,80 @@
}
}
@@ -98,7 +98,7 @@
@Override
public void sendBlockDamage(Location loc, float progress, org.bukkit.entity.Entity source) {
Preconditions.checkArgument(source != null, "source must not be null");
@@ -2502,6 +_,28 @@
@@ -2501,6 +_,28 @@
public float getWalkSpeed() {
return this.getHandle().getAbilities().walkingSpeed * 2f;
}

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/craftbukkit/legacy/MaterialRerouting.java
+++ b/src/main/java/org/bukkit/craftbukkit/legacy/MaterialRerouting.java
@@ -703,4 +_,32 @@
@@ -702,4 +_,32 @@
meta.setCanPlaceOn(materials);
}
// Paper end