From 2b0ee849526e1a132d691407f08ef34a70e59ed5 Mon Sep 17 00:00:00 2001 From: sk89q Date: Fri, 4 Apr 2014 14:26:08 -0700 Subject: [PATCH] Code convention cleanup of right braces. --- src/main/java/com/sk89q/jnbt/NBTUtils.java | 6 +-- .../com/sk89q/worldedit/blocks/BlockType.java | 3 +- .../worldedit/blocks/MobSpawnerBlock.java | 37 ++++++++++--------- 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/sk89q/jnbt/NBTUtils.java b/src/main/java/com/sk89q/jnbt/NBTUtils.java index da1a944c4..cffed76a1 100644 --- a/src/main/java/com/sk89q/jnbt/NBTUtils.java +++ b/src/main/java/com/sk89q/jnbt/NBTUtils.java @@ -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 getChildTag(Map items, String key, - Class expected) throws InvalidFormatException { + Class expected) throws InvalidFormatException { if (!items.containsKey(key)) { throw new InvalidFormatException("Missing a \"" + key + "\" tag"); } diff --git a/src/main/java/com/sk89q/worldedit/blocks/BlockType.java b/src/main/java/com/sk89q/worldedit/blocks/BlockType.java index 10bc6c206..e0d373bde 100644 --- a/src/main/java/com/sk89q/worldedit/blocks/BlockType.java +++ b/src/main/java/com/sk89q/worldedit/blocks/BlockType.java @@ -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); diff --git a/src/main/java/com/sk89q/worldedit/blocks/MobSpawnerBlock.java b/src/main/java/com/sk89q/worldedit/blocks/MobSpawnerBlock.java index 590c71d1b..bdad892bb 100644 --- a/src/main/java/com/sk89q/worldedit/blocks/MobSpawnerBlock.java +++ b/src/main/java/com/sk89q/worldedit/blocks/MobSpawnerBlock.java @@ -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();