aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/plugin/villagers/tile/TileEntityGenericSpawner.java
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2018-07-01 20:08:50 +1000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2018-07-01 20:08:50 +1000
commitfe15444a942c8d2b7740246c4fdb83d3f772950e (patch)
tree1ab28d8bc7e75ecc4513599e17de7fd0bf624db6 /src/Java/gtPlusPlus/plugin/villagers/tile/TileEntityGenericSpawner.java
parent35a555fff44b6b3f0d9bb007481edeed3bc09c4e (diff)
downloadGT5-Unofficial-fe15444a942c8d2b7740246c4fdb83d3f772950e.tar.gz
GT5-Unofficial-fe15444a942c8d2b7740246c4fdb83d3f772950e.tar.bz2
GT5-Unofficial-fe15444a942c8d2b7740246c4fdb83d3f772950e.zip
+ Added lang file updates.
% More work on Spawners. % More work on Villagers.
Diffstat (limited to 'src/Java/gtPlusPlus/plugin/villagers/tile/TileEntityGenericSpawner.java')
-rw-r--r--src/Java/gtPlusPlus/plugin/villagers/tile/TileEntityGenericSpawner.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Java/gtPlusPlus/plugin/villagers/tile/TileEntityGenericSpawner.java b/src/Java/gtPlusPlus/plugin/villagers/tile/TileEntityGenericSpawner.java
index 53c0c78a23..232b6b6e87 100644
--- a/src/Java/gtPlusPlus/plugin/villagers/tile/TileEntityGenericSpawner.java
+++ b/src/Java/gtPlusPlus/plugin/villagers/tile/TileEntityGenericSpawner.java
@@ -39,7 +39,9 @@ public class TileEntityGenericSpawner extends TileEntityMobSpawner {
public static boolean registerNewMobSpawner(int aID, Class<Entity> aEntity) {
int registered = mSpawners.size();
Logger.INFO("Currently "+registered+" spawners are registered.");
- mSpawners.put(aID, aEntity);
+ if (!mSpawners.containsKey(aID) && !mSpawners.containsValue(aEntity)) {
+ mSpawners.put(aID, aEntity);
+ }
return mSpawners.size() > registered;
}
@@ -135,7 +137,7 @@ public class TileEntityGenericSpawner extends TileEntityMobSpawner {
Logger.INFO("Found Translation for "+((Class) nameToClassMap_Ex.get(g)).getName()+": "+g);
}
}
-
+
//throw new RuntimeException(this.getClass() + " is missing a mapping! This is a bug!");
s = mSpawners.containsKey(this.mID) ? mSpawners.get(this.mID).getSimpleName() : "bad.class.name";
p_145841_1_.setString("id", s);