Code convention cleanup of right braces.

Dieser Commit ist enthalten in:
sk89q 2014-04-04 14:26:08 -07:00
Ursprung 60f0c06971
Commit 2b0ee84952
3 geänderte Dateien mit 24 neuen und 22 gelöschten Zeilen

Datei anzeigen

@ -1,9 +1,9 @@
package com.sk89q.jnbt;
import java.util.Map;
import com.sk89q.worldedit.world.storage.InvalidFormatException;
import java.util.Map;
/*
* JNBT License
*
@ -181,7 +181,7 @@ public final class NBTUtils {
* @throws InvalidFormatException
*/
public static <T extends Tag> T getChildTag(Map<String,Tag> items, String key,
Class<T> expected) throws InvalidFormatException {
Class<T> expected) throws InvalidFormatException {
if (!items.containsKey(key)) {
throw new InvalidFormatException("Missing a \"" + key + "\" tag");
}

Datei anzeigen

@ -576,8 +576,7 @@ public enum BlockType {
for (int data = 0; data < 16; ++data) {
if ((data & 4) != 0) {
centralTopLimit.put(-16*BlockID.END_PORTAL_FRAME-data, 1.0);
}
else {
} else {
centralTopLimit.put(-16*BlockID.END_PORTAL_FRAME-data, 0.8125);
}
centralTopLimit.put(-16*BlockID.HEAD-data, 0.75);

Datei anzeigen

@ -19,19 +19,14 @@
package com.sk89q.worldedit.blocks;
import java.util.HashMap;
import java.util.Map;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.jnbt.ListTag;
import com.sk89q.jnbt.NBTUtils;
import com.sk89q.jnbt.ShortTag;
import com.sk89q.jnbt.StringTag;
import com.sk89q.jnbt.Tag;
import com.sk89q.jnbt.*;
import com.sk89q.worldedit.MobType;
import com.sk89q.worldedit.world.DataException;
import com.sk89q.worldedit.world.storage.InvalidFormatException;
import java.util.HashMap;
import java.util.Map;
/**
* A mob spawner block.
*
@ -186,28 +181,36 @@ public class MobSpawnerBlock extends BaseBlock implements TileEntityBlock {
CompoundTag spawnDataTag = null;
try {
spawnCountTag = NBTUtils.getChildTag(values, "SpawnCount", ShortTag.class);
} catch (InvalidFormatException e) {};
} catch (InvalidFormatException ignored) {
}
try {
spawnRangeTag = NBTUtils.getChildTag(values, "SpawnRange", ShortTag.class);
} catch (InvalidFormatException e) {};
} catch (InvalidFormatException ignored) {
}
try {
minSpawnDelayTag = NBTUtils.getChildTag(values, "MinSpawnDelay", ShortTag.class);
} catch (InvalidFormatException e) {};
} catch (InvalidFormatException ignored) {
}
try {
maxSpawnDelayTag = NBTUtils.getChildTag(values, "MaxSpawnDelay", ShortTag.class);
} catch (InvalidFormatException e) {};
} catch (InvalidFormatException ignored) {
}
try {
maxNearbyEntitiesTag = NBTUtils.getChildTag(values, "MaxNearbyEntities", ShortTag.class);
} catch (InvalidFormatException e) {};
} catch (InvalidFormatException ignored) {
}
try {
requiredPlayerRangeTag = NBTUtils.getChildTag(values, "RequiredPlayerRange", ShortTag.class);
} catch (InvalidFormatException e) {};
} catch (InvalidFormatException ignored) {
}
try {
spawnPotentialsTag = NBTUtils.getChildTag(values, "SpawnPotentials", ListTag.class);
} catch (InvalidFormatException e) {};
} catch (InvalidFormatException ignored) {
}
try {
spawnDataTag = NBTUtils.getChildTag(values, "SpawnData", CompoundTag.class);
} catch (InvalidFormatException e) {};
} catch (InvalidFormatException ignored) {
}
if (spawnCountTag != null) {
this.spawnCount = spawnCountTag.getValue();