diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2018-05-24 16:03:42 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2018-05-24 16:03:42 -0400 |
| commit | 9a4d1e95ea7784f0f98ea2913701a3a3c28aefaa (patch) | |
| tree | b4307f58fe2197d2215707bb3f44cf8952229c6d /src/main/java/darkknight/jewelrycraft/thirdparty/ThirdPartyManager.java | |
| parent | 4f7ad220df0438b6f3382110577b53f29da46453 (diff) | |
Formatting pass
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/thirdparty/ThirdPartyManager.java')
| -rwxr-xr-x | src/main/java/darkknight/jewelrycraft/thirdparty/ThirdPartyManager.java | 45 |
1 files changed, 27 insertions, 18 deletions
diff --git a/src/main/java/darkknight/jewelrycraft/thirdparty/ThirdPartyManager.java b/src/main/java/darkknight/jewelrycraft/thirdparty/ThirdPartyManager.java index 612d23d..bb819d5 100755 --- a/src/main/java/darkknight/jewelrycraft/thirdparty/ThirdPartyManager.java +++ b/src/main/java/darkknight/jewelrycraft/thirdparty/ThirdPartyManager.java @@ -21,18 +21,15 @@ import net.minecraft.world.World; */
public class ThirdPartyManager implements IGuiHandler {
- private static ThirdPartyManager INSTANCE =
- new ThirdPartyManager();
- private final List<IThirdParty> thirdPartyMods =
- new ArrayList<>();
+ private static ThirdPartyManager INSTANCE = new ThirdPartyManager();
+ private final List<IThirdParty> thirdPartyMods = new ArrayList<>();
public static ThirdPartyManager instance() {
return INSTANCE;
}
public void index() {
- Map<String, Class<? extends IThirdParty>> thirdPartyClasses =
- new HashMap<>();
+ Map<String, Class<? extends IThirdParty>> thirdPartyClasses = new HashMap<>();
thirdPartyClasses.put(ModIds.EE3, EE3.class);
thirdPartyClasses.put(ModIds.NEI, NEI.class);
@@ -46,7 +43,8 @@ public class ThirdPartyManager implements IGuiHandler { for (String modid : thirdPartyClasses.keySet()) {
if (ConfigHandler.config
- .get("Third_Party_Enabling", modid, true)
+ .get("Third_Party_Enabling", modid,
+ true)
.getBoolean()) {
enabledThirdParty.add(modid);
}
@@ -54,15 +52,17 @@ public class ThirdPartyManager implements IGuiHandler { ConfigHandler.config.save();
- for (Map.Entry<String,
- Class<? extends IThirdParty>> entry : thirdPartyClasses
- .entrySet()) {
+ for (Map.Entry<String, Class<? extends IThirdParty>> entry : thirdPartyClasses
+ .entrySet()) {
if (enabledThirdParty.contains(entry.getKey())
- && Loader.isModLoaded(entry.getKey())) {
+ && Loader.isModLoaded(
+ entry.getKey())) {
try {
- thirdPartyMods.add(entry.getValue().newInstance());
+ thirdPartyMods.add(entry.getValue()
+ .newInstance());
} catch (Exception e) {
- JewelrycraftMod.logger.log(Level.ERROR,
+ JewelrycraftMod.logger.log(
+ Level.ERROR,
"Failed to instantiate third party handler!");
e.printStackTrace();
}
@@ -73,14 +73,16 @@ public class ThirdPartyManager implements IGuiHandler { public void onItemRegistry(Item item) {
for (IThirdParty thirdParty : thirdPartyMods) {
if (thirdParty instanceof IRegistryListener)
- ((IRegistryListener) thirdParty).onItemRegistry(item);
+ ((IRegistryListener) thirdParty)
+ .onItemRegistry(item);
}
}
public void onBlockRegistry(Block block) {
for (IThirdParty thirdParty : thirdPartyMods) {
if (thirdParty instanceof IRegistryListener)
- ((IRegistryListener) thirdParty).onBlockRegistry(block);
+ ((IRegistryListener) thirdParty)
+ .onBlockRegistry(block);
}
}
@@ -133,7 +135,8 @@ public class ThirdPartyManager implements IGuiHandler { } catch (Throwable e) {
JewelrycraftMod.logger.log(Level.ERROR,
"Jewelrycraft wasn't able to load third party content from the third party class "
- + thirdParty.getClass() + " client side!");
+ + thirdParty.getClass()
+ + " client side!");
e.printStackTrace();
}
}
@@ -159,7 +162,10 @@ public class ThirdPartyManager implements IGuiHandler { for (IThirdParty thirdParty : thirdPartyMods) {
if (thirdParty instanceof IGuiHandler) {
Object obj = ((IGuiHandler) thirdParty)
- .getServerGuiElement(ID, player, world, x, y, z);
+ .getServerGuiElement(ID,
+ player,
+ world, x,
+ y, z);
if (obj != null)
return obj;
}
@@ -173,7 +179,10 @@ public class ThirdPartyManager implements IGuiHandler { for (IThirdParty thirdParty : thirdPartyMods) {
if (thirdParty instanceof IGuiHandler) {
Object obj = ((IGuiHandler) thirdParty)
- .getClientGuiElement(ID, player, world, x, y, z);
+ .getClientGuiElement(ID,
+ player,
+ world, x,
+ y, z);
if (obj != null)
return obj;
}
|
