mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 03:49:14 +00:00
Fix NPEs in mlast commit.
This commit is contained in:
1 parent
7269d22449
commit
9335e2907b
1 file changed
+8
-2
@@ -613,11 +613,17 @@ public class FMLModContainer implements ModContainer
|
||||
return candidate.getContainedPackages();
|
||||
}
|
||||
|
||||
private boolean isTrue(Boolean value)
|
||||
{
|
||||
if (value == null) return false;
|
||||
return value.booleanValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldLoadInEnvironment()
|
||||
{
|
||||
boolean clientSideOnly = (Boolean)this.descriptor.get("clientSideOnly");
|
||||
boolean serverSideOnly = (Boolean)this.descriptor.get("serverSideOnly");
|
||||
boolean clientSideOnly = isTrue((Boolean)descriptor.get("clientSideOnly"));
|
||||
boolean serverSideOnly = isTrue((Boolean)descriptor.get("serverSideOnly"));
|
||||
|
||||
if (clientSideOnly && serverSideOnly)
|
||||
throw new RuntimeException("Mod annotation claims to be both client and server side only!");
|
||||
|
||||
Reference in new issue
Block a user