mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-02 13:12:03 -07:00
[ci skip] Replace some magic values with constant references
This commit is contained in:
@@ -16,7 +16,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ private void processText() {
|
||||
+ CompoundTag display = getTagElement("display");
|
||||
+ if (display != null) {
|
||||
+ if (display.contains("Name", 8)) {
|
||||
+ if (display.contains("Name", net.minecraft.nbt.Tag.TAG_STRING)) {
|
||||
+ String json = display.getString("Name");
|
||||
+ if (json != null && json.contains("\u00A7")) {
|
||||
+ try {
|
||||
@@ -26,8 +26,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ if (display.contains("Lore", 9)) {
|
||||
+ ListTag list = display.getList("Lore", 8);
|
||||
+ if (display.contains("Lore", net.minecraft.nbt.Tag.TAG_LIST)) {
|
||||
+ ListTag list = display.getList("Lore", net.minecraft.nbt.Tag.TAG_STRING);
|
||||
+ for (int index = 0; index < list.size(); index++) {
|
||||
+ String json = list.getString(index);
|
||||
+ if (json != null && json.contains("\u00A7")) { // Only try if it has legacy in the unparsed json
|
||||
|
Reference in New Issue
Block a user