#1479: Use custom #isBlock method in legacy init instead of the one in Material, since it relies on legacy being init
This commit is contained in:
parent
98c57cbbee
commit
bb3284a894
@ -331,7 +331,7 @@ public final class CraftLegacy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Handle blocks
|
// Handle blocks
|
||||||
if (material.isBlock()) {
|
if (isBlock(material)) { // Use custom method instead of Material#isBlock since it relies on this being already run
|
||||||
for (byte data = 0; data < 16; data++) {
|
for (byte data = 0; data < 16; data++) {
|
||||||
MaterialData matData = new MaterialData(material, data);
|
MaterialData matData = new MaterialData(material, data);
|
||||||
Dynamic blockTag = DataConverterFlattenData.getTag(material.getId() << 4 | data);
|
Dynamic blockTag = DataConverterFlattenData.getTag(material.getId() << 4 | data);
|
||||||
@ -438,6 +438,12 @@ public final class CraftLegacy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static boolean isBlock(Material material) {
|
||||||
|
// From Material#isBlock before the rewrite to ItemType / BlockType
|
||||||
|
// Git hash: 42f6cdf4c5dcdd52a27543403dcd17fb60311621
|
||||||
|
return 0 <= material.getId() && material.getId() < 256;
|
||||||
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
System.err.println("");
|
System.err.println("");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user