mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-12 10:48:34 +00:00
More Kotlin
This commit is contained in:
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user