11package com .zixiken .dimdoors .shared ;
22
33import com .zixiken .dimdoors .shared .pockets .PocketTemplate ;
4- import com . zixiken . dimdoors . shared . util .MathUtils ;
5- import com . zixiken . dimdoors . shared . util .Schematic ;
4+ import ddutils . math .MathUtils ;
5+ import ddutils . schem .Schematic ;
66import com .google .gson .JsonArray ;
77import com .google .gson .JsonElement ;
88import com .google .gson .JsonObject ;
2222import java .util .logging .Level ;
2323import java .util .logging .Logger ;
2424
25- import com .zixiken .dimdoors .shared .util .SchematicConverter ;
25+ import com .zixiken .dimdoors .shared .tools .SchematicConverter ;
2626import net .minecraft .nbt .NBTTagCompound ;
2727import net .minecraft .nbt .CompressedStreamTools ;
2828import org .apache .commons .io .IOUtils ;
2929
3030/**
31- *
3231 * @author Robijnvogel
3332 */
3433public class SchematicHandler { // TODO: make this more general (not dimdoors-related)
@@ -134,7 +133,7 @@ private static List<PocketTemplate> loadTemplatesFromJson(String jsonString) {
134133 try {
135134 schematicNBT = CompressedStreamTools .readCompressed (schematicDataStream );
136135 if (!schematicNBT .hasKey ("Version" )) {
137- schematic = SchematicConverter .loadOldDimDoorSchematicFromNBT (schematicNBT , template .getName ());
136+ schematic = SchematicConverter .convertSchematic (schematicNBT , template .getName ());
138137 } else {
139138 schematic = Schematic .loadFromNBT (schematicNBT , template .getName ());
140139 }
@@ -151,7 +150,7 @@ private static List<PocketTemplate> loadTemplatesFromJson(String jsonString) {
151150 }
152151
153152 if (schematic != null
154- && (schematic .getWidth () > (template .getSize () + 1 ) * 16 || schematic .getLength () > (template .getSize () + 1 ) * 16 )) {
153+ && (schematic .width > (template .getSize () + 1 ) * 16 || schematic .length > (template .getSize () + 1 ) * 16 )) {
155154 schematic = null ;
156155 DimDoors .log .warn ("Schematic " + template .getName () + " was bigger than specified in its json file and therefore wasn't loaded" );
157156 }
@@ -235,7 +234,6 @@ public PocketTemplate getTemplate(String group, String name) {
235234 return templates .get (index );
236235 }
237236
238-
239237 /**
240238 * Gets a random template matching certain criteria.
241239 *
0 commit comments