More descripotive error if Patcher is passed invalid data for vanilla classes.

This commit is contained in:
Lex Manos 2015-06-23 20:36:23 -07:00
parent 74501f509f
commit b2033d642c

View file

@ -89,6 +89,11 @@ public class ClassPatchManager {
{
FMLRelaunchLog.warning("Patcher expecting empty class data file for %s, but received non-empty", patch.targetClassName);
}
else if (patch.existsAtTarget && (inputData == null || inputData.length == 0))
{
FMLRelaunchLog.severe("Patcher expecting non-empty class data file for %s, but received empty.", patch.targetClassName);
throw new RuntimeException(String.format("Patcher expecting non-empty class data file for %s, but received empty, your vanilla jar may be corrupt.", patch.targetClassName));
}
else
{
int inputChecksum = Hashing.adler32().hashBytes(inputData).asInt();