use of buildcraft.api.blueprints.SchematicEntity in project BuildCraft by BuildCraft.
the class SchematicRegistry method createSchematicEntity.
public SchematicEntity createSchematicEntity(Class<? extends Entity> entityClass) {
if (!schematicEntities.containsKey(entityClass)) {
return null;
}
try {
SchematicConstructor c = schematicEntities.get(entityClass);
SchematicEntity s = (SchematicEntity) c.newInstance();
s.entity = entityClass;
return s;
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (InstantiationException e) {
e.printStackTrace();
}
return null;
}
Aggregations