mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-12 20:32:00 -05:00
Switch around item conversion code as well
This commit is contained in:
1 parent
96778caabb
commit
a0a27e5876
1 file changed
+7
-6
@@ -109,6 +109,13 @@ public class CraftLegacy {
|
||||
|
||||
MaterialData materialData = new MaterialData(material, (byte) data);
|
||||
|
||||
// First try matching item
|
||||
Item convertedItem = materialToItem.get(materialData);
|
||||
if (convertedItem != null) {
|
||||
return convertedItem;
|
||||
}
|
||||
|
||||
// Fallback to matching block
|
||||
if (material.isBlock()) {
|
||||
// Try exact match first
|
||||
IBlockData converted = materialToData.get(materialData);
|
||||
@@ -123,12 +130,6 @@ public class CraftLegacy {
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback to matching item
|
||||
Item convertedItem = materialToItem.get(materialData);
|
||||
if (convertedItem != null) {
|
||||
return convertedItem;
|
||||
}
|
||||
|
||||
// Return existing item
|
||||
return item;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user