9
0
mirror of https://github.com/SparklyPower/SparklyPaper.git synced 2025-12-26 02:19:33 +00:00

Update to Paper 1.21.7 (0cadaef)

This commit is contained in:
MrPowerGamerBR
2025-07-02 20:25:35 -03:00
parent 89553e1edd
commit 2372d0edbe
7 changed files with 29 additions and 29 deletions

View File

@@ -11,7 +11,7 @@ jobs:
uses: actions/checkout@v3
with:
path: 'SparklyPaper'
ref: 'ver/1.21.6'
ref: 'ver/1.21.7'
token: ${{ secrets.LORITTA_PAT }}
- name: Checkout Paper Repository

View File

@@ -1,7 +1,7 @@
group=net.sparklypower.sparklypaper
version=1.21.6-R0.1-SNAPSHOT
mcVersion=1.21.6
paperRef=d7510efc16a586a732f6718963b555f649181a9b
version=1.21.7-R0.1-SNAPSHOT
mcVersion=1.21.7
paperRef=0cadaefc094c1d25eb19332cfebc02f9b5885c4a
org.gradle.configuration-cache=true
org.gradle.caching=true

View File

@@ -241,18 +241,18 @@ index ecfe237fbecde610d095647a1f2a10f7d426d786..4211816c3b21a2ee66297a8f58b51de3
// Paper start - extra debug info
if (entity.valid) {
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
index f3eca351021c37b64315872d075bd0a84aeee267..d4648ecc943324d1f66fe5fcfe4cfafef98af7ba 100644
index dfa00516e9a6c941087bd7ecfd5aca8a9f7915be..6a71b746b282ee53f838c509c36590c8dd8eca4a 100644
--- a/net/minecraft/server/level/ServerPlayer.java
+++ b/net/minecraft/server/level/ServerPlayer.java
@@ -525,6 +525,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
}
@@ -459,6 +459,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
return this.viewDistanceHolder;
}
// Paper end - improve keepalives
// Paper end - rewrite chunk system
+ public boolean hasTickedAtLeastOnceInNewWorld = false; // SparklyPaper - parallel world ticking (fixes bug in DreamResourceReset where the inventory is opened AFTER the player has changed worlds, if you click with the quick tp torch in a chest, because the inventory is opened AFTER the player has teleported)
public ServerPlayer(MinecraftServer server, ServerLevel level, GameProfile gameProfile, ClientInformation clientInformation) {
super(level, gameProfile);
@@ -805,6 +806,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
@@ -739,6 +740,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
@Override
public void tick() {
@@ -260,7 +260,7 @@ index f3eca351021c37b64315872d075bd0a84aeee267..d4648ecc943324d1f66fe5fcfe4cfafe
// CraftBukkit start
if (this.joining) {
this.joining = false;
@@ -1460,6 +1462,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
@@ -1394,6 +1396,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
return this;
} else {
// CraftBukkit start
@@ -268,7 +268,7 @@ index f3eca351021c37b64315872d075bd0a84aeee267..d4648ecc943324d1f66fe5fcfe4cfafe
/*
this.isChangingDimension = true;
LevelData levelData = level.getLevelData();
@@ -1796,6 +1799,12 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
@@ -1730,6 +1733,12 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
return OptionalInt.empty();
} else {
// CraftBukkit start
@@ -281,7 +281,7 @@ index f3eca351021c37b64315872d075bd0a84aeee267..d4648ecc943324d1f66fe5fcfe4cfafe
this.containerMenu = abstractContainerMenu; // Moved up
if (!this.isImmobile())
this.connection
@@ -1860,6 +1869,11 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
@@ -1794,6 +1803,11 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
}
@Override
public void closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason reason) {
@@ -294,7 +294,7 @@ index f3eca351021c37b64315872d075bd0a84aeee267..d4648ecc943324d1f66fe5fcfe4cfafe
// Paper end - Inventory close reason
this.connection.send(new ClientboundContainerClosePacket(this.containerMenu.containerId));
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
index b1524279c02cd3be82338a6bd0320cb125a134d5..9b291998bb5a5dcb94e2e6f8f1813a083fbb55a1 100644
index dea72819f2933e5a806bb3a0603e4ebdf7f99456..1652cb7df981225e551b9c034f0a3756a1a91193 100644
--- a/net/minecraft/server/players/PlayerList.java
+++ b/net/minecraft/server/players/PlayerList.java
@@ -112,7 +112,7 @@ public abstract class PlayerList {
@@ -323,7 +323,7 @@ index b1524279c02cd3be82338a6bd0320cb125a134d5..9b291998bb5a5dcb94e2e6f8f1813a08
player.isRealPlayer = true; // Paper
player.loginTime = System.currentTimeMillis(); // Paper - Replace OfflinePlayer#getLastPlayed
GameProfile gameProfile = player.getGameProfile();
@@ -709,6 +710,12 @@ public abstract class PlayerList {
@@ -676,6 +677,12 @@ public abstract class PlayerList {
}
public ServerPlayer respawn(ServerPlayer player, boolean keepInventory, Entity.RemovalReason reason, @Nullable org.bukkit.event.player.PlayerRespawnEvent.RespawnReason eventReason, @Nullable org.bukkit.Location location) {
@@ -336,7 +336,7 @@ index b1524279c02cd3be82338a6bd0320cb125a134d5..9b291998bb5a5dcb94e2e6f8f1813a08
player.stopRiding(); // CraftBukkit
this.players.remove(player);
this.playersByName.remove(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
@@ -719,6 +726,7 @@ public abstract class PlayerList {
@@ -686,6 +693,7 @@ public abstract class PlayerList {
ServerPlayer serverPlayer = player;
Level fromWorld = player.level();
player.wonGame = false;
@@ -429,7 +429,7 @@ index f9e7532f86122a379692561a639a209a126e8bba..2709dfae53c1a210f36c45fa0df0d495
if (isLocatorBarEnabledFor(player)) {
if (!connection.isBroken()) {
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 81413ac0de7b3c7a72bc606fe5ae6fb4ae7055e3..69980f5a2766b17c429785ef05520d6af3201735 100644
index 3d2c0a4d3a1f9d3e5cc6cd0cdb988ae1205de821..53d99753ab7454df5fd9f2565283f93404030c70 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -834,7 +834,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -608,6 +_,31 @@
@@ -610,6 +_,31 @@
LOGGER.warn("{} (vehicle of {}) moved wrongly! {}", rootVehicle.getName().getString(), this.player.getName().getString(), Math.sqrt(d7));
}
@@ -32,7 +32,7 @@
// Paper start - optimise out extra getCubes
boolean teleportBack = flag1;
if (!teleportBack) {
@@ -1502,7 +_,7 @@
@@ -1504,7 +_,7 @@
d3 = d - this.lastGoodX; // Paper - diff on change, used for checking large move vectors above
d4 = d1 - this.lastGoodY; // Paper - diff on change, used for checking large move vectors above
d5 = d2 - this.lastGoodZ; // Paper - diff on change, used for checking large move vectors above
@@ -41,7 +41,7 @@
if (this.player.onGround() && !packet.isOnGround() && flag) {
// Paper start - Add PlayerJumpEvent
org.bukkit.entity.Player player = this.getCraftPlayer();
@@ -1536,7 +_,37 @@
@@ -1538,7 +_,37 @@
boolean flag1 = this.player.verticalCollisionBelow;
this.player.move(MoverType.PLAYER, new Vec3(d3, d4, d5));
@@ -80,7 +80,7 @@
final boolean didCollide = toX != this.player.getX() || toY != this.player.getY() || toZ != this.player.getZ(); // Paper - needed here as the difference in Y can be reset - also note: this is only a guess at whether collisions took place, floating point errors can make this true when it shouldn't be...
// Paper start - prevent position desync
if (this.awaitingPositionFromClient != null) {
@@ -1669,14 +_,14 @@
@@ -1671,14 +_,14 @@
&& this.noBlocksAround(this.player);
this.player.level().getChunkSource().move(this.player);
Vec3 vec3 = new Vec3(this.player.getX() - x, this.player.getY() - y, this.player.getZ() - z);
@@ -98,7 +98,7 @@
|| this.player.hasLandedInLiquid()
|| this.player.onClimbable()
|| this.player.isSpectator()
@@ -1691,7 +_,7 @@
@@ -1693,7 +_,7 @@
this.lastGoodZ = this.player.getZ();
} else {
this.internalTeleport(x, y, z, f, f1); // CraftBukkit - SPIGOT-1807: Don't call teleport event, when the client thinks the player is falling, because the chunks are not loaded on the client yet.
@@ -107,7 +107,7 @@
this.player.removeLatestMovementRecording();
}
}
@@ -3175,6 +_,21 @@
@@ -3173,6 +_,21 @@
} else {
event = new CraftItemEvent(recipe, inventory, type, slotNum, click, action);
}

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1073,6 +_,7 @@
@@ -1045,6 +_,7 @@
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
this.console.paperConfigurations.reloadConfigs(this.console);
@@ -8,7 +8,7 @@
for (ServerLevel world : this.console.getAllLevels()) {
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
@@ -1088,6 +_,7 @@
@@ -1060,6 +_,7 @@
}
}
world.spigotConfig.init(); // Spigot
@@ -16,7 +16,7 @@
}
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
@@ -1105,6 +_,7 @@
@@ -1077,6 +_,7 @@
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
this.spark.registerCommandBeforePlugins(this); // Paper - spark

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1308,6 +_,23 @@
@@ -1318,6 +_,23 @@
Bukkit.getPluginManager().callEvent(crafterCraftEvent);
return crafterCraftEvent;
}

View File

@@ -1,9 +1,9 @@
--- a/src/test/java/org/bukkit/craftbukkit/legacy/LegacyTest.java
+++ b/src/test/java/org/bukkit/craftbukkit/legacy/LegacyTest.java
@@ -141,6 +_,9 @@
Material.BLACK_HARNESS, Material.BLUE_HARNESS, Material.BROWN_HARNESS, Material.CYAN_HARNESS, Material.DRIED_GHAST, Material.GRAY_HARNESS, Material.GREEN_HARNESS, Material.HAPPY_GHAST_SPAWN_EGG, Material.LIGHT_BLUE_HARNESS, Material.LIGHT_GRAY_HARNESS,
Material.LIME_HARNESS, Material.MAGENTA_HARNESS, Material.ORANGE_HARNESS, Material.PINK_HARNESS, Material.PURPLE_HARNESS, Material.RED_HARNESS, Material.WHITE_HARNESS, Material.YELLOW_HARNESS,
@@ -143,6 +_,9 @@
Material.MUSIC_DISC_TEARS,
// 1.21.7
Material.MUSIC_DISC_LAVA_CHICKEN,
+ // SparklyPower custom blocks
+ Material.SPARKLYPOWER_RAINBOW_WOOL, Material.SPARKLYPOWER_RAINBOW_CONCRETE, Material.SPARKLYPOWER_RAINBOW_TERRACOTTA, Material.SPARKLYPOWER_ASPHALT_PLAYER, Material.SPARKLYPOWER_ASPHALT_SERVER, Material.SPARKLYPOWER_ASPHALT_PLAYER_SLAB,
+ Material.SPARKLYPOWER_ASPHALT_SERVER_SLAB,