mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-10-31 20:27:10 +00:00
20 lines
1.2 KiB
Diff
20 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Video <videogamesm12@gmail.com>
|
|
Date: Sun, 13 Mar 2022 21:56:29 -0600
|
|
Subject: [PATCH] Validate BlockState and SoundEvent values
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/nbt/NbtUtils.java b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
|
index e3a3f19a6e63fd42e29c418e5a7439972484d492..39866c58f9dbca9b4f0018922eac076c64ffbdae 100644
|
|
--- a/src/main/java/net/minecraft/nbt/NbtUtils.java
|
|
+++ b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
|
@@ -231,7 +231,7 @@ public final class NbtUtils {
|
|
return Blocks.AIR.defaultBlockState();
|
|
} else {
|
|
// Paper start - Validate resource location
|
|
- ResourceLocation resourceLocation = ResourceLocation.tryParse(nbt.getString("Name"));
|
|
+ ResourceLocation resourceLocation = ResourceLocation.tryParse(nbt.getString("Name")); // Scissors - Validate BlockState
|
|
Optional<? extends Holder<Block>> optional = resourceLocation != null ? blockLookup.get(ResourceKey.create(Registries.BLOCK, resourceLocation)) : Optional.empty();
|
|
// Paper end - Validate resource location
|
|
if (optional.isEmpty()) {
|