Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-27 08:30:09 +01:00
Fix wither & add more debug info to missing metaindex
Dieser Commit ist enthalten in:
Ursprung
ea6c648e4f
Commit
785f0664da
@ -88,6 +88,8 @@ public enum MetaIndex {
|
|||||||
WITHER_TARGET2(Wither.class, 18, Type.Int, 12, NewType.VarInt),
|
WITHER_TARGET2(Wither.class, 18, Type.Int, 12, NewType.VarInt),
|
||||||
WITHER_TARGET3(Wither.class, 19, Type.Int, 13, NewType.VarInt),
|
WITHER_TARGET3(Wither.class, 19, Type.Int, 13, NewType.VarInt),
|
||||||
WITHER_INVULN_TIME(Wither.class, 20, Type.Int, 14, NewType.VarInt),
|
WITHER_INVULN_TIME(Wither.class, 20, Type.Int, 14, NewType.VarInt),
|
||||||
|
// wither skull
|
||||||
|
WITHERSKULL_INVULN(WitherSkull.class, 10, Type.Byte, 5, NewType.Boolean),
|
||||||
// guardian
|
// guardian
|
||||||
GUARDIAN_INFO(Guardian.class, 16, Type.Int, 11, NewType.Byte),
|
GUARDIAN_INFO(Guardian.class, 16, Type.Int, 11, NewType.Byte),
|
||||||
GUARDIAN_TARGET(Guardian.class, 17, Type.Int, 12, NewType.VarInt),
|
GUARDIAN_TARGET(Guardian.class, 17, Type.Int, 12, NewType.VarInt),
|
||||||
|
@ -551,6 +551,17 @@ public class OutgoingTransformer {
|
|||||||
} catch (IllegalAccessException e) {
|
} catch (IllegalAccessException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
if (metaIndex == null) {
|
||||||
|
try {
|
||||||
|
System.out.println("Meta Data for " + type + ": Not found, ID: " + (int) ReflectionUtil.invoke(watchableObj, "a"));
|
||||||
|
} catch (NoSuchMethodException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (InvocationTargetException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (IllegalAccessException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
if (metaIndex.getNewType() != NewType.Discontinued) {
|
if (metaIndex.getNewType() != NewType.Discontinued) {
|
||||||
if (metaIndex.getNewType() != NewType.BlockID || id != -1 && data == -1 || id == -1 && data != -1) { // block ID is only written if we have both parts
|
if (metaIndex.getNewType() != NewType.BlockID || id != -1 && data == -1 || id == -1 && data != -1) { // block ID is only written if we have both parts
|
||||||
@ -635,9 +646,11 @@ public class OutgoingTransformer {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
if (type != null) {
|
if (type != null) {
|
||||||
System.out.println("An error occurred with entity meta data for " + type);
|
System.out.println("An error occurred with entity meta data for " + type);
|
||||||
|
if (metaIndex != null) {
|
||||||
System.out.println("Old ID: " + metaIndex.getIndex() + " New ID: " + metaIndex.getNewIndex());
|
System.out.println("Old ID: " + metaIndex.getIndex() + " New ID: " + metaIndex.getNewIndex());
|
||||||
System.out.println("Old Type: " + metaIndex.getOldType() + " New Type: " + metaIndex.getNewType());
|
System.out.println("Old Type: " + metaIndex.getOldType() + " New Type: " + metaIndex.getNewType());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren