From c757f51069baa3d07a4b8e417ff1936cf191cdbf Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Wed, 25 Mar 2015 22:31:37 -0400 Subject: [PATCH] Turns out Gson allows comments, who knew? --- .../assets/enderio/config/PoweredSpawnerConfig_Core.json | 2 +- .../assets/enderio/config/PoweredSpawnerConfig_User.json | 6 +++--- .../enderio/machine/spawner/PoweredSpawnerConfig.java | 2 +- src/main/java/crazypants/gui/GuiContainerBase.java | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/assets/enderio/config/PoweredSpawnerConfig_Core.json b/resources/assets/enderio/config/PoweredSpawnerConfig_Core.json index e24347aa..0f8a22e5 100644 --- a/resources/assets/enderio/config/PoweredSpawnerConfig_Core.json +++ b/resources/assets/enderio/config/PoweredSpawnerConfig_Core.json @@ -1,6 +1,6 @@ { - "_comment": "This is the CORE FILE. Do not edit. The RF cost per tick for spawners of each entity type is multiplied by these values:", + // This is the CORE FILE. Do not edit. The RF cost per tick for spawners of each entity type is multiplied by these values "costMultiplier": { "Zombie" : "1", diff --git a/resources/assets/enderio/config/PoweredSpawnerConfig_User.json b/resources/assets/enderio/config/PoweredSpawnerConfig_User.json index 79a81681..5430aa05 100644 --- a/resources/assets/enderio/config/PoweredSpawnerConfig_User.json +++ b/resources/assets/enderio/config/PoweredSpawnerConfig_User.json @@ -1,9 +1,9 @@ { - "_comment": "New entities are added, one already in _Core will have their values replaced with those in this file", + // New entities are added, one already in _Core will have their values replaced with those in this file "costMultiplier": { - }, + } - "_comment": "Adding a blackList section will complete replace the one in the core file. Make sure you add a comma at the end of this line if adding a blacklist" + // Adding a blackList section will completely replace the one in the core file. } \ No newline at end of file diff --git a/src/main/java/crazypants/enderio/machine/spawner/PoweredSpawnerConfig.java b/src/main/java/crazypants/enderio/machine/spawner/PoweredSpawnerConfig.java index 216e7a15..743322ef 100644 --- a/src/main/java/crazypants/enderio/machine/spawner/PoweredSpawnerConfig.java +++ b/src/main/java/crazypants/enderio/machine/spawner/PoweredSpawnerConfig.java @@ -92,7 +92,7 @@ public class PoweredSpawnerConfig { } blkList = rootObj.getAsJsonArray("blackList"); - if(blkList != null) { + if(blkList != null && blkList.size() > 0) { blackList.clear(); Log.info("Replacing default Powered Spawner blacklist with user supplied values."); for (int i = 0; i < blkList.size(); i++) { diff --git a/src/main/java/crazypants/gui/GuiContainerBase.java b/src/main/java/crazypants/gui/GuiContainerBase.java index 98f34845..ae49497e 100644 --- a/src/main/java/crazypants/gui/GuiContainerBase.java +++ b/src/main/java/crazypants/gui/GuiContainerBase.java @@ -226,7 +226,7 @@ public abstract class GuiContainerBase extends GuiContainer implements ToolTipRe } // copied from super with hate - private void drawItemStack(ItemStack stack, int mouseX, int mouseY, String str) + protected void drawItemStack(ItemStack stack, int mouseX, int mouseY, String str) { GL11.glTranslatef(0.0F, 0.0F, 32.0F); this.zLevel = 200.0F;