Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10164)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 63c208dd Remove no longer used import 70be76c7 PR-958: Further clarify deprecation of TAG_CONTAINER_ARRAY ae21f4ac PR-955: Add methods to place structures with block/entity transformers e3d960f2 SPIGOT-7547: Remark that Damageable#setAbsorptionAmount() is capped to a specific value b125516c Fix typo in RecipeChoice.ExactChoice docs 309497c1 Add EntityMountEvent and EntityDismount Event 2fd45ae3 Improve ItemFactory#enchantItem consistency 2b198268 PR-933: Define native persistent data types for lists CraftBukkit Changes: 771182f70 PR-1327: Add methods to place structures with block/entity transformers e41ad4c82 SPIGOT-7567: SpawnReason for SNOWMAN is reported as BUILD_IRONGOLEM 76931e8bd Add EntityMountEvent and EntityDismount Event 9b29b21c7 PR-1183: Better handle lambda expression and renaming of classes in Commodore 1462ebe85 Reformat Commodore.java 9fde4c037 PR-1324: Improve ItemFactory#enchantItem consistency 4e419c774 PR-1295: Define native persistent data types for lists dd8cca388 SPIGOT-7562: Fix Score#getScore and Score#isScoreSet 690278200 Only fetch an online UUID in online mode 1da8d9a53 Fire PreLogin events even in offline mode 2e88514ad PR-1325: Use CraftBlockType and CraftItemType instead of CraftMagicNumbers to convert between minecraft and bukkit block / item representation Spigot Changes: 864e4acc Restore accidentally removed package-info.java f91a10d5 Remove obsolete EntityMountEvent and EntityDismountEvent 828f0593 SPIGOT-7558: Deprecate silenceable lightning API as sound is now client-side and cannot be removed cdc4e035 Remove obsolete patch fetching correct mode UUIDs 49e36b8e Merge related BungeeCord patches 6e87b9ab Remove obsolete firing of PreLogin events in offline mode 5c76b183 Remove redundant patch dealing with exceptions in the crash reporter 3a2219d1 Remove redundant patch logging cause of unexpected exception
This commit is contained in:
parent
78fcb8e766
commit
8657cd91d7
181 changed files with 920 additions and 977 deletions
|
@ -5,10 +5,10 @@ Subject: [PATCH] Cache block data strings
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index a82f7dd2cbc2f6311b810f117f0970a47db85818..2616d771a8a95dac4440b74933c8aa7b83a9bbd1 100644
|
||||
index 706e8a5e17ccd87266a5c154cd938974d380cb21..1eaf509c37c176ad94035d0612f69d6ef53b3626 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2148,6 +2148,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2134,6 +2134,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.getPlayerList().reloadResources();
|
||||
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
|
||||
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager);
|
||||
|
@ -17,10 +17,10 @@ index a82f7dd2cbc2f6311b810f117f0970a47db85818..2616d771a8a95dac4440b74933c8aa7b
|
|||
|
||||
if (this.isSameThread()) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||
index cf379f7da8d8e6db0d74f1ca0e4b42e017a8191e..cab13044a3c827256967632a1769f4aec3b11839 100644
|
||||
index 85ee8a3d6db6610104f8a10d77d7cad5dc9b667e..bbf58089dd5de3e38a236bb662ea3e139d159161 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
|
||||
@@ -153,7 +153,7 @@ public class CraftBlockData implements BlockData {
|
||||
@@ -154,7 +154,7 @@ public class CraftBlockData implements BlockData {
|
||||
return exactMatch;
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ index cf379f7da8d8e6db0d74f1ca0e4b42e017a8191e..cab13044a3c827256967632a1769f4ae
|
|||
|
||||
/**
|
||||
* Convert an NMS Enum (usually a BlockStateEnum) to its appropriate Bukkit
|
||||
@@ -536,9 +536,39 @@ public class CraftBlockData implements BlockData {
|
||||
@@ -537,9 +537,39 @@ public class CraftBlockData implements BlockData {
|
||||
Preconditions.checkState(CraftBlockData.MAP.put(nms, bukkit) == null, "Duplicate mapping %s->%s", nms, bukkit);
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ index cf379f7da8d8e6db0d74f1ca0e4b42e017a8191e..cab13044a3c827256967632a1769f4ae
|
|||
|
||||
+ // Paper start - cache block data strings
|
||||
+ if (material != null) {
|
||||
+ Block block = CraftMagicNumbers.getBlock(material);
|
||||
+ Block block = CraftBlockType.bukkitToMinecraft(material);
|
||||
+ if (block != null) {
|
||||
+ net.minecraft.resources.ResourceLocation key = BuiltInRegistries.BLOCK.getKey(block);
|
||||
+ data = data == null ? key.toString() : key + data;
|
||||
|
@ -67,5 +67,5 @@ index cf379f7da8d8e6db0d74f1ca0e4b42e017a8191e..cab13044a3c827256967632a1769f4ae
|
|||
+ private static CraftBlockData createNewData(Material material, String data) {
|
||||
+ // Paper end - cache block data strings
|
||||
net.minecraft.world.level.block.state.BlockState blockData;
|
||||
Block block = CraftMagicNumbers.getBlock(material);
|
||||
Block block = CraftBlockType.bukkitToMinecraft(material);
|
||||
Map<Property<?>, Comparable<?>> parsed = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue