mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-11-14 19:34:54 -05:00
Fix decorated pot invalid resourcelocation exploit (#106)
This commit is contained in:
parent
d2e0e16016
commit
f9f5f1b345
1 changed files with 13 additions and 0 deletions
|
@ -61,6 +61,19 @@ index e2a25c29ec74147b3e66aa0b3deb85a8f6ee53a5..b0c953ad8275740679c847e348b311de
|
||||||
this.lootTableSeed = nbt.getLong("DeathLootTableSeed");
|
this.lootTableSeed = nbt.getLong("DeathLootTableSeed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java
|
||||||
|
index 6f9286db4e5786464fb0b49dc125e1228ab7ae93..8d91accb0d5e8afa3957d816bd71681b4198ee6e 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java
|
||||||
|
@@ -90,7 +90,7 @@ public class DecoratedPotBlockEntity extends BlockEntity {
|
||||||
|
return Items.BRICK;
|
||||||
|
} else {
|
||||||
|
Tag tag = list.get(index);
|
||||||
|
- return BuiltInRegistries.ITEM.get(new ResourceLocation(tag.getAsString()));
|
||||||
|
+ return BuiltInRegistries.ITEM.get(ResourceLocation.tryParse(tag.getAsString())); // Scissors
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java b/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java b/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
|
||||||
index e49eece9bff3a53469673d03a7bbf8f9cf8776b8..a49f32e9649155b6af4b1f236e4e8142d730e7e8 100644
|
index e49eece9bff3a53469673d03a7bbf8f9cf8776b8..a49f32e9649155b6af4b1f236e4e8142d730e7e8 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
|
||||||
|
|
Loading…
Reference in a new issue