mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-04-20 02:08:15 +02:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@1a332f7e move age locked related methods to Ageable and normalize setBaby/Adult setters PaperMC/Paper@8b644429 fix chorus plant not growing properly PaperMC/Paper@d45004bd deprecate group methods for some recipes PaperMC/Paper@006f9d1b use the right var in ItemStack#useOn PaperMC/Paper@f66c5901 remove redundant setBlock for cauldrons PaperMC/Paper@c2631139 simplify cauldron events PaperMC/Paper@33a9258c merge PlayerInteractAtEntityEvent and PlayerInteractEntityEvent PaperMC/Paper@2d6e82ec Change world storage layout to be closer to vanilla & implement migration (#13736) PaperMC/Paper@16e0088d Update Moonrise and DC PaperMC/Paper@c7532535 Delete rej patches for applied files PaperMC/Paper@e0497a6e Fix Moonrise compile
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
private final LevelDebugSynchronizers debugSynchronizers = new LevelDebugSynchronizers(this);
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -380,8 +_,25 @@
|
||||
@@ -642,8 +_,25 @@
|
||||
// CraftBukkit end
|
||||
this.tickTime = tickTime;
|
||||
this.server = server;
|
||||
@@ -35,16 +35,16 @@
|
||||
+ // Purpur end - Allow toggling special MobSpawners per world
|
||||
ChunkGenerator generator = levelStem.generator();
|
||||
// CraftBukkit start
|
||||
this.serverLevelData.setWorld(this);
|
||||
@@ -465,6 +_,7 @@
|
||||
this.environmentAttributes = EnvironmentAttributeSystem.builder().addDefaultLayers(this).build();
|
||||
this.updateSkyBrightness();
|
||||
if (loadedWorldData.pdc() != null) {
|
||||
@@ -731,6 +_,7 @@
|
||||
this.chunkDataController = new ca.spottedleaf.moonrise.patches.chunk_system.io.datacontroller.ChunkDataController((ServerLevel)(Object)this, this.chunkTaskScheduler);
|
||||
// Paper end - rewrite chunk system
|
||||
this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit
|
||||
+ this.preciseTime = this.serverLevelData.getGameTime(); // Purpur - Configurable daylight cycle
|
||||
}
|
||||
|
||||
// Paper start
|
||||
@@ -521,7 +_,7 @@
|
||||
@@ -787,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()) {
|
||||
@@ -729,9 +_,18 @@
|
||||
@@ -1026,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
|
||||
@@ -766,9 +_,35 @@
|
||||
@@ -1063,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
|
||||
@@ -789,7 +_,7 @@
|
||||
@@ -1086,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));
|
||||
@@ -837,8 +_,26 @@
|
||||
@@ -1134,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));
|
||||
}
|
||||
|
||||
@@ -1004,6 +_,7 @@
|
||||
@@ -1301,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....
|
||||
@@ -1011,6 +_,7 @@
|
||||
@@ -1308,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.
|
||||
@@ -1662,7 +_,7 @@
|
||||
@@ -1970,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);
|
||||
@@ -2569,7 +_,7 @@
|
||||
@@ -2901,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
|
||||
|
||||
Reference in New Issue
Block a user