aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap')
-rw-r--r--src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/FishTrapHandler.java68
-rw-r--r--src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_New.java18
-rw-r--r--src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_Old.java18
3 files changed, 40 insertions, 64 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/FishTrapHandler.java b/src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/FishTrapHandler.java
index 2a86b80d00..e7abde5646 100644
--- a/src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/FishTrapHandler.java
+++ b/src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/FishTrapHandler.java
@@ -1,5 +1,10 @@
package gtPlusPlus.xmod.growthcraft.fishtrap;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import net.minecraft.item.ItemStack;
+
import gregtech.api.enums.GT_Values;
import gregtech.api.util.GT_ModHandler;
import gtPlusPlus.api.objects.Logger;
@@ -8,13 +13,10 @@ import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.util.minecraft.FluidUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import net.minecraft.item.ItemStack;
public class FishTrapHandler {
- private static final String[] fishTypes = {"fish", "junk", "treasure"};
+ private static final String[] fishTypes = { "fish", "junk", "treasure" };
private static Object mFishingRegistry;
private static Growthcraft_Old mHandler;
@@ -35,12 +37,8 @@ public class FishTrapHandler {
if (mFishingRegistry != null) {
return mFishingRegistry;
}
- } catch (NoSuchMethodException
- | SecurityException
- | IllegalAccessException
- | IllegalArgumentException
- | InvocationTargetException e) {
- }
+ } catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException
+ | InvocationTargetException e) {}
return null;
}
@@ -70,38 +68,29 @@ public class FishTrapHandler {
return;
}
} /*
- else if (LoadedMods.getModVersion("Growthcraft").contains("2.7.2")){
- if (lootType.equals(fishTypes[0])){
- Growthcraft_New.addTrapFish(lootStack, lootChance);
- Utils.LOG_INFO("Added "+lootStack.getDisplayName()+" as an extra Fish for Growthcraft Fishtraps.");
- }
- else if (lootType.equals(fishTypes[1])){
- Growthcraft_New.addTrapJunk(lootStack, lootChance);
- Utils.LOG_INFO("Added "+lootStack.getDisplayName()+" as extra Junk for Growthcraft Fishtraps.");
- }
- else if (lootType.equals(fishTypes[2])){
- Growthcraft_New.addTrapTreasure(lootStack, lootChance);
- Utils.LOG_INFO("Added "+lootStack.getDisplayName()+" as extra Treasure for Growthcraft Fishtraps.");
- }
- else {
- return;
- }
- }*/ else {
- Logger.INFO("Extra Fish loot for Growthcraft Fishtraps disabled. Found V."
- + LoadedMods.getModVersion("Growthcraft"));
+ * else if (LoadedMods.getModVersion("Growthcraft").contains("2.7.2")){ if (lootType.equals(fishTypes[0])){
+ * Growthcraft_New.addTrapFish(lootStack, lootChance);
+ * Utils.LOG_INFO("Added "+lootStack.getDisplayName()+" as an extra Fish for Growthcraft Fishtraps."); } else
+ * if (lootType.equals(fishTypes[1])){ Growthcraft_New.addTrapJunk(lootStack, lootChance);
+ * Utils.LOG_INFO("Added "+lootStack.getDisplayName()+" as extra Junk for Growthcraft Fishtraps."); } else if
+ * (lootType.equals(fishTypes[2])){ Growthcraft_New.addTrapTreasure(lootStack, lootChance);
+ * Utils.LOG_INFO("Added "+lootStack.getDisplayName()+" as extra Treasure for Growthcraft Fishtraps."); } else
+ * { return; } }
+ */ else {
+ Logger.INFO(
+ "Extra Fish loot for Growthcraft Fishtraps disabled. Found V."
+ + LoadedMods.getModVersion("Growthcraft"));
}
}
+
// FishTrapHandler.pamsHarvestCraftCompat();
static final String prefix = "food";
static final String suffix = "raw";
static final String seaweed = "cropSeaweed";
static final String greenheartFish = "foodGreenheartfish";
- private static final String[] harvestcraftFish = {
- "Anchovy", "Bass", "Calamari", "Carp", "Catfish", "Charr", "Clam", "Crab", "Crayfish", "Eel", "Frog", "Grouper",
- "Herring",
- "Jellyfish", "Mudfish", "Octopus", "Perch", "Scallop", "Shrimp", "Snail", "Snapper", "Tilapia", "Trout", "Tuna",
- "Turtle", "Walley"
- };
+ private static final String[] harvestcraftFish = { "Anchovy", "Bass", "Calamari", "Carp", "Catfish", "Charr",
+ "Clam", "Crab", "Crayfish", "Eel", "Frog", "Grouper", "Herring", "Jellyfish", "Mudfish", "Octopus", "Perch",
+ "Scallop", "Shrimp", "Snail", "Snapper", "Tilapia", "Trout", "Tuna", "Turtle", "Walley" };
public static void pamsHarvestCraftCompat() {
for (int i = 0; i < harvestcraftFish.length; i++) {
@@ -217,11 +206,10 @@ public class FishTrapHandler {
if (CORE.GTNH) {
CORE.RA.addFluidExtractionRecipe(input, FluidUtils.getFluidStack("fishoil", 50), 16, 4);
} else {
- CORE.RA.addFluidExtractionRecipe(
- input,
- FluidUtils.getFluidStack("fishoil", 4),
- 16,
- 4); // 4eu/t total eu used = 64 so time = 64/4
+ CORE.RA.addFluidExtractionRecipe(input, FluidUtils.getFluidStack("fishoil", 4), 16, 4); // 4eu/t total
+ // eu used = 64
+ // so time =
+ // 64/4
}
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_New.java b/src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_New.java
index dd8e6debc7..bd1481f6b3 100644
--- a/src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_New.java
+++ b/src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_New.java
@@ -3,6 +3,7 @@ package gtPlusPlus.xmod.growthcraft.fishtrap;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+
import net.minecraft.item.ItemStack;
public class Growthcraft_New {
@@ -18,8 +19,8 @@ public class Growthcraft_New {
void setFishTrapRegistry() {
try {
- Class<?> FishTrapRegistryClass =
- Class.forName("gtPlusPlus.xmod.growthcraft.fishtrap.FishTrapHandler.mFishingRegistry");
+ Class<?> FishTrapRegistryClass = Class
+ .forName("gtPlusPlus.xmod.growthcraft.fishtrap.FishTrapHandler.mFishingRegistry");
Class<?> FishTrapEntry = Class.forName("growthcraft.api.fishtrap.FishTrapEntry");
if (FishTrapRegistryClass.isInstance(FishTrapHandler.getFishingRegistry())) {
addTrapJunk = FishTrapRegistryClass.getDeclaredMethod("addTrapJunk", FishTrapEntry);
@@ -44,14 +45,8 @@ public class Growthcraft_New {
return x;
}
}
- } catch (ClassNotFoundException
- | NoSuchMethodException
- | SecurityException
- | InstantiationException
- | IllegalAccessException
- | IllegalArgumentException
- | InvocationTargetException e) {
- }
+ } catch (ClassNotFoundException | NoSuchMethodException | SecurityException | InstantiationException
+ | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {}
return null;
}
@@ -61,8 +56,7 @@ public class Growthcraft_New {
Object I = createFishTrapEntry(o, p);
m.invoke(FishTrapRegistryO, I);
return true;
- } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
- }
+ } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {}
return false;
}
diff --git a/src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_Old.java b/src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_Old.java
index 76a025667b..0d1fd8e7dd 100644
--- a/src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_Old.java
+++ b/src/main/java/gtPlusPlus/xmod/growthcraft/fishtrap/Growthcraft_Old.java
@@ -3,6 +3,7 @@ package gtPlusPlus.xmod.growthcraft.fishtrap;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+
import net.minecraft.item.ItemStack;
public class Growthcraft_Old {
@@ -18,8 +19,8 @@ public class Growthcraft_Old {
void setFishTrapRegistry() {
try {
- Class<?> FishTrapRegistryClass =
- Class.forName("gtPlusPlus.xmod.growthcraft.fishtrap.FishTrapHandler.mFishingRegistry");
+ Class<?> FishTrapRegistryClass = Class
+ .forName("gtPlusPlus.xmod.growthcraft.fishtrap.FishTrapHandler.mFishingRegistry");
Class<?> FishTrapEntry = Class.forName("growthcraft.api.fishtrap.FishTrapEntry");
if (FishTrapRegistryClass.isInstance(FishTrapHandler.getFishingRegistry())) {
addTrapJunk = FishTrapRegistryClass.getDeclaredMethod("addTrapJunk", FishTrapEntry);
@@ -44,14 +45,8 @@ public class Growthcraft_Old {
return x;
}
}
- } catch (ClassNotFoundException
- | NoSuchMethodException
- | SecurityException
- | InstantiationException
- | IllegalAccessException
- | IllegalArgumentException
- | InvocationTargetException e) {
- }
+ } catch (ClassNotFoundException | NoSuchMethodException | SecurityException | InstantiationException
+ | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {}
return null;
}
@@ -61,8 +56,7 @@ public class Growthcraft_Old {
Object I = createFishTrapEntry(o, p);
m.invoke(FishTrapRegistryO, I);
return true;
- } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
- }
+ } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {}
return false;
}