3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00

Revert "Legacy data should look for legacy materials (Fixes #6618)" (Fixes #6664)

This reverts commit 0d19cd7241.
Dieser Commit ist enthalten in:
Shane Freeder 2021-09-29 03:12:40 +01:00
Ursprung 3e3cea1a76
Commit f7e397621a

Datei anzeigen

@ -1,19 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Fri, 17 Sep 2021 09:26:06 +0100
Subject: [PATCH] Legacy data should look for legacy materials
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 59a026d80b0a0a4890becf98efdbe5325b2c622a..240728d1d4376cb3aa83613085fbc69fa8b5f0df 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -492,7 +492,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
Material type;
if (version < 0) {
- type = Material.getMaterial(Material.LEGACY_PREFIX + (String) args.get("type"));
+ type = Material.getMaterial(Material.LEGACY_PREFIX + (String) args.get("type"), true);
byte dataVal = (type != null && type.getMaxDurability() == 0) ? (byte) damage : 0; // Actually durable items get a 0 passed into conversion
type = Bukkit.getUnsafe().fromLegacy(new MaterialData(type, dataVal), true);