Error messages should not be generic...
This commit is contained in:
parent
02839ee47a
commit
f54666cfb3
1 changed files with 4 additions and 4 deletions
|
@ -84,7 +84,7 @@ public final class SchematicRegistry implements ISchematicRegistry {
|
||||||
}
|
}
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
throw new IllegalArgumentException("Could not find matching constructor for class " + clazz);
|
throw new IllegalArgumentException("Builder: Could not find matching constructor for class " + clazz);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,11 +96,11 @@ public final class SchematicRegistry implements ISchematicRegistry {
|
||||||
|
|
||||||
public void registerSchematicBlock(Block block, int meta, Class<? extends Schematic> clazz, Object... params) {
|
public void registerSchematicBlock(Block block, int meta, Class<? extends Schematic> clazz, Object... params) {
|
||||||
if (block == null || Block.blockRegistry.getNameForObject(block) == null || "null".equals(Block.blockRegistry.getNameForObject(block))) {
|
if (block == null || Block.blockRegistry.getNameForObject(block) == null || "null".equals(Block.blockRegistry.getNameForObject(block))) {
|
||||||
BCLog.logger.warn("Mod tried to register block with null name! Ignoring.");
|
BCLog.logger.warn("Builder: Mod tried to register block schematic with a null name! Ignoring.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (schematicBlocks.containsKey(toStringKey(block, meta))) {
|
if (schematicBlocks.containsKey(toStringKey(block, meta))) {
|
||||||
throw new RuntimeException("Block " + Block.blockRegistry.getNameForObject(block) + " is already associated with a schematic.");
|
throw new RuntimeException("Builder: Block " + Block.blockRegistry.getNameForObject(block) + " is already associated with a schematic.");
|
||||||
}
|
}
|
||||||
|
|
||||||
schematicBlocks.put(toStringKey(block, meta), new SchematicConstructor(clazz, params));
|
schematicBlocks.put(toStringKey(block, meta), new SchematicConstructor(clazz, params));
|
||||||
|
@ -110,7 +110,7 @@ public final class SchematicRegistry implements ISchematicRegistry {
|
||||||
Class<? extends Entity> entityClass,
|
Class<? extends Entity> entityClass,
|
||||||
Class<? extends SchematicEntity> schematicClass, Object... params) {
|
Class<? extends SchematicEntity> schematicClass, Object... params) {
|
||||||
if (schematicEntities.containsKey(entityClass)) {
|
if (schematicEntities.containsKey(entityClass)) {
|
||||||
throw new RuntimeException("Entity " + entityClass.getName() + " is already associated with a schematic.");
|
throw new RuntimeException("Builder: Entity " + entityClass.getName() + " is already associated with a schematic.");
|
||||||
}
|
}
|
||||||
schematicEntities.put(entityClass, new SchematicConstructor(schematicClass, params));
|
schematicEntities.put(entityClass, new SchematicConstructor(schematicClass, params));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue