This commit is contained in:
asiekierka 2014-11-02 20:04:20 +01:00
parent 4ea4bb9eae
commit 50a36b3aa9

View file

@ -53,23 +53,27 @@ public final class HeuristicBlockDetection {
for (int meta = 0; meta < 16; meta++) { for (int meta = 0; meta < 16; meta++) {
if (!SchematicRegistry.INSTANCE.isSupported(block, meta)) { if (!SchematicRegistry.INSTANCE.isSupported(block, meta)) {
if (block.hasTileEntity(meta)) {
// All tiles are registered as creative only.
// This is helpful for example for server admins.
SchematicRegistry.INSTANCE.registerSchematicBlock(block, meta, SchematicTileCreative.class);
continue;
}
boolean creativeOnly = false;
try { try {
if (creativeOnly) { if (block.hasTileEntity(meta)) {
SchematicRegistry.INSTANCE.registerSchematicBlock(block, meta, SchematicBlockCreative.class); // All tiles are registered as creative only.
} else { // This is helpful for example for server admins.
SchematicRegistry.INSTANCE.registerSchematicBlock(block, meta, SchematicBlock.class); SchematicRegistry.INSTANCE.registerSchematicBlock(block, meta, SchematicTileCreative.class);
continue;
}
boolean creativeOnly = false;
try {
if (creativeOnly) {
SchematicRegistry.INSTANCE.registerSchematicBlock(block, meta, SchematicBlockCreative.class);
} else {
SchematicRegistry.INSTANCE.registerSchematicBlock(block, meta, SchematicBlock.class);
}
} catch (Exception e) {
e.printStackTrace();
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace();
} }
} }
} }