mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-06 15:12:13 -07:00
Move patches to unapplied
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
--- a/net/minecraft/nbt/NbtUtils.java
|
||||
+++ b/net/minecraft/nbt/NbtUtils.java
|
||||
@@ -149,8 +149,10 @@
|
||||
if (!nbt.contains("Name", 8)) {
|
||||
return Blocks.AIR.defaultBlockState();
|
||||
} else {
|
||||
- ResourceLocation resourceLocation = ResourceLocation.parse(nbt.getString("Name"));
|
||||
- Optional<? extends Holder<Block>> optional = blockLookup.get(ResourceKey.create(Registries.BLOCK, resourceLocation));
|
||||
+ // Paper start - Validate resource location
|
||||
+ ResourceLocation resourceLocation = ResourceLocation.tryParse(nbt.getString("Name"));
|
||||
+ Optional<? extends Holder<Block>> optional = resourceLocation != null ? blockLookup.get(ResourceKey.create(Registries.BLOCK, resourceLocation)) : Optional.empty();
|
||||
+ // Paper end - Validate resource location
|
||||
if (optional.isEmpty()) {
|
||||
return Blocks.AIR.defaultBlockState();
|
||||
} else {
|
Reference in New Issue
Block a user