aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorMartin Robertz <dream-master@gmx.net>2019-04-11 12:00:39 +0200
committerGitHub <noreply@github.com>2019-04-11 12:00:39 +0200
commitf0c353ee28ea8cf082f9f184a94dfd4350ab488a (patch)
tree258fbb1091239d1cdf20f10bf2a7624a7a8288a9 /src/main
parentf5f9d29c848705effe4414c2ed39ce118430476c (diff)
parente414699ba059cf137c5faed74b1caa1c489414a5 (diff)
downloadGT5-Unofficial-f0c353ee28ea8cf082f9f184a94dfd4350ab488a.tar.gz
GT5-Unofficial-f0c353ee28ea8cf082f9f184a94dfd4350ab488a.tar.bz2
GT5-Unofficial-f0c353ee28ea8cf082f9f184a94dfd4350ab488a.zip
Merge pull request #182 from GTNewHorizons/bmf
Bmf
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/gregtech/GT_Mod.java166
-rw-r--r--src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java13
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java39
-rw-r--r--src/main/java/gregtech/api/util/GT_Forestry_Compat.java80
-rw-r--r--src/main/java/gregtech/api/util/GT_GC_Compat.java47
-rw-r--r--src/main/java/gregtech/api/util/GT_Recipe.java3
-rw-r--r--src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java57
-rw-r--r--src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java1
-rw-r--r--src/main/java/gregtech/common/GT_Worldgenerator.java65
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java1
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Axe.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Drill_LV.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_File.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Hoe.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_JackHammer.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Pickaxe.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Plow.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Plunger.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Saw.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Scoop.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Sense.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Shovel.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Soldering_Iron.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Sword.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_WireCutter.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Wrench.java2
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java9
32 files changed, 332 insertions, 191 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java
index c4c014a78b..03f4398393 100644
--- a/src/main/java/gregtech/GT_Mod.java
+++ b/src/main/java/gregtech/GT_Mod.java
@@ -5,9 +5,6 @@ import cpw.mods.fml.common.event.*;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
-import forestry.api.recipes.ICentrifugeRecipe;
-import forestry.api.recipes.ISqueezerRecipe;
-import forestry.api.recipes.RecipeManagers;
import gregtech.api.GregTech_API;
import gregtech.api.enchants.Enchantment_EnderDamage;
import gregtech.api.enchants.Enchantment_Radioactivity;
@@ -563,36 +560,36 @@ public class GT_Mod implements IGT_Mod {
}
/*
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.gregtechrecipes, "SolarPanel", true)) {
- GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SGS", "CPC", 'C', OrePrefixes.circuit.get(Materials.Basic), 'G', new ItemStack(Blocks.glass_pane, 1), 'P', OrePrefixes.plateAlloy.get(Materials.Carbon), 'S', ItemList.Circuit_Silicon_Wafer});
- GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_8V.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SGS", "CPC","R R", 'C', OrePrefixes.circuit.get(Materials.Advanced), 'G', new ItemStack(Blocks.glass_pane, 1), 'P', OrePrefixes.wireGt04.get(Materials.Graphene), 'S', ItemList.Circuit_Silicon_Wafer2,'R', OrePrefixes.plate.get(Materials.GalliumArsenide)});
- GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SGS", "CPC","R R", 'C', OrePrefixes.circuit.get(Materials.Master), 'G', GT_ModHandler.getIC2Item("reinforcedGlass", 1L), 'P', OrePrefixes.wireGt16.get(Materials.Graphene), 'S', ItemList.Circuit_Silicon_Wafer3,'R', OrePrefixes.plate.get(Materials.IndiumGalliumPhosphide)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SGS", "CPC", 'C', OrePrefixes.circuit.get(Materials.Basic), 'G', new ItemStack(Blocks.glass_pane, 1), 'P', OrePrefixes.plateAlloy.get(Materials.Carbon), 'S', ItemList.Circuit_Silicon_Wafer});
+ GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_8V.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SGS", "CPC","R R", 'C', OrePrefixes.circuit.get(Materials.Advanced), 'G', new ItemStack(Blocks.glass_pane, 1), 'P', OrePrefixes.wireGt04.get(Materials.Graphene), 'S', ItemList.Circuit_Silicon_Wafer2,'R', OrePrefixes.plate.get(Materials.GalliumArsenide)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_LV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SGS", "CPC","R R", 'C', OrePrefixes.circuit.get(Materials.Master), 'G', GT_ModHandler.getIC2Item("reinforcedGlass", 1L), 'P', OrePrefixes.wireGt16.get(Materials.Graphene), 'S', ItemList.Circuit_Silicon_Wafer3,'R', OrePrefixes.plate.get(Materials.IndiumGalliumPhosphide)});
}
if (GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "SolarPanel8V", false)) {
- GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_8V.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSS", "STS", "SSS", 'S', ItemList.Cover_SolarPanel, 'T', OrePrefixes.circuit.get(Materials.Advanced)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_8V.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SSS", "STS", "SSS", 'S', ItemList.Cover_SolarPanel, 'T', OrePrefixes.circuit.get(Materials.Advanced)});
}
if (GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "SolarPanelLV", false)) {
- GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" S ", "STS", " S ", 'S', ItemList.Cover_SolarPanel_8V, 'T', ItemList.Transformer_LV_ULV});
+ GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_LV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" S ", "STS", " S ", 'S', ItemList.Cover_SolarPanel_8V, 'T', ItemList.Transformer_LV_ULV});
}
if (GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "SolarPanelMV", false)) {
- GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" S ", "STS", " S ", 'S', ItemList.Cover_SolarPanel_LV, 'T', ItemList.Transformer_MV_LV});
+ GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_MV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" S ", "STS", " S ", 'S', ItemList.Cover_SolarPanel_LV, 'T', ItemList.Transformer_MV_LV});
}
if (GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "SolarPanelHV", false)) {
- GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" S ", "STS", " S ", 'S', ItemList.Cover_SolarPanel_MV, 'T', ItemList.Transformer_HV_MV});
+ GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_HV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" S ", "STS", " S ", 'S', ItemList.Cover_SolarPanel_MV, 'T', ItemList.Transformer_HV_MV});
}
if (GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "SolarPanelEV", false)) {
- GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" S ", "STS", " S ", 'S', ItemList.Cover_SolarPanel_HV, 'T', ItemList.Transformer_EV_HV});
+ GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_EV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" S ", "STS", " S ", 'S', ItemList.Cover_SolarPanel_HV, 'T', ItemList.Transformer_EV_HV});
}
if (GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "SolarPanelIV", false)) {
- GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" S ", "STS", " S ", 'S', ItemList.Cover_SolarPanel_EV, 'T', ItemList.Transformer_IV_EV});
+ GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_IV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" S ", "STS", " S ", 'S', ItemList.Cover_SolarPanel_EV, 'T', ItemList.Transformer_IV_EV});
}
if (GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "SolarPanelLuV", false)) {
- GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_LuV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" S ", "STS", " S ", 'S', ItemList.Cover_SolarPanel_IV, 'T', ItemList.Transformer_LuV_IV});
+ GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_LuV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" S ", "STS", " S ", 'S', ItemList.Cover_SolarPanel_IV, 'T', ItemList.Transformer_LuV_IV});
}
if (GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "SolarPanelZPM", false)) {
- GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_ZPM.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" S ", "STS", " S ", 'S', ItemList.Cover_SolarPanel_LuV, 'T', ItemList.Transformer_ZPM_LuV});
+ GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_ZPM.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" S ", "STS", " S ", 'S', ItemList.Cover_SolarPanel_LuV, 'T', ItemList.Transformer_ZPM_LuV});
}
if (GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "SolarPanelUV", false)) {
- GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_UV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" S ", "STS", " S ", 'S', ItemList.Cover_SolarPanel_ZPM, 'T', ItemList.Transformer_UV_ZPM});
+ GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel_UV.get(1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{" S ", "STS", " S ", 'S', ItemList.Cover_SolarPanel_ZPM, 'T', ItemList.Transformer_UV_ZPM});
}
*/
double outputMultiplier = Math.min(GregTech_API.sOPStuff.get(ConfigCategories.Recipes.gregtechrecipes, "StoneDustOutputMultiplier", 0.6), 1.0);
@@ -673,7 +670,8 @@ public class GT_Mod implements IGT_Mod {
}
} catch (Throwable e) {e.printStackTrace(GT_Log.err);}
- new GT_Bees();
+ if (Loader.isModLoaded("forestry"))
+ new GT_Bees();
//Disable Low Grav regardless of config if Cleanroom is disabled.
if (!gregtechproxy.mEnableCleanroom){
@@ -752,9 +750,9 @@ public class GT_Mod implements IGT_Mod {
Map<IRecipeInput, RecipeOutput> aThermalCentrifugeRecipeList = GT_ModHandler.getThermalCentrifugeRecipeList();
GT_Log.out.println("GT_Mod: Activating OreDictionary Handler, this can take some time, as it scans the whole OreDictionary");
- GT_FML_LOGGER.info("If your Log stops here, you were too impatient. Wait a bit more next time, before killing Minecraft with the Task Manager.", new Object[0]);
+ GT_FML_LOGGER.info("If your Log stops here, you were too impatient. Wait a bit more next time, before killing Minecraft with the Task Manager.");
gregtechproxy.activateOreDictHandler();
- GT_FML_LOGGER.info("Congratulations, you have been waiting long enough. Have a Cake.", new Object[0]);
+ GT_FML_LOGGER.info("Congratulations, you have been waiting long enough. Have a Cake.");
GT_Log.out.println("GT_Mod: List of Lists of Tool Recipes: "+GT_ModHandler.sSingleNonBlockDamagableRecipeList_list.toString());
GT_Log.out.println("GT_Mod: Vanilla Recipe List -> Outputs null or stackSize <=0: " + GT_ModHandler.sVanillaRecipeList_warntOutput.toString());
GT_Log.out.println("GT_Mod: Single Non Block Damagable Recipe List -> Outputs null or stackSize <=0: " + GT_ModHandler.sSingleNonBlockDamagableRecipeList_warntOutput.toString());
@@ -775,12 +773,12 @@ public class GT_Mod implements IGT_Mod {
}
new GT_CraftingRecipeLoader().run();
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "ic2forgehammer", true)) {
- GT_ModHandler.removeRecipeByOutput(ItemList.IC2_ForgeHammer.getWildcard(1L, new Object[0]));
+ GT_ModHandler.removeRecipeByOutput(ItemList.IC2_ForgeHammer.getWildcard(1L));
}
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("machine", 1L));
GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("machine", 1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "RwR", "RRR", 'R', OrePrefixes.plate.get(Materials.Iron)});
ItemStack ISdata0 = new ItemStack(Items.potionitem, 1, 0);
- ItemStack ILdata0 = ItemList.Bottle_Empty.get(1L, new Object[0]);
+ ItemStack ILdata0 = ItemList.Bottle_Empty.get(1L);
for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) {
if ((tData.filledContainer.getItem() == Items.potionitem) && (tData.filledContainer.getItemDamage() == 0)) {
GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe(true, new ItemStack[]{ILdata0}, new ItemStack[]{ISdata0}, null, new FluidStack[]{Materials.Water.getFluid(250L)}, null, 4, 1, 0);
@@ -790,35 +788,12 @@ public class GT_Mod implements IGT_Mod {
GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe(true, new ItemStack[]{tData.filledContainer}, new ItemStack[]{GT_Utility.getContainerItem(tData.filledContainer, true)}, null, null, new FluidStack[]{tData.fluid}, tData.fluid.amount / 62, 1, 0);
}
}
- try {
- for (ICentrifugeRecipe tRecipe : RecipeManagers.centrifugeManager.recipes()) {
- Map<ItemStack, Float> outputs = tRecipe.getAllProducts();
- ItemStack[] tOutputs = new ItemStack[outputs.size()];
- int[] tChances = new int[outputs.size()];
- int i = 0;
- for (Map.Entry<ItemStack, Float> entry : outputs.entrySet()) {
- tChances[i] = (int) (entry.getValue() * 10000);
- tOutputs[i] = entry.getKey().copy();
- i++;
- }
- GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(true, new ItemStack[]{tRecipe.getInput()}, tOutputs, null, tChances, null, null, 128, 5, 0);
- }
- } catch (Throwable e) {
- if (GT_Values.D1) {
- e.printStackTrace(GT_Log.err);
- }
- }
- try {
- for (ISqueezerRecipe tRecipe : RecipeManagers.squeezerManager.recipes()) {
- if ((tRecipe.getResources().length == 1) && (tRecipe.getFluidOutput() != null)) {
- GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes.addRecipe(true, new ItemStack[]{tRecipe.getResources()[0]}, new ItemStack[]{tRecipe.getRemnants()}, null, new int[]{(int) (tRecipe.getRemnantsChance() * 10000)}, null, new FluidStack[]{tRecipe.getFluidOutput()}, 32, 8, 0);
- }
- }
- } catch (Throwable e) {
- if (GT_Values.D1) {
- e.printStackTrace(GT_Log.err);
- }
+
+ if (Loader.isModLoaded("forestry")) {
+ GT_Forestry_Compat.transferCentrifugeRecipes();
+ GT_Forestry_Compat.transferSqueezerRecipes();
}
+
String tName = "";
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "blastfurnace"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L));
@@ -920,68 +895,45 @@ public class GT_Mod implements IGT_Mod {
}
} catch (Throwable e) {e.printStackTrace(GT_Log.err);}
GT_Log.out.println("GT_Mod: Adding Fake Recipes for NEI");
- if (ItemList.FR_Bee_Drone.get(1L, new Object[0]) != null) {
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Bee_Drone.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Bee_Drone.getWithName(1L, "Scanned Drone", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
- }
- if (ItemList.FR_Bee_Princess.get(1L, new Object[0]) != null) {
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Bee_Princess.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Bee_Princess.getWithName(1L, "Scanned Princess", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
- }
- if (ItemList.FR_Bee_Queen.get(1L, new Object[0]) != null) {
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Bee_Queen.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Bee_Queen.getWithName(1L, "Scanned Queen", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
- }
- if (ItemList.FR_Tree_Sapling.get(1L, new Object[0]) != null) {
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Tree_Sapling.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Tree_Sapling.getWithName(1L, "Scanned Sapling", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
- }
- if (ItemList.FR_Butterfly.get(1L, new Object[0]) != null) {
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Butterfly.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Butterfly.getWithName(1L, "Scanned Butterfly", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
- }
- if (ItemList.FR_Larvae.get(1L, new Object[0]) != null) {
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Larvae.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Larvae.getWithName(1L, "Scanned Larvae", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
- }
- if (ItemList.FR_Serum.get(1L, new Object[0]) != null) {
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Serum.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Serum.getWithName(1L, "Scanned Serum", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
- }
- if (ItemList.FR_Caterpillar.get(1L, new Object[0]) != null) {
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Caterpillar.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Caterpillar.getWithName(1L, "Scanned Caterpillar", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
- }
- if (ItemList.FR_PollenFertile.get(1L, new Object[0]) != null) {
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_PollenFertile.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_PollenFertile.getWithName(1L, "Scanned Pollen", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
- }
- if (ItemList.IC2_Crop_Seeds.get(1L, new Object[0]) != null) {
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.IC2_Crop_Seeds.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.IC2_Crop_Seeds.getWithName(1L, "Scanned Seeds", new Object[0])}, null, null, null, 160, 8, 0);
- }
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{new ItemStack(Items.written_book, 1, 32767)}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Scanned Book Data", new Object[0])}, ItemList.Tool_DataStick.getWithName(1L, "Stick to save it to", new Object[0]), null, null, 128, 30, 0);
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{new ItemStack(Items.filled_map, 1, 32767)}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Scanned Map Data", new Object[0])}, ItemList.Tool_DataStick.getWithName(1L, "Stick to save it to", new Object[0]), null, null, 128, 30, 0);
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.Tool_DataOrb.getWithName(1L, "Orb to overwrite", new Object[0])}, new ItemStack[]{ItemList.Tool_DataOrb.getWithName(1L, "Copy of the Orb", new Object[0])}, ItemList.Tool_DataOrb.getWithName(0L, "Orb to copy", new Object[0]), null, null, 512, 30, 0);
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Stick to overwrite", new Object[0])}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Copy of the Stick", new Object[0])}, ItemList.Tool_DataStick.getWithName(0L, "Stick to copy", new Object[0]), null, null, 128, 30, 0);
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Raw Prospection Data", new Object[0])}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Analyzed Prospection Data", new Object[0])}, null, null, null, 1000, 30, 0);
- if (Loader.isModLoaded("GalacticraftCore"))
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{GT_ModHandler.getModItem("GalacticraftCore","item.schematic",1).setStackDisplayName("Any Schematic")}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Scanned Schematic", new Object[0])}, ItemList.Tool_DataStick.getWithName(1L, "Stick to save it to", new Object[0]), null, null, 36000, 480, 0);
+
+ if (Loader.isModLoaded("forestry"))
+ GT_Forestry_Compat.populateFakeNeiRecipes();
+
+ if (ItemList.IC2_Crop_Seeds.get(1L) != null) {
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.IC2_Crop_Seeds.getWildcard(1L)}, new ItemStack[]{ItemList.IC2_Crop_Seeds.getWithName(1L, "Scanned Seeds")}, null, null, null, 160, 8, 0);
+ }
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{new ItemStack(Items.written_book, 1, 32767)}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Scanned Book Data")}, ItemList.Tool_DataStick.getWithName(1L, "Stick to save it to"), null, null, 128, 30, 0);
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{new ItemStack(Items.filled_map, 1, 32767)}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Scanned Map Data")}, ItemList.Tool_DataStick.getWithName(1L, "Stick to save it to"), null, null, 128, 30, 0);
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.Tool_DataOrb.getWithName(1L, "Orb to overwrite")}, new ItemStack[]{ItemList.Tool_DataOrb.getWithName(1L, "Copy of the Orb")}, ItemList.Tool_DataOrb.getWithName(0L, "Orb to copy"), null, null, 512, 30, 0);
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Stick to overwrite")}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Copy of the Stick")}, ItemList.Tool_DataStick.getWithName(0L, "Stick to copy"), null, null, 128, 30, 0);
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Raw Prospection Data")}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Analyzed Prospection Data")}, null, null, null, 1000, 30, 0);
+ if (Loader.isModLoaded("GalacticraftCore"))
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{GT_ModHandler.getModItem("GalacticraftCore","item.schematic",1).setStackDisplayName("Any Schematic")}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Scanned Schematic")}, ItemList.Tool_DataStick.getWithName(1L, "Stick to save it to"), null, null, 36000, 480, 0);
for (Materials tMaterial : Materials.values()) {
if ((tMaterial.mElement != null) && (!tMaterial.mElement.mIsIsotope) && (tMaterial != Materials.Magic) && (tMaterial.getMass() > 0L)) {
- ItemStack tOutput = ItemList.Tool_DataOrb.get(1L, new Object[0]);
+ ItemStack tOutput = ItemList.Tool_DataOrb.get(1L);
Behaviour_DataOrb.setDataTitle(tOutput, "Elemental-Scan");
Behaviour_DataOrb.setDataName(tOutput, tMaterial.mElement.name());
ItemStack tInput = GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial, 1L);
ItemStack[] ISmat0 = new ItemStack[]{tInput};
ItemStack[] ISmat1 = new ItemStack[]{tOutput};
if (tInput != null) {
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, ISmat0, ISmat1, ItemList.Tool_DataOrb.get(1L, new Object[0]), null, null, (int) (tMaterial.getMass() * 8192L), 30, 0);
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, ISmat0, ISmat1, ItemList.Tool_DataOrb.get(1L), null, null, (int) (tMaterial.getMass() * 8192L), 30, 0);
GT_Recipe.GT_Recipe_Map.sReplicatorFakeRecipes.addFakeRecipe(false, null, ISmat0, ISmat1, new FluidStack[]{Materials.UUMatter.getFluid(tMaterial.getMass())}, null, (int) (tMaterial.getMass() * 512L), 30, 0);
}
tInput = GT_OreDictUnificator.get(OrePrefixes.cell, tMaterial, 1L);
ISmat0 = new ItemStack[]{tInput};
if (tInput != null) {
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, ISmat0, ISmat1, ItemList.Tool_DataOrb.get(1L, new Object[0]), null, null, (int) (tMaterial.getMass() * 8192L), 30, 0);
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, ISmat0, ISmat1, ItemList.Tool_DataOrb.get(1L), null, null, (int) (tMaterial.getMass() * 8192L), 30, 0);
GT_Recipe.GT_Recipe_Map.sReplicatorFakeRecipes.addFakeRecipe(false, null, ISmat0, ISmat1, new FluidStack[]{Materials.UUMatter.getFluid(tMaterial.getMass())}, null, (int) (tMaterial.getMass() * 512L), 30, 0);
}
}
}
if (!GT_MetaTileEntity_Massfabricator.sRequiresUUA) GT_Recipe.GT_Recipe_Map.sMassFabFakeRecipes.addFakeRecipe(false, null, null, null, null, new FluidStack[]{Materials.UUMatter.getFluid(1L)}, GT_MetaTileEntity_Massfabricator.sDurationMultiplier, 256, 0);
GT_Recipe.GT_Recipe_Map.sMassFabFakeRecipes.addFakeRecipe(false, null, null, null, new FluidStack[]{Materials.UUAmplifier.getFluid(GT_MetaTileEntity_Massfabricator.sUUAperUUM)}, new FluidStack[]{Materials.UUMatter.getFluid(1L)}, GT_MetaTileEntity_Massfabricator.sDurationMultiplier / GT_MetaTileEntity_Massfabricator.sUUASpeedBonus, 256, 0);
- GT_Recipe.GT_Recipe_Map.sRockBreakerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.Display_ITS_FREE.getWithName(0L, "Place Lava on Side", new Object[0])}, new ItemStack[]{new ItemStack(Blocks.cobblestone, 1)}, null, null, null, 16, 30, 0);
- GT_Recipe.GT_Recipe_Map.sRockBreakerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.Display_ITS_FREE.getWithName(0L, "Place Lava on Top", new Object[0])}, new ItemStack[]{new ItemStack(Blocks.stone, 1)}, null, null, null, 16, 30, 0);
+ GT_Recipe.GT_Recipe_Map.sRockBreakerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.Display_ITS_FREE.getWithName(0L, "Place Lava on Side")}, new ItemStack[]{new ItemStack(Blocks.cobblestone, 1)}, null, null, null, 16, 30, 0);
+ GT_Recipe.GT_Recipe_Map.sRockBreakerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.Display_ITS_FREE.getWithName(0L, "Place Lava on Top")}, new ItemStack[]{new ItemStack(Blocks.stone, 1)}, null, null, null, 16, 30, 0);
GT_Recipe.GT_Recipe_Map.sRockBreakerFakeRecipes.addFakeRecipe(false, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L)}, new ItemStack[]{new ItemStack(Blocks.obsidian, 1)}, null, null, null, 128, 30, 0);
if(GregTech_API.mOutputRF||GregTech_API.mInputRF){
@@ -1160,21 +1112,21 @@ public class GT_Mod implements IGT_Mod {
}
for (ItemStack tOutput : tStacks) {
if (gregtechproxy.mRegisteredOres.contains(tOutput)) {
- GT_FML_LOGGER.error("GT-ERR-01: @ " + tOutput.getUnlocalizedName() + " " + tOutput.getDisplayName(), new Object[0]);
- GT_FML_LOGGER.error("A Recipe used an OreDict Item as Output directly, without copying it before!!! This is a typical CallByReference/CallByValue Error", new Object[0]);
- GT_FML_LOGGER.error("Said Item will be renamed to make the invalid Recipe visible, so that you can report it properly.", new Object[0]);
- GT_FML_LOGGER.error("Please check all Recipes outputting this Item, and report the Recipes to their Owner.", new Object[0]);
- GT_FML_LOGGER.error("The Owner of the ==>RECIPE<==, NOT the Owner of the Item, which has been mentioned above!!!", new Object[0]);
- GT_FML_LOGGER.error("And ONLY Recipes which are ==>OUTPUTTING<== the Item, sorry but I don't want failed Bug Reports.", new Object[0]);
- GT_FML_LOGGER.error("GregTech just reports this Error to you, so you can report it to the Mod causing the Problem.", new Object[0]);
- GT_FML_LOGGER.error("Even though I make that Bug visible, I can not and will not fix that for you, that's for the causing Mod to fix.", new Object[0]);
- GT_FML_LOGGER.error("And speaking of failed Reports:", new Object[0]);
- GT_FML_LOGGER.error("Both IC2 and GregTech CANNOT be the CAUSE of this Problem, so don't report it to either of them.", new Object[0]);
- GT_FML_LOGGER.error("I REPEAT, BOTH, IC2 and GregTech CANNOT be the source of THIS BUG. NO MATTER WHAT.", new Object[0]);
- GT_FML_LOGGER.error("Asking in the IC2 Forums, which Mod is causing that, won't help anyone, since it is not possible to determine, which Mod it is.", new Object[0]);
- GT_FML_LOGGER.error("If it would be possible, then I would have had added the Mod which is causing it to the Message already. But it is not possible.", new Object[0]);
- GT_FML_LOGGER.error("Sorry, but this Error is serious enough to justify this Wall-O-Text and the partially allcapsed Language.", new Object[0]);
- GT_FML_LOGGER.error("Also it is a Ban Reason on the IC2-Forums to post this seriously.", new Object[0]);
+ GT_FML_LOGGER.error("GT-ERR-01: @ " + tOutput.getUnlocalizedName() + " " + tOutput.getDisplayName());
+ GT_FML_LOGGER.error("A Recipe used an OreDict Item as Output directly, without copying it before!!! This is a typical CallByReference/CallByValue Error");
+ GT_FML_LOGGER.error("Said Item will be renamed to make the invalid Recipe visible, so that you can report it properly.");
+ GT_FML_LOGGER.error("Please check all Recipes outputting this Item, and report the Recipes to their Owner.");
+ GT_FML_LOGGER.error("The Owner of the ==>RECIPE<==, NOT the Owner of the Item, which has been mentioned above!!!");
+ GT_FML_LOGGER.error("And ONLY Recipes which are ==>OUTPUTTING<== the Item, sorry but I don't want failed Bug Reports.");
+ GT_FML_LOGGER.error("GregTech just reports this Error to you, so you can report it to the Mod causing the Problem.");
+ GT_FML_LOGGER.error("Even though I make that Bug visible, I can not and will not fix that for you, that's for the causing Mod to fix.");
+ GT_FML_LOGGER.error("And speaking of failed Reports:");
+ GT_FML_LOGGER.error("Both IC2 and GregTech CANNOT be the CAUSE of this Problem, so don't report it to either of them.");
+ GT_FML_LOGGER.error("I REPEAT, BOTH, IC2 and GregTech CANNOT be the source of THIS BUG. NO MATTER WHAT.");
+ GT_FML_LOGGER.error("Asking in the IC2 Forums, which Mod is causing that, won't help anyone, since it is not possible to determine, which Mod it is.");
+ GT_FML_LOGGER.error("If it would be possible, then I would have had added the Mod which is causing it to the Message already. But it is not possible.");
+ GT_FML_LOGGER.error("Sorry, but this Error is serious enough to justify this Wall-O-Text and the partially allcapsed Language.");
+ GT_FML_LOGGER.error("Also it is a Ban Reason on the IC2-Forums to post this seriously.");
tOutput.setStackDisplayName("ERROR! PLEASE CHECK YOUR LOG FOR 'GT-ERR-01'!");
} else {
GT_OreDictUnificator.setStack(tOutput);
@@ -1344,8 +1296,8 @@ public class GT_Mod implements IGT_Mod {
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lithium, 1),
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Caesium, 1),
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 1),
- GT_OreDictUnificator.get(ItemList.Block_SSFUEL.get(1, new Object[0])),
- GT_OreDictUnificator.get(ItemList.Block_MSSFUEL.get(1, new Object[0])),
+ GT_OreDictUnificator.get(ItemList.Block_SSFUEL.get(1)),
+ GT_OreDictUnificator.get(ItemList.Block_MSSFUEL.get(1)),
GT_OreDictUnificator.get(OrePrefixes.rod, Materials.Blaze, 1));
if (Loader.isModLoaded("Thaumcraft")) {
GT_Recipe.GT_Recipe_Map.sLargeBoilerFakeFuels.addSolidRecipe(GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1));
diff --git a/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java b/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java
index 9c3b4a8ae5..db0db134ff 100644
--- a/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java
+++ b/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java
@@ -462,9 +462,18 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements
@Override
public float getDigSpeed(ItemStack aStack, Block aBlock, int aMetaData) {
- if (!isItemStackUsable(aStack)) return 0.0F;
+
+ if (!isItemStackUsable(aStack))
+ return 0.0F;
+
IToolStats tStats = getToolStats(aStack);
- if (tStats == null || Math.max(0, getHarvestLevel(aStack, "")) < aBlock.getHarvestLevel(aMetaData)) return 0.0F;
+
+ if (tStats == null || Math.max(0, getHarvestLevel(aStack, "")) < aBlock.getHarvestLevel(aMetaData))
+ return 0.0F;
+
+ if (aBlock.getHarvestLevel(aMetaData) == 0 && !tStats.isMinableBlock(aBlock, (byte) aMetaData))
+ return Math.min(Math.max(Float.MIN_NORMAL, ((tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed) /2)),1.0F);
+
return tStats.isMinableBlock(aBlock, (byte) aMetaData) ? Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed) : 0.0F;
}
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java
index 5d672547d8..267287c430 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java
@@ -2,6 +2,7 @@ package gregtech.api.metatileentity.implementations;
import cofh.api.energy.IEnergyReceiver;
import com.google.common.collect.Sets;
+import cpw.mods.fml.common.Loader;
import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Dyes;
@@ -17,6 +18,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.BaseMetaPipeEntity;
import gregtech.api.metatileentity.MetaPipeEntity;
import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_GC_Compat;
import gregtech.api.util.GT_CoverBehavior;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
@@ -29,12 +31,7 @@ import ic2.api.energy.tile.IEnergySink;
import ic2.api.energy.tile.IEnergySource;
import ic2.api.energy.tile.IEnergyTile;
import ic2.api.reactor.IReactorChamber;
-import micdoodle8.mods.galacticraft.api.power.EnergySource;
-import micdoodle8.mods.galacticraft.api.power.EnergySource.EnergySourceAdjacent;
-import micdoodle8.mods.galacticraft.api.power.IEnergyHandlerGC;
-import micdoodle8.mods.galacticraft.api.transmission.NetworkType;
-import micdoodle8.mods.galacticraft.api.transmission.tile.IConnector;
-import micdoodle8.mods.galacticraft.core.energy.EnergyConfigHandler;
+
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
@@ -242,6 +239,8 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile
return rUsedAmperes;
}
+
+
private long insertEnergyInto(TileEntity tTileEntity, byte tSide, long aVoltage, long aAmperage) {
if (aAmperage == 0 || tTileEntity == null) return 0;
@@ -264,26 +263,10 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile
return 0;
}
- // GC Compat
- if (GregTech_API.mGalacticraft && tTileEntity instanceof IEnergyHandlerGC) {
- if (!(tTileEntity instanceof IConnector) || ((IConnector)tTileEntity).canConnect(tDirection, NetworkType.POWER)) {
- EnergySource eSource = new EnergySourceAdjacent(tDirection);
-
- float tSizeToReceive = aVoltage * EnergyConfigHandler.IC2_RATIO, tStored = ((IEnergyHandlerGC)tTileEntity).getEnergyStoredGC(eSource);
- if (tSizeToReceive >= tStored || tSizeToReceive <= ((IEnergyHandlerGC)tTileEntity).getMaxEnergyStoredGC(eSource) - tStored) {
- float tReceived = ((IEnergyHandlerGC)tTileEntity).receiveEnergyGC(eSource, tSizeToReceive, false);
- if (tReceived > 0) {
- tSizeToReceive -= tReceived;
- while (tSizeToReceive > 0) {
- tReceived = ((IEnergyHandlerGC)tTileEntity).receiveEnergyGC(eSource, tSizeToReceive, false);
- if (tReceived < 1) break;
- tSizeToReceive -= tReceived;
- }
- return 1;
- }
- }
- }
- return 0;
+ if (Loader.isModLoaded("GalacticraftCore")) {
+ long gc = GT_GC_Compat.insertEnergyInto(tTileEntity, aVoltage, tDirection);
+ if (gc != 2)
+ return gc;
}
// IC2 Compat
@@ -464,9 +447,7 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile
if (coverBehavior instanceof GT_Cover_SolarPanel) return true;
// ((tIsGregTechTileEntity && tIsTileEntityCable) && (tAlwaysLookConnected || tLetEnergyIn || tLetEnergyOut) ) --> Not needed
-
- // GC Compat
- if (GregTech_API.mGalacticraft && tTileEntity instanceof IEnergyHandlerGC && (!(tTileEntity instanceof IConnector) || ((IConnector)tTileEntity).canConnect(tDir, NetworkType.POWER)))
+ if (Loader.isModLoaded("GalacticraftCore") && GT_GC_Compat.canConnect(tTileEntity,tDir))
return true;
// AE2-p2p Compat
diff --git a/src/main/java/gregtech/api/util/GT_Forestry_Compat.java b/src/main/java/gregtech/api/util/GT_Forestry_Compat.java
new file mode 100644
index 0000000000..c59e551373
--- /dev/null
+++ b/src/main/java/gregtech/api/util/GT_Forestry_Compat.java
@@ -0,0 +1,80 @@
+package gregtech.api.util;
+
+import forestry.api.recipes.ICentrifugeRecipe;
+import forestry.api.recipes.ISqueezerRecipe;
+import forestry.api.recipes.RecipeManagers;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
+import java.util.Map;
+
+public class GT_Forestry_Compat {
+
+ public static void populateFakeNeiRecipes(){
+ if (ItemList.FR_Bee_Drone.get(1L) != null) {
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Bee_Drone.getWildcard(1L)}, new ItemStack[]{ItemList.FR_Bee_Drone.getWithName(1L, "Scanned Drone")}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
+ }
+ if (ItemList.FR_Bee_Princess.get(1L) != null) {
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Bee_Princess.getWildcard(1L)}, new ItemStack[]{ItemList.FR_Bee_Princess.getWithName(1L, "Scanned Princess")}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
+ }
+ if (ItemList.FR_Bee_Queen.get(1L) != null) {
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Bee_Queen.getWildcard(1L)}, new ItemStack[]{ItemList.FR_Bee_Queen.getWithName(1L, "Scanned Queen")}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
+ }
+ if (ItemList.FR_Tree_Sapling.get(1L) != null) {
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Tree_Sapling.getWildcard(1L)}, new ItemStack[]{ItemList.FR_Tree_Sapling.getWithName(1L, "Scanned Sapling")}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
+ }
+ if (ItemList.FR_Butterfly.get(1L) != null) {
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Butterfly.getWildcard(1L)}, new ItemStack[]{ItemList.FR_Butterfly.getWithName(1L, "Scanned Butterfly")}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
+ }
+ if (ItemList.FR_Larvae.get(1L) != null) {
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Larvae.getWildcard(1L)}, new ItemStack[]{ItemList.FR_Larvae.getWithName(1L, "Scanned Larvae")}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
+ }
+ if (ItemList.FR_Serum.get(1L) != null) {
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Serum.getWildcard(1L)}, new ItemStack[]{ItemList.FR_Serum.getWithName(1L, "Scanned Serum")}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
+ }
+ if (ItemList.FR_Caterpillar.get(1L) != null) {
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Caterpillar.getWildcard(1L)}, new ItemStack[]{ItemList.FR_Caterpillar.getWithName(1L, "Scanned Caterpillar")}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
+ }
+ if (ItemList.FR_PollenFertile.get(1L) != null) {
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_PollenFertile.getWildcard(1L)}, new ItemStack[]{ItemList.FR_PollenFertile.getWithName(1L, "Scanned Pollen")}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
+ }
+ }
+
+ public static void transferCentrifugeRecipes(){
+ try {
+ for (ICentrifugeRecipe tRecipe : RecipeManagers.centrifugeManager.recipes()) {
+ Map<ItemStack, Float> outputs = tRecipe.getAllProducts();
+ ItemStack[] tOutputs = new ItemStack[outputs.size()];
+ int[] tChances = new int[outputs.size()];
+ int i = 0;
+ for (Map.Entry<ItemStack, Float> entry : outputs.entrySet()) {
+ tChances[i] = (int) (entry.getValue() * 10000);
+ tOutputs[i] = entry.getKey().copy();
+ i++;
+ }
+ GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe(true, new ItemStack[]{tRecipe.getInput()}, tOutputs, null, tChances, null, null, 128, 5, 0);
+ }
+ } catch (Throwable e) {
+ if (GT_Values.D1) {
+ e.printStackTrace(GT_Log.err);
+ }
+ }
+ }
+
+ public static void transferSqueezerRecipes(){
+ try {
+ for (ISqueezerRecipe tRecipe : RecipeManagers.squeezerManager.recipes()) {
+ if ((tRecipe.getResources().length == 1) && (tRecipe.getFluidOutput() != null)) {
+ GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes.addRecipe(true, new ItemStack[]{tRecipe.getResources()[0]}, new ItemStack[]{tRecipe.getRemnants()}, null, new int[]{(int) (tRecipe.getRemnantsChance() * 10000)}, null, new FluidStack[]{tRecipe.getFluidOutput()}, 32, 8, 0);
+ }
+ }
+ } catch (Throwable e) {
+ if (GT_Values.D1) {
+ e.printStackTrace(GT_Log.err);
+ }
+ }
+ }
+}
diff --git a/src/main/java/gregtech/api/util/GT_GC_Compat.java b/src/main/java/gregtech/api/util/GT_GC_Compat.java
new file mode 100644
index 0000000000..8131e3affb
--- /dev/null
+++ b/src/main/java/gregtech/api/util/GT_GC_Compat.java
@@ -0,0 +1,47 @@
+package gregtech.api.util;
+
+import gregtech.api.GregTech_API;
+import micdoodle8.mods.galacticraft.api.power.EnergySource;
+import micdoodle8.mods.galacticraft.api.power.EnergySource.EnergySourceAdjacent;
+import micdoodle8.mods.galacticraft.api.power.IEnergyHandlerGC;
+import micdoodle8.mods.galacticraft.api.transmission.NetworkType;
+import micdoodle8.mods.galacticraft.api.transmission.tile.IConnector;
+import micdoodle8.mods.galacticraft.core.energy.EnergyConfigHandler;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraftforge.common.util.ForgeDirection;
+
+public class GT_GC_Compat {
+
+ public static long insertEnergyInto(TileEntity tTileEntity, long aVoltage, ForgeDirection tDirection) {
+ // GC Compat
+ if (GregTech_API.mGalacticraft && tTileEntity instanceof IEnergyHandlerGC) {
+ if (!(tTileEntity instanceof IConnector) || ((IConnector)tTileEntity).canConnect(tDirection, NetworkType.POWER)) {
+ EnergySource eSource = new EnergySourceAdjacent(tDirection);
+
+ float tSizeToReceive = aVoltage * EnergyConfigHandler.IC2_RATIO, tStored = ((IEnergyHandlerGC)tTileEntity).getEnergyStoredGC(eSource);
+ if (tSizeToReceive >= tStored || tSizeToReceive <= ((IEnergyHandlerGC)tTileEntity).getMaxEnergyStoredGC(eSource) - tStored) {
+ float tReceived = ((IEnergyHandlerGC)tTileEntity).receiveEnergyGC(eSource, tSizeToReceive, false);
+ if (tReceived > 0) {
+ tSizeToReceive -= tReceived;
+ while (tSizeToReceive > 0) {
+ tReceived = ((IEnergyHandlerGC)tTileEntity).receiveEnergyGC(eSource, tSizeToReceive, false);
+ if (tReceived < 1) break;
+ tSizeToReceive -= tReceived;
+ }
+ return 1;
+ }
+ }
+ }
+ return 0;
+ }
+ return 2;
+ }
+
+ public static boolean canConnect(TileEntity tTileEntity,ForgeDirection tDirection){
+ // GC Compat
+ if (GregTech_API.mGalacticraft && tTileEntity instanceof IEnergyHandlerGC && (!(tTileEntity instanceof IConnector) || ((IConnector)tTileEntity).canConnect(tDirection, NetworkType.POWER)))
+ return true;
+ return false;
+ }
+
+}
diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java
index f26df767b8..462211c110 100644
--- a/src/main/java/gregtech/api/util/GT_Recipe.java
+++ b/src/main/java/gregtech/api/util/GT_Recipe.java
@@ -275,7 +275,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
public static void reInit() {
GT_Log.out.println("GT_Mod: Re-Unificating Recipes.");
- for (GT_Recipe_Map tMapEntry : GT_Recipe_Map.sMappings) tMapEntry.reInit();
+ for (GT_Recipe_Map tMapEntry : GT_Recipe_Map.sMappings)
+ tMapEntry.reInit();
}
// -----
diff --git a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java
index 18a5a01c93..986fd22a1f 100644
--- a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java
+++ b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java
@@ -46,11 +46,62 @@ public class GT_Worldgen_GT_Ore_Layer
public static final int ORE_PLACED=4;
public static final int NO_OVERLAP_AIR_BLOCK=5;
- //public final boolean mMoon;
- //public final boolean mMars;
- //public final boolean mAsteroid;
+ public final boolean mMoon = false, mMars = false, mAsteroid = false;
public final String aTextWorldgen = "worldgen.";
+
+ @Deprecated
+ public GT_Worldgen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, boolean aOverworld, boolean aNether, boolean aEnd, boolean GC_UNUSED1, boolean GC_UNUSED2, boolean GC_UNUSED3, int aPrimary, int aSecondary, int aBetween, int aSporadic) {
+ super(aName, sList, aDefault);
+ this.mOverworld = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld);
+ this.mNether = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Nether", aNether);
+ this.mEnd = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "TheEnd", aEnd);
+ this.mEndAsteroid = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "EndAsteroid", aEnd);
+ //this.mMoon = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Moon", aMoon);
+ //this.mMars = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Mars", aMars);
+ //this.mAsteroid = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Asteroid", aAsteroid);
+ this.mMinY = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MinHeight", aMinY));
+ short mMaxY = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "MaxHeight", aMaxY));
+ if (mMaxY < (this.mMinY + 9)) {
+ GT_Log.out.println(
+ "Oremix " + this.mWorldGenName +
+ " has invalid Min/Max heights!"
+ );
+ mMaxY = (short) (this.mMinY + 9);
+ }
+ this.mMaxY = mMaxY;
+ this.mWeight = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RandomWeight", aWeight));
+ this.mDensity = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Density", aDensity));
+ this.mSize = ((short) Math.max(1, GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Size", aSize)));
+ this.mPrimaryMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OrePrimaryLayer", aPrimary));
+ this.mSecondaryMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSecondaryLayer", aSecondary));
+ this.mBetweenMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSporadiclyInbetween", aBetween));
+ this.mSporadicMeta = ((short) GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "OreSporaticlyAround", aSporadic));
+ this.mRestrictBiome = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "RestrictToBiomeName", "None");
+
+ //if (mPrimaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mPrimaryMeta + " for " + mWorldGenName + " does not exist");
+ //if (mSecondaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mSecondaryMeta + " for " + mWorldGenName + " does not exist");
+ //if (mBetweenMeta != -1 && GregTech_API.sGeneratedMaterials[(mBetweenMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mBetweenMeta + " for " + mWorldGenName + " does not exist");
+ //if (mPrimaryMeta != -1 && GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)] == null) throw new IllegalArgumentException("A Material for the supplied ID " + mSporadicMeta + " for " + mWorldGenName + " does not exist");
+
+ if (this.mEnabled) {
+ //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mPrimaryMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd);
+ //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSecondaryMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd);
+ //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mBetweenMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd);
+ //GT_Achievements.registerOre(GregTech_API.sGeneratedMaterials[(mSporadicMeta % 1000)], aMinY, aMaxY, aWeight, aOverworld, aNether, aEnd);
+ sWeight += this.mWeight;
+ //if(GregTech_API.mImmersiveEngineering && GT_Mod.gregtechproxy.mImmersiveEngineeringRecipes){
+ // blusunrize.immersiveengineering.api.tool.ExcavatorHandler.addMineral(aName.substring(8, 9).toUpperCase()+aName.substring(9), aWeight, 0.2f, new String[]{"ore"+aPrimary.mName,"ore"+aSecondary.mName,"ore"+aBetween.mName,"ore"+aSporadic.mName}, new float[]{.4f,.4f,.15f,.05f});
+ //}
+
+ }
+ }
+
+ @Deprecated
+ public GT_Worldgen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, boolean aOverworld, boolean aNether, boolean aEnd, boolean GC_UNUSED1, boolean GC_UNUSED2, boolean GC_UNUSED3, Materials aPrimary, Materials aSecondary, Materials aBetween, Materials aSporadic) {
+ this(aName, aDefault, aMinY, aMaxY, aWeight, aDensity, aSize, aOverworld, aNether, aEnd, aPrimary, aSecondary, aBetween, aSporadic);
+ }
+
public GT_Worldgen_GT_Ore_Layer(String aName, boolean aDefault, int aMinY, int aMaxY, int aWeight, int aDensity, int aSize, boolean aOverworld, boolean aNether, boolean aEnd, Materials aPrimary, Materials aSecondary, Materials aBetween, Materials aSporadic) {
super(aName, sList, aDefault);
this.mOverworld = GregTech_API.sWorldgenFile.get(aTextWorldgen + this.mWorldGenName, "Overworld", aOverworld);
diff --git a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java
index 69f08a5361..85c0eb2d07 100644
--- a/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java
+++ b/src/main/java/gregtech/common/GT_Worldgen_GT_Ore_SmallPieces.java
@@ -22,6 +22,7 @@ public class GT_Worldgen_GT_Ore_SmallPieces
public final boolean mOverworld;
public final boolean mNether;
public final boolean mEnd;
+ public final boolean mMoon = false, mMars = false, mAsteroid = false;
public final String mBiome;
public final String aTextWorldgen = "worldgen.";
public static ArrayList<GT_Worldgen_GT_Ore_SmallPieces> sList = new ArrayList<GT_Worldgen_GT_Ore_SmallPieces>();
diff --git a/src/main/java/gregtech/common/GT_Worldgenerator.java b/src/main/java/gregtech/common/GT_Worldgenerator.java
index f87ac9bc98..06e8697d3c 100644
--- a/src/main/java/gregtech/common/GT_Worldgenerator.java
+++ b/src/main/java/gregtech/common/GT_Worldgenerator.java
@@ -118,8 +118,6 @@ implements IWorldGenerator {
// Local class to track which orevein seeds must be checked when doing chunkified worldgen
-
-
class NearbySeeds {
public int mX;
public int mZ;
@@ -127,8 +125,25 @@ implements IWorldGenerator {
this.mX = x;
this.mZ = z;
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (!(o instanceof GT_Worldgenerator.WorldGenContainer.NearbySeeds)) return false;
+ GT_Worldgenerator.WorldGenContainer.NearbySeeds that = (GT_Worldgenerator.WorldGenContainer.NearbySeeds) o;
+ if (this.mX != that.mX) return false;
+ return this.mZ == that.mZ;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = this.mX;
+ result = 31 * result + this.mZ;
+ return result;
+ }
};
- public static ArrayList<NearbySeeds> seedList = new ArrayList();
+
+ public static ArrayList<GT_Worldgenerator.WorldGenContainer.NearbySeeds> seedList = new ArrayList();
// aX and aZ are now the by-chunk X and Z for the chunk of interest
public WorldGenContainer(Random aRandom, int aX, int aZ, int aDimensionType, World aWorld, IChunkProvider aChunkGenerator, IChunkProvider aChunkProvider, String aBiome) {
@@ -144,7 +159,7 @@ implements IWorldGenerator {
// How to evaluate oregen distribution
// - Enable debugOreveins
- // - Fly around for a while, or teleport jumping ~320 blocks at a time, with
+ // - Fly around for a while, or teleport jumping ~320 blocks at a time, with
// a 15-30s pause for worldgen to catch up
// - Do this across a large area, at least 2000x2000 blocks for good numbers
// - Open logs\gregtech.log
@@ -152,18 +167,18 @@ implements IWorldGenerator {
// - Select Find All In Current Document
// - In the Search window, right-click and Select All
// - Copy and paste to a new file
- // - Delete extraneous stuff at top, and blank line at bottom. Line count is
+ // - Delete extraneous stuff at top, and blank line at bottom. Line count is
// # of total oreveins
- // - For simple spot checks, use Find All in Current Document for specific
+ // - For simple spot checks, use Find All in Current Document for specific
// oremixes, ie ore.mix.diamond, to check how many appear in the list.
- // - For more complex work, import file into Excel, and sort based on oremix
- // column. Drag select the oremix names, in the bottom right will be how many
+ // - For more complex work, import file into Excel, and sort based on oremix
+ // column. Drag select the oremix names, in the bottom right will be how many
// entries to add in a seperate tab to calculate %ages.
//
// When using the ore weights, discount or remove the high altitude veins since
// their high weight are offset by their rareness. I usually just use zero for them.
// Actual spawn rates will vary based upon the average height of the stone layers
- // in the dimension. For example veins that range above and below the average height
+ // in the dimension. For example veins that range above and below the average height
// will be less, and veins that are completely above the average height will be much less.
public void worldGenFindVein( int oreseedX, int oreseedZ) {
@@ -172,17 +187,17 @@ implements IWorldGenerator {
// ((this.mWorld.provider.dimensionId & 0xffL)<<56) Puts the dimension in the top bits of the hash, to make sure to get unique hashes per dimension
// ((long)oreseedX & 0x000000000fffffffL) << 28) Puts the chunk X in the bits 29-55. Cuts off the top few bits of the chunk so we have bits for dimension.
// ( (long)oreseedZ & 0x000000000fffffffL )) Puts the chunk Z in the bits 0-27. Cuts off the top few bits of the chunk so we have bits for dimension.
- long oreveinSeed = ((long)this.mWorld.getSeed()<<16) ^ ((long)((this.mWorld.provider.dimensionId & 0xffL)<<56) |( ((long)oreseedX & 0x000000000fffffffL) << 28) | ( (long)oreseedZ & 0x000000000fffffffL )); // Use an RNG that is identical every time it is called for this oreseed.
- XSTR oreveinRNG = new XSTR( oreveinSeed );
+ long oreveinSeed = ((long)this.mWorld.getSeed()<<16) ^ ((long)((this.mWorld.provider.dimensionId & 0xffL)<<56) |( ((long)oreseedX & 0x000000000fffffffL) << 28) | ( (long)oreseedZ & 0x000000000fffffffL )); // Use an RNG that is identical every time it is called for this oreseed.
+ XSTR oreveinRNG = new XSTR( oreveinSeed );
int oreveinPercentageRoll = oreveinRNG.nextInt(100); // Roll the dice, see if we get an orevein here at all
int noOrePlacedCount=0;
String tDimensionName = "";
if (debugOrevein) { tDimensionName = this.mWorld.provider.getDimensionName(); }
-
+
if (debugOrevein) GT_Log.out.println(
" Finding oreveins for oreveinSeed="+ oreveinSeed +
" mX="+ this.mX +
- " mZ="+ this.mZ +
+ " mZ="+ this.mZ +
" oreseedX="+ oreseedX +
" oreseedZ="+ oreseedZ +
" worldSeed="+this.mWorld.getSeed()
@@ -201,7 +216,7 @@ implements IWorldGenerator {
{
test = 1;
GT_Log.out.println(
- "sWeight = " + GT_Worldgen_GT_Ore_Layer.sWeight
+ "sWeight = " + GT_Worldgen_GT_Ore_Layer.sWeight
);
for (GT_Worldgen_GT_Ore_Layer tWorldGen : GT_Worldgen_GT_Ore_Layer.sList) {
GT_Log.out.println(
@@ -215,8 +230,8 @@ implements IWorldGenerator {
for (GT_Worldgen_GT_Ore_Layer tWorldGen : GT_Worldgen_GT_Ore_Layer.sList) {
tRandomWeight -= ( tWorldGen).mWeight;
if (tRandomWeight <= 0) {
- try {
- // Adjust the seed so that this layer has a series of unique random numbers. Otherwise multiple attempts at this same oreseed will get the same offset and X/Z values. If an orevein failed, any orevein with the
+ try {
+ // Adjust the seed so that this layer has a series of unique random numbers. Otherwise multiple attempts at this same oreseed will get the same offset and X/Z values. If an orevein failed, any orevein with the
// same minimum heights would fail as well. This prevents that, giving each orevein a unique height each pass through here.
int placementResult = tWorldGen.executeWorldgenChunkified(this.mWorld, new XSTR( oreveinSeed ^ (tWorldGen.mPrimaryMeta)), this.mBiome, this.mDimensionType, this.mX*16, this.mZ*16, oreseedX*16, oreseedZ*16, this.mChunkGenerator, this.mChunkProvider);
switch(placementResult) {
@@ -264,7 +279,7 @@ implements IWorldGenerator {
"Exception occurred on oreVein" + tWorldGen +
" oreveinSeed="+ oreveinSeed +
" mX="+ this.mX +
- " mZ="+ this.mZ +
+ " mZ="+ this.mZ +
" oreseedX="+ oreseedX +
" oreseedZ="+ oreseedZ
);
@@ -278,9 +293,9 @@ implements IWorldGenerator {
if (debugOrevein) GT_Log.out.println(
" Empty oreveinSeed="+ oreveinSeed +
" mX="+ this.mX +
- " mZ="+ this.mZ +
+ " mZ="+ this.mZ +
" oreseedX="+ oreseedX +
- " oreseedZ="+ oreseedZ +
+ " oreseedZ="+ oreseedZ +
" tries at oremix=" + i +
" placementAttempts=" + placementAttempts +
" dimensionName=" + tDimensionName
@@ -293,9 +308,9 @@ implements IWorldGenerator {
" mX="+ this.mX +
" mZ="+ this.mZ +
" oreseedX=" + oreseedX +
- " oreseedZ="+ oreseedZ +
+ " oreseedZ=" + oreseedZ +
" RNG=" + oreveinPercentageRoll +
- " %=" + oreveinPercentage+
+ " %=" + oreveinPercentage+
" dimensionName=" + tDimensionName
);
validOreveins.put(oreveinSeed, noOresInVein);
@@ -303,7 +318,7 @@ implements IWorldGenerator {
}else {
// oreseed is located in the previously processed table
if (debugOrevein) GT_Log.out.print(
- " Valid oreveinSeed="+ oreveinSeed +
+ " Valid oreveinSeed="+ oreveinSeed +
" validOreveins.size()=" + validOreveins.size() + " "
);
GT_Worldgen_GT_Ore_Layer tWorldGen = validOreveins.get(oreveinSeed);
@@ -323,7 +338,7 @@ implements IWorldGenerator {
}
}
}
-
+
public void run() {
long startTime = System.nanoTime();
int oreveinMaxSize;
@@ -350,7 +365,7 @@ implements IWorldGenerator {
} else {
oreveinMaxSize=32;
}
-
+
int wXbox = this.mX - (oreveinMaxSize/16);
int eXbox = this.mX + (oreveinMaxSize/16 + 1); // Need to add 1 since it is compared using a <
int nZbox = this.mZ - (oreveinMaxSize/16);
@@ -365,7 +380,7 @@ implements IWorldGenerator {
"Adding seed x="+x+
" z="+z
);
- seedList.add( new NearbySeeds(x,z) );
+ seedList.add( new GT_Worldgenerator.WorldGenContainer.NearbySeeds(x,z) );
}
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java
index ffbfa048de..8cf775bfe5 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ImplosionCompressor.java
@@ -41,6 +41,7 @@ public class GT_MetaTileEntity_ImplosionCompressor
"1x Muffler Hatch (Any casing)",
"1x Energy Hatch (Any casing)",
"Solid Steel Machine Casings for the rest (16 at least!)",
+ "Casings can be replaced with Explosion Warning Signs",
"Causes " + 20 * getPollutionPerTick(null) + " Pollution per second"};
}
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Axe.java b/src/main/java/gregtech/common/tools/GT_Tool_Axe.java
index 6ae55532e4..4fdfbbaee3 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Axe.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Axe.java
@@ -81,7 +81,7 @@ public class GT_Tool_Axe
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("axe"))) || (aBlock.getMaterial() == Material.wood);
+ return (tTool == null || tTool.isEmpty() || (tTool.equals("axe"))) || (aBlock.getMaterial() == Material.wood);
}
public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java b/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java
index 3707650b3c..e018fc7f69 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java
@@ -60,7 +60,7 @@ public class GT_Tool_BranchCutter
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("grafter"))) || (aBlock.getMaterial() == Material.leaves);
+ return (tTool == null || tTool.isEmpty() || (tTool.equals("grafter"))) || (aBlock.getMaterial() == Material.leaves);
}
public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Drill_LV.java b/src/main/java/gregtech/common/tools/GT_Tool_Drill_LV.java
index 103d43f499..05995ddfe2 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Drill_LV.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Drill_LV.java
@@ -75,7 +75,7 @@ public class GT_Tool_Drill_LV
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && ((tTool.equals("pickaxe")) || (tTool.equals("shovel")))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.iron) || (aBlock.getMaterial() == Material.anvil) || (aBlock.getMaterial() == Material.sand) || (aBlock.getMaterial() == Material.grass) || (aBlock.getMaterial() == Material.ground) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.clay) || (aBlock.getMaterial() == Material.glass);
+ return (tTool == null || tTool.isEmpty() || ((tTool.equals("pickaxe")) || (tTool.equals("shovel")))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.iron) || (aBlock.getMaterial() == Material.anvil) || (aBlock.getMaterial() == Material.sand) || (aBlock.getMaterial() == Material.grass) || (aBlock.getMaterial() == Material.ground) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.clay) || (aBlock.getMaterial() == Material.glass);
}
public ItemStack getBrokenItem(ItemStack aStack) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_File.java b/src/main/java/gregtech/common/tools/GT_Tool_File.java
index 19975f1228..04ec0370e8 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_File.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_File.java
@@ -75,7 +75,7 @@ public class GT_Tool_File
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && tTool.equals("file"));
+ return (tTool == null || tTool.isEmpty() || tTool.equals("file"));
}
public ItemStack getBrokenItem(ItemStack aStack) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java b/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java
index 9f321a5bfe..6691e3ffa0 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java
@@ -98,7 +98,7 @@ public class GT_Tool_HardHammer
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && ((tTool.equals("hammer")) || (tTool.equals("pickaxe")))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.glass) || (aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce) || (GT_Recipe.GT_Recipe_Map.sHammerRecipes.containsInput(new ItemStack(aBlock, 1, aMetaData)));
+ return (tTool == null || tTool.isEmpty() || ((tTool.equals("hammer")) || (tTool.equals("pickaxe")))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.glass) || (aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce) || (GT_Recipe.GT_Recipe_Map.sHammerRecipes.containsInput(new ItemStack(aBlock, 1, aMetaData)));
}
public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Hoe.java b/src/main/java/gregtech/common/tools/GT_Tool_Hoe.java
index 0f3c2a5965..fd364c97d0 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Hoe.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Hoe.java
@@ -74,7 +74,7 @@ public class GT_Tool_Hoe
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("hoe"))) || (aBlock.getMaterial() == Material.gourd);
+ return (tTool == null || tTool.isEmpty() || (tTool.equals("hoe"))) || (aBlock.getMaterial() == Material.gourd);
}
public ItemStack getBrokenItem(ItemStack aStack) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_JackHammer.java b/src/main/java/gregtech/common/tools/GT_Tool_JackHammer.java
index d2799b525f..6cb570b7d4 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_JackHammer.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_JackHammer.java
@@ -53,7 +53,7 @@ public class GT_Tool_JackHammer
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("pickaxe"))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.glass) || (aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce);
+ return (tTool == null || tTool.isEmpty() || (tTool.equals("pickaxe"))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.glass) || (aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce);
}
public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Pickaxe.java b/src/main/java/gregtech/common/tools/GT_Tool_Pickaxe.java
index 066d27318e..c5e6af019b 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Pickaxe.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Pickaxe.java
@@ -74,7 +74,7 @@ public class GT_Tool_Pickaxe
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("pickaxe"))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.iron) || (aBlock.getMaterial() == Material.anvil) || (aBlock.getMaterial() == Material.glass);
+ return (tTool == null || tTool.isEmpty() || (tTool.equals("pickaxe"))) || (aBlock.getMaterial() == Material.rock) || (aBlock.getMaterial() == Material.iron) || (aBlock.getMaterial() == Material.anvil) || (aBlock.getMaterial() == Material.glass);
}
public ItemStack getBrokenItem(ItemStack aStack) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Plow.java b/src/main/java/gregtech/common/tools/GT_Tool_Plow.java
index 994767220e..54b8f63d51 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Plow.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Plow.java
@@ -31,7 +31,7 @@ public class GT_Tool_Plow
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("plow"))) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.craftedSnow);
+ return (tTool == null || tTool.isEmpty() || (tTool.equals("plow"))) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.craftedSnow);
}
public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Plunger.java b/src/main/java/gregtech/common/tools/GT_Tool_Plunger.java
index 3fef69d7e8..3ed23e1b65 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Plunger.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Plunger.java
@@ -43,7 +43,7 @@ public class GT_Tool_Plunger
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && tTool.equals("plunger"));
+ return (tTool == null || tTool.isEmpty() || tTool.equals("plunger"));
}
public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Saw.java b/src/main/java/gregtech/common/tools/GT_Tool_Saw.java
index 810ddaae9f..8f5f90beaf 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Saw.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Saw.java
@@ -90,7 +90,7 @@ public class GT_Tool_Saw
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && ((tTool.equals("axe")) || (tTool.equals("saw")))) || (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.wood) || (aBlock.getMaterial() == Material.cactus) || (aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce);
+ return (tTool == null || tTool.isEmpty() || ((tTool.equals("axe")) || (tTool.equals("saw")))) || (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.wood) || (aBlock.getMaterial() == Material.cactus) || (aBlock.getMaterial() == Material.ice) || (aBlock.getMaterial() == Material.packedIce);
}
public ItemStack getBrokenItem(ItemStack aStack) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Scoop.java b/src/main/java/gregtech/common/tools/GT_Tool_Scoop.java
index 09f3298ee8..600bfd40bf 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Scoop.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Scoop.java
@@ -78,7 +78,7 @@ public class GT_Tool_Scoop
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("scoop"))) || (aBlock.getMaterial() == sBeeHiveMaterial);
+ return (tTool == null || tTool.isEmpty() || (tTool.equals("scoop"))) || (aBlock.getMaterial() == sBeeHiveMaterial);
}
public ItemStack getBrokenItem(ItemStack aStack) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java b/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java
index 372725d85c..18e6508425 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java
@@ -92,7 +92,7 @@ public class GT_Tool_Screwdriver
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("screwdriver"))) || (aBlock.getMaterial() == Material.circuits);
+ return (tTool == null || tTool.isEmpty() || (tTool.equals("screwdriver"))) || (aBlock.getMaterial() == Material.circuits);
}
public ItemStack getBrokenItem(ItemStack aStack) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Sense.java b/src/main/java/gregtech/common/tools/GT_Tool_Sense.java
index 369c558a28..27954433a8 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Sense.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Sense.java
@@ -31,7 +31,7 @@ public class GT_Tool_Sense
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && ((tTool.equals("sense")) || (tTool.equals("scythe")))) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.leaves);
+ return (tTool == null || tTool.isEmpty() || ((tTool.equals("sense")) || (tTool.equals("scythe")))) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.leaves);
}
public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Shovel.java b/src/main/java/gregtech/common/tools/GT_Tool_Shovel.java
index 4a08f91b09..7c55c33437 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Shovel.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Shovel.java
@@ -71,7 +71,7 @@ public class GT_Tool_Shovel
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("shovel"))) || (aBlock.getMaterial() == Material.sand) || (aBlock.getMaterial() == Material.grass) || (aBlock.getMaterial() == Material.ground) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.clay);
+ return (tTool == null || tTool.isEmpty() || (tTool.equals("shovel"))) || (aBlock.getMaterial() == Material.sand) || (aBlock.getMaterial() == Material.grass) || (aBlock.getMaterial() == Material.ground) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.clay);
}
public ItemStack getBrokenItem(ItemStack aStack) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java b/src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java
index ecbb43816e..0118766201 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java
@@ -84,7 +84,7 @@ public class GT_Tool_SoftHammer
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && tTool.equals("softhammer"));
+ return (tTool == null || tTool.isEmpty() || tTool.equals("softhammer"));
}
public ItemStack getBrokenItem(ItemStack aStack) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Soldering_Iron.java b/src/main/java/gregtech/common/tools/GT_Tool_Soldering_Iron.java
index 3b164ef030..1b3086c31c 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Soldering_Iron.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Soldering_Iron.java
@@ -91,7 +91,7 @@ public class GT_Tool_Soldering_Iron extends GT_Tool {
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("soldering_iron"))) || (aBlock.getMaterial() == Material.circuits);
+ return (tTool == null || tTool.isEmpty() || (tTool.equals("soldering_iron"))) || (aBlock.getMaterial() == Material.circuits);
}
public ItemStack getBrokenItem(ItemStack aStack) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Sword.java b/src/main/java/gregtech/common/tools/GT_Tool_Sword.java
index 23f11d3ccb..470e4ae933 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Sword.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Sword.java
@@ -74,7 +74,7 @@ public class GT_Tool_Sword
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("sword"))) || (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.gourd) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.web) || (aBlock.getMaterial() == Material.cloth) || (aBlock.getMaterial() == Material.carpet) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.cactus) || (aBlock.getMaterial() == Material.cake) || (aBlock.getMaterial() == Material.tnt) || (aBlock.getMaterial() == Material.sponge);
+ return (tTool == null || tTool.isEmpty() || (tTool.equals("sword"))) || (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.gourd) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.web) || (aBlock.getMaterial() == Material.cloth) || (aBlock.getMaterial() == Material.carpet) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.cactus) || (aBlock.getMaterial() == Material.cake) || (aBlock.getMaterial() == Material.tnt) || (aBlock.getMaterial() == Material.sponge);
}
public ItemStack getBrokenItem(ItemStack aStack) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java b/src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java
index aae60b8afb..4852f649a8 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java
@@ -79,7 +79,7 @@ public class GT_Tool_UniversalSpade
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && ((tTool.equals("shovel")) || (tTool.equals("axe")) || (tTool.equals("saw")) || (tTool.equals("sword")) || (tTool.equals("crowbar")))) || (aBlock.getMaterial() == Material.sand) || (aBlock.getMaterial() == Material.grass) || (aBlock.getMaterial() == Material.ground) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.clay) || (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.wood) || (aBlock.getMaterial() == Material.cactus) || (aBlock.getMaterial() == Material.circuits) || (aBlock.getMaterial() == Material.gourd) || (aBlock.getMaterial() == Material.web) || (aBlock.getMaterial() == Material.cloth) || (aBlock.getMaterial() == Material.carpet) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.cake) || (aBlock.getMaterial() == Material.tnt) || (aBlock.getMaterial() == Material.sponge);
+ return (tTool == null || tTool.isEmpty() || ((tTool.equals("shovel")) || (tTool.equals("axe")) || (tTool.equals("saw")) || (tTool.equals("sword")) || (tTool.equals("crowbar")))) || (aBlock.getMaterial() == Material.sand) || (aBlock.getMaterial() == Material.grass) || (aBlock.getMaterial() == Material.ground) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.clay) || (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.wood) || (aBlock.getMaterial() == Material.cactus) || (aBlock.getMaterial() == Material.circuits) || (aBlock.getMaterial() == Material.gourd) || (aBlock.getMaterial() == Material.web) || (aBlock.getMaterial() == Material.cloth) || (aBlock.getMaterial() == Material.carpet) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.cake) || (aBlock.getMaterial() == Material.tnt) || (aBlock.getMaterial() == Material.sponge);
}
public ItemStack getBrokenItem(ItemStack aStack) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_WireCutter.java b/src/main/java/gregtech/common/tools/GT_Tool_WireCutter.java
index 6592a2afe6..4d9108269d 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_WireCutter.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_WireCutter.java
@@ -71,7 +71,7 @@ public class GT_Tool_WireCutter
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return (tTool != null) && (tTool.equals("cutter"));
+ return tTool == null || tTool.isEmpty() || (tTool.equals("cutter"));
}
public ItemStack getBrokenItem(ItemStack aStack) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java b/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java
index a202854060..ba205c3fbe 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java
@@ -96,7 +96,7 @@ public class GT_Tool_Wrench
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("wrench"))) || (aBlock.getMaterial() == Material.piston) || (aBlock == Blocks.hopper) || (aBlock == Blocks.dispenser) || (aBlock == Blocks.dropper);
+ return (tTool == null || tTool.isEmpty() || (tTool.equals("wrench"))) || (aBlock.getMaterial() == Material.piston) || (aBlock == Blocks.hopper) || (aBlock == Blocks.dispenser) || (aBlock == Blocks.dropper);
}
public ItemStack getBrokenItem(ItemStack aStack) {
diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java
index 99cf2e6366..4530023908 100644
--- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java
+++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java
@@ -29,7 +29,8 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra
}
private boolean registerStandardOreRecipes(OrePrefixes aPrefix, Materials aMaterial, ItemStack aOreStack, int aMultiplier) {
- if ((aOreStack == null) || (aMaterial == null)) return false;
+ if ((aOreStack == null) || (aMaterial == null))
+ return false;
GT_ModHandler.addValuableOre(GT_Utility.getBlockFromStack(aOreStack), aOreStack.getItemDamage(), aMaterial.mOreValue);
Materials tMaterial = aMaterial.mOreReplacement;
Materials tPrimaryByMaterial = null;
@@ -71,8 +72,10 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra
gregtech.api.util.GT_Recipe.GT_Recipe_Map.sByProductList.addFakeRecipe(false, new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.ore, aMaterial, aOreStack, 1L)}, (ItemStack[]) tByProductStacks.toArray(new ItemStack[tByProductStacks.size()]), null, null, null, null, 0, 0, 0);
}
- if (tPrimaryByMaterial == null) tPrimaryByMaterial = tMaterial;
- if (tPrimaryByProduct == null) tPrimaryByProduct = tDust;
+ if (tPrimaryByMaterial == null)
+ tPrimaryByMaterial = tMaterial;
+ if (tPrimaryByProduct == null)
+ tPrimaryByProduct = tDust;
boolean tHasSmelting = false;
if (tSmeltInto != null) {