Skip to content

Commit

Permalink
Fix missing namespaces on the SparklyPower Legacy NBT remapper
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPowerGamerBR committed Jun 1, 2024
1 parent 35a6a31 commit ad88829
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions patches/server/0018-Parallel-world-ticking.patch
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ index a2142930b4d4b05987c90496fb9d733d99040aa0..3a3519403fab0b83aa98f95155c323c9

entityplayer1.connection = entityplayer.connection;
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 41ce41e92f3722e7ffb3423c90663d7a677bf277..d406db61eb8de56e6d921265a6dc7dce906c7592 100644
index 1d408e938173eb459f6bf1804c65de1141287868..a3c2c26371435d00980beed797ca058a167a51e2 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -869,7 +869,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
Expand Down Expand Up @@ -1765,7 +1765,7 @@ index b7ff7af2513204b151340538d50a65c850bdb75f..45f9b2594e449926d7f00f64bf12fef2
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 1a737167757891794b40575a5db48b0667e23a6b..bc8ff1ac0141185ef8531938dfefe95b9aa88bcd 100644
index dfbe0914ab2771ac632fd064719878ac47559e9f..2f1d408bf19a55d8b4c874cca3c1f5a450cdf9b8 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -942,7 +942,7 @@ public class CraftEventFactory {
Expand All @@ -1786,7 +1786,7 @@ index 1a737167757891794b40575a5db48b0667e23a6b..bc8ff1ac0141185ef8531938dfefe95b
Bukkit.getPluginManager().callEvent(event);

if (!event.isCancelled()) {
@@ -2140,7 +2140,7 @@ public class CraftEventFactory {
@@ -2154,7 +2154,7 @@ public class CraftEventFactory {
CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemStack.copyWithCount(1));

org.bukkit.event.block.BlockDispenseEvent event = new org.bukkit.event.block.BlockDispenseEvent(bukkitBlock, craftItem.clone(), CraftVector.toBukkit(to));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ index a5a21d1c7579e45b78eae4b42a9f023db74acc0a..921947048648ff4555b80be4ef669a6d

diff --git a/src/main/kotlin/net/sparklypower/sparklypaper/LegacyNBTRemapper.kt b/src/main/kotlin/net/sparklypower/sparklypaper/LegacyNBTRemapper.kt
new file mode 100644
index 0000000000000000000000000000000000000000..194d1ed887c389dc50648d0c05c2d71de2691c09
index 0000000000000000000000000000000000000000..399225fb883b9771084689d00723d944a89b0902
--- /dev/null
+++ b/src/main/kotlin/net/sparklypower/sparklypaper/LegacyNBTRemapper.kt
@@ -0,0 +1,95 @@
Expand Down Expand Up @@ -99,19 +99,19 @@ index 0000000000000000000000000000000000000000..194d1ed887c389dc50648d0c05c2d71d
+ }
+
+ perfectDreamsMap.getStringAndRemove("isMochila")?.let {
+ publicBukkitValuesMap.setBoolean("is_mochila", it.toBoolean())
+ publicBukkitValuesMap.setBoolean("sparklypower:is_mochila", it.toBoolean())
+ }
+
+ perfectDreamsMap.getStringAndRemove("mochilaId")?.let {
+ publicBukkitValuesMap.setLong("mochila_id", it.toLong())
+ publicBukkitValuesMap.setLong("sparklypower:mochila_id", it.toLong())
+ }
+
+ perfectDreamsMap.getStringAndRemove("customMapOwner")?.let {
+ publicBukkitValuesMap.setString("map_custom_owner", it)
+ publicBukkitValuesMap.setString("sparklypower:map_custom_owner", it)
+ }
+
+ perfectDreamsMap.getStringAndRemove("quickTeleport")?.let {
+ publicBukkitValuesMap.setBoolean("is_quick_resources_teleport", it.toBoolean())
+ publicBukkitValuesMap.setBoolean("sparklypower:is_quick_resources_teleport", it.toBoolean())
+ }
+
+ // If it is empty, then it means that we have migrated everything and we can remove the old PerfectDreams tag, yay!
Expand Down

0 comments on commit ad88829

Please sign in to comment.