3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-26 11:00:04 +01:00

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

Datei anzeigen

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

Datei anzeigen

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