More Kotlin

This commit is contained in:
MattBDev
2020-01-21 14:30:13 -05:00
parent 0cad7f229b
commit 88359f0215
82 changed files with 867 additions and 1343 deletions

View File

@ -268,7 +268,7 @@ public class FastSchematicReader extends NBTSchematicReader {
// tiles
if (tiles != null && !tiles.isEmpty()) {
for (Map<String, Object> tileRaw : tiles) {
CompoundTag tile = FaweCache.IMP.asTag(tileRaw);
CompoundTag tile = FaweCache.INSTANCE.asTag(tileRaw);
int[] pos = tile.getIntArray("Pos");
int x,y,z;
@ -303,7 +303,7 @@ public class FastSchematicReader extends NBTSchematicReader {
// entities
if (entities != null && !entities.isEmpty()) {
for (Map<String, Object> entRaw : entities) {
CompoundTag ent = FaweCache.IMP.asTag(entRaw);
CompoundTag ent = FaweCache.INSTANCE.asTag(entRaw);
Map<String, Tag> value = ent.getValue();
StringTag id = (StringTag) value.get("Id");
@ -340,4 +340,4 @@ public class FastSchematicReader extends NBTSchematicReader {
public void close() throws IOException {
inputStream.close();
}
}
}

View File

@ -322,7 +322,7 @@ public class SchematicReader implements ClipboardReader {
if (tiles != null && !tiles.isEmpty()) {
outer:
for (Map<String, Object> tileRaw : tiles) {
CompoundTag tile = FaweCache.IMP.asTag(tileRaw);
CompoundTag tile = FaweCache.INSTANCE.asTag(tileRaw);
int x = (int) tileRaw.get("x");
int y = (int) tileRaw.get("y");
int z = (int) tileRaw.get("z");
@ -350,7 +350,7 @@ public class SchematicReader implements ClipboardReader {
entRaw.put("Id", id);
EntityType type = EntityTypes.parse(id);
if (type != null) {
CompoundTag ent = FaweCache.IMP.asTag(entRaw);
CompoundTag ent = FaweCache.INSTANCE.asTag(entRaw);
for (EntityNBTCompatibilityHandler compat : ENTITY_COMPATIBILITY_HANDLERS) {
if (compat.isAffectedEntity(type, ent)) {
ent = compat.updateNBT(type, ent);