From 8dce8c1c268d0d9fb058bece9ffcec356e754538 Mon Sep 17 00:00:00 2001 From: SenseiKiwi Date: Sun, 16 Jun 2013 12:06:21 -0400 Subject: [PATCH] Renamed all singleton create() to initialize() Renamed the create() function of DDProperties and DungeonHelper to initialize(). Why? Because it was bugging me. <.< That is all. --- StevenDimDoors/mod_pocketDim/DDProperties.java | 6 +++--- StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java | 6 +++--- StevenDimDoors/mod_pocketDim/mod_pocketDim.java | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/StevenDimDoors/mod_pocketDim/DDProperties.java b/StevenDimDoors/mod_pocketDim/DDProperties.java index b895c10..dcb364a 100644 --- a/StevenDimDoors/mod_pocketDim/DDProperties.java +++ b/StevenDimDoors/mod_pocketDim/DDProperties.java @@ -225,12 +225,12 @@ public class DDProperties config.save(); } - public static DDProperties create(File configFile) + public static DDProperties initialize(File configFile) { if (instance == null) instance = new DDProperties(configFile); else - throw new IllegalStateException("Cannot create DDProperties twice"); + throw new IllegalStateException("Cannot initialize DDProperties twice"); return instance; } @@ -241,7 +241,7 @@ public class DDProperties { //This is to prevent some frustrating bugs that could arise when classes //are loaded in the wrong order. Trust me, I had to squash a few... - throw new IllegalStateException("Instance of DDProperties requested before properties have been loaded"); + throw new IllegalStateException("Instance of DDProperties requested before initialization"); } return instance; } diff --git a/StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java b/StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java index 2ca027d..4e08bdb 100644 --- a/StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java +++ b/StevenDimDoors/mod_pocketDim/helpers/DungeonHelper.java @@ -115,7 +115,7 @@ public class DungeonHelper registerBaseDungeons(); } - public static DungeonHelper create() + public static DungeonHelper initialize() { if (instance == null) { @@ -123,7 +123,7 @@ public class DungeonHelper } else { - throw new IllegalStateException("Cannot create DungeonHelper twice"); + throw new IllegalStateException("Cannot initialize DungeonHelper twice"); } return instance; @@ -135,7 +135,7 @@ public class DungeonHelper { //This is to prevent some frustrating bugs that could arise when classes //are loaded in the wrong order. Trust me, I had to squash a few... - throw new IllegalStateException("Instance of DungeonHelper requested before creation"); + throw new IllegalStateException("Instance of DungeonHelper requested before initialization"); } return instance; } diff --git a/StevenDimDoors/mod_pocketDim/mod_pocketDim.java b/StevenDimDoors/mod_pocketDim/mod_pocketDim.java index dab5560..740fbf1 100644 --- a/StevenDimDoors/mod_pocketDim/mod_pocketDim.java +++ b/StevenDimDoors/mod_pocketDim/mod_pocketDim.java @@ -145,7 +145,7 @@ public class mod_pocketDim public void PreInit(FMLPreInitializationEvent event) { //This should be the FIRST thing that gets done. - properties = DDProperties.create(event.getSuggestedConfigurationFile()); + properties = DDProperties.initialize(event.getSuggestedConfigurationFile()); //Now do other stuff MinecraftForge.EVENT_BUS.register(new EventHookContainer()); @@ -373,7 +373,7 @@ public class mod_pocketDim mod_pocketDim.blocksImmuneToRift.add(Block.blockLapis.blockID); mod_pocketDim.blocksImmuneToRift.add(Block.bedrock.blockID); - DungeonHelper.create(); + DungeonHelper.initialize(); proxy.loadTextures(); proxy.registerRenderers();