aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/common')
-rw-r--r--src/main/java/gregtech/common/GT_Proxy.java13
-rw-r--r--src/main/java/gregtech/common/GT_RecipeAdder.java62
-rw-r--r--src/main/java/gregtech/common/GT_Worldgen_GT_Ore_Layer.java2
-rw-r--r--src/main/java/gregtech/common/GT_Worldgenerator.java111
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Casings1.java1
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Concretes.java6
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Machines.java4
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Metal.java35
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Ores.java497
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java190
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Storage.java101
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Item_Storage.java30
-rw-r--r--src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java450
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java164
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java8
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java62
-rw-r--r--src/main/java/gregtech/common/gui/GT_Container_MicrowaveEnergyTransmitter.java171
-rw-r--r--src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java34
-rw-r--r--src/main/java/gregtech/common/items/CombType.java108
-rw-r--r--src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java40
-rw-r--r--src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java2
-rw-r--r--src/main/java/gregtech/common/items/ItemComb.java131
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Item.java136
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_Spray_Color.java3
-rw-r--r--src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java1
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java66
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java20
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java80
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java16
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java331
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java1
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java14
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java99
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java63
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java283
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java214
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java9
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java1
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java1
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java8
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java125
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java6
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java243
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java230
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java4
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java171
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java228
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Turbine_Small.java1
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Wrench.java12
59 files changed, 3696 insertions, 924 deletions
diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java
index 0fef7ea872..7be4eb413f 100644
--- a/src/main/java/gregtech/common/GT_Proxy.java
+++ b/src/main/java/gregtech/common/GT_Proxy.java
@@ -148,6 +148,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
public int mFlintChance = 30;
public int mItemDespawnTime = 6000;
public int mUpgradeCount = 4;
+ public boolean mGTBees = true;
private World mUniverse = null;
private boolean isFirstServerWorldTick = true;
private boolean mOreDictActivated = false;
@@ -1578,22 +1579,22 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
rFuelValue = (short) Math.max(rFuelValue, 888);
}
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemLignite")) {
- rFuelValue = (short) Math.max(rFuelValue, 300);
+ rFuelValue = (short) Math.max(rFuelValue, 1200);
}
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedLignite")) {
- rFuelValue = (short) Math.max(rFuelValue, 300);
+ rFuelValue = (short) Math.max(rFuelValue, 1200);
}
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureLignite")) {
- rFuelValue = (short) Math.max(rFuelValue, 300);
+ rFuelValue = (short) Math.max(rFuelValue, 1200);
}
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustLignite")) {
- rFuelValue = (short) Math.max(rFuelValue, 300);
+ rFuelValue = (short) Math.max(rFuelValue, 1200);
}
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallLignite")) {
- rFuelValue = (short) Math.max(rFuelValue, 75);
+ rFuelValue = (short) Math.max(rFuelValue, 375);
}
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyLignite")) {
- rFuelValue = (short) Math.max(rFuelValue, 33);
+ rFuelValue = (short) Math.max(rFuelValue, 166);
}
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemCoal")) {
rFuelValue = (short) Math.max(rFuelValue, 1600);
diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java
index ebc15ea2ca..4c1d4c7898 100644
--- a/src/main/java/gregtech/common/GT_RecipeAdder.java
+++ b/src/main/java/gregtech/common/GT_RecipeAdder.java
@@ -68,6 +68,10 @@ public class GT_RecipeAdder
}
public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration) {
+ return addChemicalRecipe(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aDuration, 30);
+ }
+
+ public boolean addChemicalRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUtick) {
if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput == null) && (aFluidOutput == null))) {
return false;
}
@@ -77,7 +81,10 @@ public class GT_RecipeAdder
if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get("chemicalreactor", aFluidOutput.getFluid().getName(), aDuration)) <= 0)) {
return false;
}
- GT_Recipe.GT_Recipe_Map.sChemicalRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, 30, 0);
+ if (aEUtick <= 0) {
+ return false;
+ }
+ GT_Recipe.GT_Recipe_Map.sChemicalRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUtick, 0);
return true;
}
@@ -267,6 +274,31 @@ public class GT_RecipeAdder
return false;
}
+
+ @Override
+ public boolean addUniversalDistillationRecipe(FluidStack aInput, FluidStack[] aOutputs, ItemStack aOutput2, int aDuration, int aEUt) {
+ if (aOutputs.length > 0) {
+ addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 0L, new Object[0]), aInput, aOutputs[0], aDuration * 2, aEUt / 4, false);
+ }
+ if (aOutputs.length > 1) {
+ addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 1L, new Object[0]), aInput, aOutputs[1], aDuration * 2, aEUt / 4, false);
+ }
+ if (aOutputs.length > 2) {
+ addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 2L, new Object[0]), aInput, aOutputs[2], aDuration * 2, aEUt / 4, false);
+ }
+ if (aOutputs.length > 3) {
+ addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 3L, new Object[0]), aInput, aOutputs[3], aDuration * 2, aEUt / 4, false);
+ }
+ if (aOutputs.length > 4) {
+ addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 4L, new Object[0]), aInput, aOutputs[4], aDuration * 2, aEUt / 4, false);
+ }
+ if (aOutputs.length > 5) {
+ addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 5L, new Object[0]), aInput, aOutputs[5], aDuration * 2, aEUt / 4, false);
+ }
+
+ return addDistillationTowerRecipe(aInput, aOutputs, aOutput2, aDuration, aEUt);
+ }
+
public boolean addDistillationTowerRecipe(FluidStack aInput, FluidStack[] aOutputs, ItemStack aOutput2, int aDuration, int aEUt) {
if (aInput == null || aOutputs == null || aOutputs.length < 1 || aOutputs.length > 5) {
return false;
@@ -411,7 +443,6 @@ public class GT_RecipeAdder
if (aInput.isFluidEqual(Materials.PhasedIron.getMolten(144))) {
aInput = Materials.PulsatingIron.getMolten(aInput.amount);
}
-
if ((aDuration = GregTech_API.sRecipeFile.get("fluidsolidifier", aOutput, aDuration)) <= 0) {
return false;
}
@@ -449,7 +480,6 @@ public class GT_RecipeAdder
if ((aDuration = GregTech_API.sRecipeFile.get("fluidextractor", aInput, aDuration)) <= 0) {
return false;
}
-
GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes.addRecipe(true, new ItemStack[]{aInput}, new ItemStack[]{aRemains}, null, new int[]{aChance}, null, new FluidStack[]{aOutput}, aDuration, aEUt, 0);
return true;
}
@@ -661,4 +691,30 @@ public class GT_RecipeAdder
return false;
}
+ @Override
+ public boolean addPyrolyseRecipe(ItemStack aInput, FluidStack aFluidInput, int intCircuit, ItemStack aOutput, FluidStack aFluidOutput, int aDuration, int aEUt) {
+ if (aInput == null) {
+ return false;
+ }
+ if ((aDuration = GregTech_API.sRecipeFile.get("pyrolyse", aInput, aDuration)) <= 0) {
+ return false;
+ }
+ GT_Recipe.GT_Recipe_Map.sPyrolyseRecipes.addRecipe(false, new ItemStack[]{aInput, ItemList.Circuit_Integrated.getWithDamage(0L, intCircuit, new Object[0])}, new ItemStack[]{aOutput}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0);
+ return true;
+ }
+
+ @Override
+ public boolean addCrackingRecipe(FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt) {
+ if ((aInput == null) || (aOutput == null)) {
+ return false;
+ }
+ if ((aDuration = GregTech_API.sRecipeFile.get("cracking", aInput.getUnlocalizedName(), aDuration)) <= 0) {
+ return false;
+ }
+ GT_Recipe.GT_Recipe_Map.sCrakingRecipes.addRecipe(true, null, null, null, null, new FluidStack[]{aInput}, new FluidStack[]{aOutput}, aDuration, aEUt, 0);
+ GT_Recipe.GT_Recipe_Map.sCrakingRecipes.addRecipe(true, null, null, null, null, new FluidStack[]{aInput, GT_ModHandler.getSteam(aInput.amount)}, new FluidStack[]{aOutput, Materials.Hydrogen.getGas(aInput.amount)}, aDuration, aEUt, 0);
+ GT_Recipe.GT_Recipe_Map.sCrakingRecipes.addRecipe(true, null, null, null, null, new FluidStack[]{aInput, Materials.Hydrogen.getGas(aInput.amount)}, new FluidStack[]{new FluidStack(aOutput.getFluid(), (int) (aOutput.amount * 1.3))}, aDuration, aEUt, 0);
+ return true;
+ }
+
}
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 57fae1983d..f552810941 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
@@ -28,12 +28,14 @@ public class GT_Worldgen_GT_Ore_Layer
public final boolean mOverworld;
public final boolean mNether;
public final boolean mEnd;
+ public final boolean mEndAsteroid;
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("worldgen." + this.mWorldGenName, "Overworld", aOverworld);
this.mNether = GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "Nether", aNether);
this.mEnd = GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "TheEnd", aEnd);
+ this.mEndAsteroid = GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "EndAsteroid", aEnd);
this.mMinY = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "MinHeight", aMinY));
this.mMaxY = ((short) Math.max(this.mMinY + 5, GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "MaxHeight", aMaxY)));
this.mWeight = ((short) GregTech_API.sWorldgenFile.get("worldgen." + this.mWorldGenName, "RandomWeight", aWeight));
diff --git a/src/main/java/gregtech/common/GT_Worldgenerator.java b/src/main/java/gregtech/common/GT_Worldgenerator.java
index d7f1d0bd63..0fb24cbcff 100644
--- a/src/main/java/gregtech/common/GT_Worldgenerator.java
+++ b/src/main/java/gregtech/common/GT_Worldgenerator.java
@@ -5,6 +5,9 @@ import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
import gregtech.api.util.GT_Log;
import gregtech.api.world.GT_Worldgen;
+import gregtech.common.blocks.GT_TileEntity_Ores;
+import net.minecraft.init.Blocks;
+import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.chunk.Chunk;
@@ -19,10 +22,20 @@ import java.util.Random;
public class GT_Worldgenerator
implements IWorldGenerator {
public static boolean sAsteroids = true;
+ private static int mEndAsteroidProbability = 300;
+ private static int mSize = 100;
+ private static int endMinSize = 50;
+ private static int endMaxSize = 200;
+ private static boolean endAsteroids = true;
public List<Runnable> mList = new ArrayList();
public boolean mIsGenerating = false;
+
public GT_Worldgenerator() {
+ endAsteroids = GregTech_API.sWorldgenFile.get("endasteroids", "GenerateAsteroids", true);
+ endMinSize = GregTech_API.sWorldgenFile.get("endasteroids", "AsteroidMinSize", 50);
+ endMaxSize = GregTech_API.sWorldgenFile.get("endasteroids", "AsteroidMaxSize", 200);
+ mEndAsteroidProbability = GregTech_API.sWorldgenFile.get("endasteroids", "AsteroidProbability", 300);
GameRegistry.registerWorldGenerator(this, 1073741823);
}
@@ -74,10 +87,10 @@ public class GT_Worldgenerator
if (tWorldGen.executeWorldgen(this.mWorld, this.mRandom, this.mBiome, this.mDimensionType, this.mX, this.mZ, this.mChunkGenerator, this.mChunkProvider)) {
temp = false;
}
+ break;
} catch (Throwable e) {
e.printStackTrace(GT_Log.err);
}
- break;
}
}
}
@@ -102,6 +115,102 @@ public class GT_Worldgenerator
i++;
}
}
+ //Asteroid Worldgen
+ int tDimensionType = this.mWorld.provider.dimensionId;
+ Random aRandom = new Random();
+ if (((tDimensionType == 1) && endAsteroids && ((mEndAsteroidProbability <= 1) || (aRandom.nextInt(mEndAsteroidProbability) == 0)))) {
+ short primaryMeta = 0;
+ short secondaryMeta = 0;
+ short betweenMeta = 0;
+ short sporadicMeta = 0;
+ if ((GT_Worldgen_GT_Ore_Layer.sWeight > 0) && (GT_Worldgen_GT_Ore_Layer.sList.size() > 0)) {
+ boolean temp = true;
+ int tRandomWeight;
+ for (int i = 0; (i < 256) && (temp); i++) {
+ tRandomWeight = aRandom.nextInt(GT_Worldgen_GT_Ore_Layer.sWeight);
+ for (GT_Worldgen_GT_Ore_Layer tWorldGen : GT_Worldgen_GT_Ore_Layer.sList) {
+ tRandomWeight -= ((GT_Worldgen_GT_Ore_Layer) tWorldGen).mWeight;
+ if (tRandomWeight <= 0) {
+ try {
+ if (tWorldGen.mEndAsteroid && tDimensionType == 1) {
+ primaryMeta = tWorldGen.mPrimaryMeta;
+ secondaryMeta = tWorldGen.mSecondaryMeta;
+ betweenMeta = tWorldGen.mBetweenMeta;
+ sporadicMeta = tWorldGen.mSporadicMeta;
+ temp = false;
+ break;
+ }
+ } catch (Throwable e) {
+ e.printStackTrace(GT_Log.err);
+ }
+ }
+ }
+ }
+ }
+ int tX = mX + aRandom.nextInt(16);
+ int tY = 50 + aRandom.nextInt(200 - 50);
+ int tZ = mZ + aRandom.nextInt(16);
+ if (tDimensionType == 1) {
+ mSize = aRandom.nextInt((int) (endMaxSize - endMinSize));
+ }
+ if ((mWorld.getBlock(tX, tY, tZ).isAir(mWorld, tX, tY, tZ))) {
+ float var6 = aRandom.nextFloat() * 3.141593F;
+ double var7 = tX + 8 + MathHelper.sin(var6) * mSize / 8.0F;
+ double var9 = tX + 8 - MathHelper.sin(var6) * mSize / 8.0F;
+ double var11 = tZ + 8 + MathHelper.cos(var6) * mSize / 8.0F;
+ double var13 = tZ + 8 - MathHelper.cos(var6) * mSize / 8.0F;
+ double var15 = tY + aRandom.nextInt(3) - 2;
+ double var17 = tY + aRandom.nextInt(3) - 2;
+ for (int var19 = 0; var19 <= mSize; var19++) {
+ double var20 = var7 + (var9 - var7) * var19 / mSize;
+ double var22 = var15 + (var17 - var15) * var19 / mSize;
+ double var24 = var11 + (var13 - var11) * var19 / mSize;
+ double var26 = aRandom.nextDouble() * mSize / 16.0D;
+ double var28 = (MathHelper.sin(var19 * 3.141593F / mSize) + 1.0F) * var26 + 1.0D;
+ double var30 = (MathHelper.sin(var19 * 3.141593F / mSize) + 1.0F) * var26 + 1.0D;
+ int tMinX = MathHelper.floor_double(var20 - var28 / 2.0D);
+ int tMinY = MathHelper.floor_double(var22 - var30 / 2.0D);
+ int tMinZ = MathHelper.floor_double(var24 - var28 / 2.0D);
+ int tMaxX = MathHelper.floor_double(var20 + var28 / 2.0D);
+ int tMaxY = MathHelper.floor_double(var22 + var30 / 2.0D);
+ int tMaxZ = MathHelper.floor_double(var24 + var28 / 2.0D);
+ for (int eX = tMinX; eX <= tMaxX; eX++) {
+ double var39 = (eX + 0.5D - var20) / (var28 / 2.0D);
+ if (var39 * var39 < 1.0D) {
+ for (int eY = tMinY; eY <= tMaxY; eY++) {
+ double var42 = (eY + 0.5D - var22) / (var30 / 2.0D);
+ if (var39 * var39 + var42 * var42 < 1.0D) {
+ for (int eZ = tMinZ; eZ <= tMaxZ; eZ++) {
+ double var45 = (eZ + 0.5D - var24) / (var28 / 2.0D);
+ if ((var39 * var39 + var42 * var42 + var45 * var45 < 1.0D) && (mWorld.getBlock(tX, tY, tZ).isAir(mWorld, tX, tY, tZ))) {
+ int ranOre = aRandom.nextInt(50);
+ if (ranOre < 3) {
+ GT_TileEntity_Ores.setOreBlock(mWorld, eX, eY, eZ, primaryMeta + (tDimensionType == -30 ? 4000 : 2000), true);
+ } else if (ranOre < 6) {
+ GT_TileEntity_Ores.setOreBlock(mWorld, eX, eY, eZ, secondaryMeta + (tDimensionType == -30 ? 4000 : 2000), true);
+ } else if (ranOre < 8) {
+ GT_TileEntity_Ores.setOreBlock(mWorld, eX, eY, eZ, betweenMeta + (tDimensionType == -30 ? 4000 : 2000), true);
+ } else if (ranOre < 10) {
+ GT_TileEntity_Ores.setOreBlock(mWorld, eX, eY, eZ, sporadicMeta + (tDimensionType == -30 ? 4000 : 2000), true);
+ } else {
+ if (tDimensionType == -30) {
+ mWorld.setBlock(eX, eY, eZ, GregTech_API.sBlockGranites, 8, 3);
+ } else {
+ mWorld.setBlock(eX, eY, eZ, Blocks.end_stone, 0, 0);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ }
+
+
Chunk tChunk = this.mWorld.getChunkFromBlockCoords(this.mX, this.mZ);
if (tChunk != null) {
tChunk.isModified = true;
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java
index bcacbf8939..6e4231f5dc 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java
@@ -15,6 +15,7 @@ public class GT_Block_Casings1
for (byte i = 0; i < 16; i = (byte) (i + 1)) {
Textures.BlockIcons.CASING_BLOCKS[i] = new GT_CopiedBlockTexture(this, 6, i);
}
+ Textures.BlockIcons.CASING_BLOCKS[120] = new GT_CopiedBlockTexture(this, 6, 0);
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "ULV Machine Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "LV Machine Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "MV Machine Casing");
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java b/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java
index 97ab5960ba..06f7feaa93 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Concretes.java
@@ -77,8 +77,10 @@ public class GT_Block_Concretes
aEntity.motionX *= 0.8999999761581421D;
aEntity.motionZ *= 0.8999999761581421D;
} else {
- aEntity.motionX *= 1.100000023841858D;
- aEntity.motionZ *= 1.100000023841858D;
+ if (aEntity.motionX < 6.0 && aEntity.motionZ < 6.0) {
+ aEntity.motionX *= 1.100000023841858D;
+ aEntity.motionZ *= 1.100000023841858D;
+ }
}
}
}
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java
index 85037d07c0..40edbaf306 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Machines.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Machines.java
@@ -247,14 +247,10 @@ public class GT_Block_Machines
}
public float getPlayerRelativeBlockHardness(EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) {
-// System.out.println("player hardness");
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
if (((tTileEntity instanceof BaseMetaTileEntity)) && (((BaseMetaTileEntity) tTileEntity).privateAccess()) && (!((BaseMetaTileEntity) tTileEntity).playerOwnsThis(aPlayer, true))) {
-// System.out.println("locked");
return -1.0F;
}
-// System.out.println("unlocked");
-// System.out.println("hardness: "+super.getPlayerRelativeBlockHardness(aPlayer, aWorld, aX, aY, aZ));
return super.getPlayerRelativeBlockHardness(aPlayer, aWorld, aX, aY, aZ);
}
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Metal.java b/src/main/java/gregtech/common/blocks/GT_Block_Metal.java
new file mode 100644
index 0000000000..53eec28475
--- /dev/null
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Metal.java
@@ -0,0 +1,35 @@
+package gregtech.common.blocks;
+
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.interfaces.IIconContainer;
+import gregtech.api.util.GT_LanguageManager;
+import gregtech.api.util.GT_OreDictUnificator;
+import net.minecraft.block.material.Material;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+
+public class GT_Block_Metal extends GT_Block_Storage {
+ public Materials[] mMats;
+ public OrePrefixes mPrefix;
+ public IIconContainer[] mBlockIcons;
+
+ public GT_Block_Metal(String aName, Materials[] aMats, OrePrefixes aPrefix, IIconContainer[] aBlockIcons) {
+ super(GT_Item_Storage.class, aName, Material.iron);
+ mMats = aMats;
+ mPrefix = aPrefix;
+ mBlockIcons = aBlockIcons;
+ for (int i = 0; i < aMats.length; i++) {
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + i + ".name", "Block of " + aMats[i].mDefaultLocalName);
+ GT_OreDictUnificator.registerOre(aPrefix, aMats[i], new ItemStack(this, 1, i));
+ }
+ }
+
+ public IIcon getIcon(int aSide, int aMeta) {
+ if ((aMeta >= 0) && (aMeta < 16) && aMeta < mMats.length) {
+ return mBlockIcons[aMeta].getIcon();
+ }
+ return null;
+ }
+
+}
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores.java
index 0be7e68454..df1a4ba6bd 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Ores.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores.java
@@ -1,249 +1,248 @@
-package gregtech.common.blocks;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.items.GT_Generic_Block;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.common.render.GT_Renderer_Block;
-import net.minecraft.block.Block;
-import net.minecraft.block.ITileEntityProvider;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.boss.EntityDragon;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.StatCollector;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class GT_Block_Ores
- extends GT_Generic_Block
- implements ITileEntityProvider {
- public static ThreadLocal<GT_TileEntity_Ores> mTemporaryTileEntity = new ThreadLocal();
- public static boolean FUCKING_LOCK = false;
-
- public GT_Block_Ores() {
- super(GT_Item_Ores.class, "gt.blockores", Material.rock);
- this.isBlockContainer = true;
- setStepSound(soundTypeStone);
- setCreativeTab(GregTech_API.TAB_GREGTECH_ORES);
- for (int i = 0; i < 16; i++) {
- GT_ModHandler.addValuableOre(this, i, 1);
- }
- for (int i = 1; i < GregTech_API.sGeneratedMaterials.length; i++) {
- if (GregTech_API.sGeneratedMaterials[i] != null) {
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + i + ".name", getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 1000) + ".name", getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 2000) + ".name", getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 3000) + ".name", getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 4000) + ".name", getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 16000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 17000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 18000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 19000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 20000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
- if ((GregTech_API.sGeneratedMaterials[i].mTypes & 0x8) != 0) {
- GT_OreDictUnificator.registerOre(OrePrefixes.ore.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i));
- GT_OreDictUnificator.registerOre(OrePrefixes.oreNetherrack.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i + 1000));
- GT_OreDictUnificator.registerOre(OrePrefixes.oreEndstone.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i + 2000));
- GT_OreDictUnificator.registerOre(OrePrefixes.oreBlackgranite.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i + 3000));
- GT_OreDictUnificator.registerOre(OrePrefixes.oreRedgranite.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i + 4000));
- }
- }
- }
- }
-
- public void onNeighborChange(IBlockAccess aWorld, int aX, int aY, int aZ, int aTileX, int aTileY, int aTileZ) {
- if (!FUCKING_LOCK) {
- FUCKING_LOCK = true;
- TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
- if ((tTileEntity instanceof GT_TileEntity_Ores)) {
- ((GT_TileEntity_Ores) tTileEntity).onUpdated();
- }
- }
- FUCKING_LOCK = false;
- }
-
- public void onNeighborBlockChange(World aWorld, int aX, int aY, int aZ, Block aBlock) {
- if (!FUCKING_LOCK) {
- FUCKING_LOCK = true;
- TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
- if ((tTileEntity instanceof GT_TileEntity_Ores)) {
- ((GT_TileEntity_Ores) tTileEntity).onUpdated();
- }
- }
- FUCKING_LOCK = false;
- }
-
- public String getLocalizedName(Materials aMaterial) {
- switch (aMaterial) {
- case InfusedAir:
- case InfusedDull:
- case InfusedEarth:
- case InfusedEntropy:
- case InfusedFire:
- case InfusedOrder:
- case InfusedVis:
- case InfusedWater:
- return aMaterial.mDefaultLocalName + " Infused Stone";
- case Vermiculite:
- case Bentonite:
- case Kaolinite:
- case Talc:
- case BasalticMineralSand:
- case GraniticMineralSand:
- case GlauconiteSand:
- case CassiteriteSand:
- case GarnetSand:
- case QuartzSand:
- case Pitchblende:
- case FullersEarth:
- return aMaterial.mDefaultLocalName;
- default:
- return aMaterial.mDefaultLocalName + OrePrefixes.ore.mLocalizedMaterialPost;
- }
-
- }
-
- public boolean onBlockEventReceived(World p_149696_1_, int p_149696_2_, int p_149696_3_, int p_149696_4_, int p_149696_5_, int p_149696_6_) {
- super.onBlockEventReceived(p_149696_1_, p_149696_2_, p_149696_3_, p_149696_4_, p_149696_5_, p_149696_6_);
- TileEntity tileentity = p_149696_1_.getTileEntity(p_149696_2_, p_149696_3_, p_149696_4_);
- return tileentity != null ? tileentity.receiveClientEvent(p_149696_5_, p_149696_6_) : false;
- }
-
- public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) {
- return (!(entity instanceof EntityDragon)) && (super.canEntityDestroy(world, x, y, z, entity));
- }
-
- public String getHarvestTool(int aMeta) {
- return aMeta < 8 ? "pickaxe" : "shovel";
- }
-
- public int getHarvestLevel(int aMeta) {
- return aMeta % 8;
- }
-
- public float getBlockHardness(World aWorld, int aX, int aY, int aZ) {
- return 1.0F + getHarvestLevel(aWorld.getBlockMetadata(aX, aY, aZ)) * 1.0F;
- }
-
- public float getExplosionResistance(Entity par1Entity, World aWorld, int aX, int aY, int aZ, double explosionX, double explosionY, double explosionZ) {
- return 1.0F + getHarvestLevel(aWorld.getBlockMetadata(aX, aY, aZ)) * 1.0F;
- }
-
- protected boolean canSilkHarvest() {
- return false;
- }
-
- public String getUnlocalizedName() {
- return "gt.blockores";
- }
-
- public String getLocalizedName() {
- return StatCollector.translateToLocal(getUnlocalizedName() + ".name");
- }
-
- public int getRenderType() {
- if (GT_Renderer_Block.INSTANCE == null) {
- return super.getRenderType();
- }
- return GT_Renderer_Block.INSTANCE.mRenderID;
- }
-
- public boolean canBeReplacedByLeaves(IBlockAccess aWorld, int aX, int aY, int aZ) {
- return false;
- }
-
- public boolean isNormalCube(IBlockAccess aWorld, int aX, int aY, int aZ) {
- return true;
- }
-
- public boolean hasTileEntity(int aMeta) {
- return true;
- }
-
- public boolean renderAsNormalBlock() {
- return true;
- }
-
- public boolean isOpaqueCube() {
- return true;
- }
-
- public TileEntity createNewTileEntity(World aWorld, int aMeta) {
- return createTileEntity(aWorld, aMeta);
- }
-
- public IIcon getIcon(IBlockAccess aIBlockAccess, int aX, int aY, int aZ, int aSide) {
- return Blocks.stone.getIcon(0, 0);
- }
-
- public IIcon getIcon(int aSide, int aMeta) {
- return Blocks.stone.getIcon(0, 0);
- }
-
- @SideOnly(Side.CLIENT)
- public void registerBlockIcons(IIconRegister aIconRegister) {
- }
-
- public int getDamageValue(World aWorld, int aX, int aY, int aZ) {
- TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
- if ((tTileEntity != null) && ((tTileEntity instanceof GT_TileEntity_Ores))) {
- return ((GT_TileEntity_Ores) tTileEntity).getMetaData();
- }
- return 0;
- }
-
- public void breakBlock(World aWorld, int aX, int aY, int aZ, Block par5, int par6) {
- TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
- if ((tTileEntity instanceof GT_TileEntity_Ores)) {
- mTemporaryTileEntity.set((GT_TileEntity_Ores) tTileEntity);
- }
- super.breakBlock(aWorld, aX, aY, aZ, par5, par6);
- aWorld.removeTileEntity(aX, aY, aZ);
- }
-
- public ArrayList<ItemStack> getDrops(World aWorld, int aX, int aY, int aZ, int aMeta, int aFortune) {
- TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
- if ((tTileEntity instanceof GT_TileEntity_Ores)) {
- return ((GT_TileEntity_Ores) tTileEntity).getDrops(aFortune);
- }
- return mTemporaryTileEntity.get() == null ? new ArrayList() : ((GT_TileEntity_Ores) mTemporaryTileEntity.get()).getDrops(aFortune);
- }
-
- public TileEntity createTileEntity(World aWorld, int aMeta) {
- return new GT_TileEntity_Ores();
- }
-
- @SideOnly(Side.CLIENT)
- public void getSubBlocks(Item aItem, CreativeTabs aTab, List aList) {
- for (int i = 0; i < GregTech_API.sGeneratedMaterials.length; i++) {
- Materials tMaterial = GregTech_API.sGeneratedMaterials[i];
- if ((tMaterial != null) && ((tMaterial.mTypes & 0x8) != 0)) {
- aList.add(new ItemStack(aItem, 1, i));
- aList.add(new ItemStack(aItem, 1, i + 1000));
- aList.add(new ItemStack(aItem, 1, i + 2000));
- aList.add(new ItemStack(aItem, 1, i + 3000));
- aList.add(new ItemStack(aItem, 1, i + 4000));
- aList.add(new ItemStack(aItem, 1, i + 16000));
- aList.add(new ItemStack(aItem, 1, i + 17000));
- aList.add(new ItemStack(aItem, 1, i + 18000));
- aList.add(new ItemStack(aItem, 1, i + 19000));
- aList.add(new ItemStack(aItem, 1, i + 20000));
- }
- }
- }
-}
+package gregtech.common.blocks;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.items.GT_Generic_Block;
+import gregtech.api.util.GT_LanguageManager;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.common.render.GT_Renderer_Block;
+import net.minecraft.block.Block;
+import net.minecraft.block.ITileEntityProvider;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.boss.EntityDragon;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.IIcon;
+import net.minecraft.util.StatCollector;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class GT_Block_Ores
+ extends GT_Generic_Block
+ implements ITileEntityProvider {
+ public static ThreadLocal<GT_TileEntity_Ores> mTemporaryTileEntity = new ThreadLocal();
+ public static boolean FUCKING_LOCK = false;
+
+ public GT_Block_Ores() {
+ super(GT_Item_Ores.class, "gt.blockores", Material.rock);
+ this.isBlockContainer = true;
+ setStepSound(soundTypeStone);
+ setCreativeTab(GregTech_API.TAB_GREGTECH_ORES);
+ for (int i = 0; i < 16; i++) {
+ GT_ModHandler.addValuableOre(this, i, 1);
+ }
+ for (int i = 1; i < GregTech_API.sGeneratedMaterials.length; i++) {
+ if (GregTech_API.sGeneratedMaterials[i] != null) {
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + i + ".name", getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 1000) + ".name", getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 2000) + ".name", getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 3000) + ".name", getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 4000) + ".name", getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 16000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 17000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 18000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 19000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + 20000) + ".name", "Small " + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
+ if ((GregTech_API.sGeneratedMaterials[i].mTypes & 0x8) != 0) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.ore.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i));
+ GT_OreDictUnificator.registerOre(OrePrefixes.oreNetherrack.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i + 1000));
+ GT_OreDictUnificator.registerOre(OrePrefixes.oreEndstone.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i + 2000));
+ GT_OreDictUnificator.registerOre(OrePrefixes.oreBlackgranite.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i + 3000));
+ GT_OreDictUnificator.registerOre(OrePrefixes.oreRedgranite.get(GregTech_API.sGeneratedMaterials[i]), new ItemStack(this, 1, i + 4000));
+ }
+ }
+ }
+ }
+
+ public void onNeighborChange(IBlockAccess aWorld, int aX, int aY, int aZ, int aTileX, int aTileY, int aTileZ) {
+ if (!FUCKING_LOCK) {
+ FUCKING_LOCK = true;
+ TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
+ if ((tTileEntity instanceof GT_TileEntity_Ores)) {
+ ((GT_TileEntity_Ores) tTileEntity).onUpdated();
+ }
+ }
+ FUCKING_LOCK = false;
+ }
+
+ public void onNeighborBlockChange(World aWorld, int aX, int aY, int aZ, Block aBlock) {
+ if (!FUCKING_LOCK) {
+ FUCKING_LOCK = true;
+ TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
+ if ((tTileEntity instanceof GT_TileEntity_Ores)) {
+ ((GT_TileEntity_Ores) tTileEntity).onUpdated();
+ }
+ }
+ FUCKING_LOCK = false;
+ }
+
+ public String getLocalizedName(Materials aMaterial) {
+ switch (aMaterial) {
+ case InfusedAir:
+ case InfusedDull:
+ case InfusedEarth:
+ case InfusedEntropy:
+ case InfusedFire:
+ case InfusedOrder:
+ case InfusedVis:
+ case InfusedWater:
+ return aMaterial.mDefaultLocalName + " Infused Stone";
+ case Vermiculite:
+ case Bentonite:
+ case Kaolinite:
+ case Talc:
+ case BasalticMineralSand:
+ case GraniticMineralSand:
+ case GlauconiteSand:
+ case CassiteriteSand:
+ case GarnetSand:
+ case QuartzSand:
+ case Pitchblende:
+ case FullersEarth:
+ return aMaterial.mDefaultLocalName;
+ default:
+ return aMaterial.mDefaultLocalName + OrePrefixes.ore.mLocalizedMaterialPost;
+ }
+ }
+
+ public boolean onBlockEventReceived(World p_149696_1_, int p_149696_2_, int p_149696_3_, int p_149696_4_, int p_149696_5_, int p_149696_6_) {
+ super.onBlockEventReceived(p_149696_1_, p_149696_2_, p_149696_3_, p_149696_4_, p_149696_5_, p_149696_6_);
+ TileEntity tileentity = p_149696_1_.getTileEntity(p_149696_2_, p_149696_3_, p_149696_4_);
+ return tileentity != null ? tileentity.receiveClientEvent(p_149696_5_, p_149696_6_) : false;
+ }
+
+ public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) {
+ return (!(entity instanceof EntityDragon)) && (super.canEntityDestroy(world, x, y, z, entity));
+ }
+
+ public String getHarvestTool(int aMeta) {
+ return aMeta < 8 ? "pickaxe" : "shovel";
+ }
+
+ public int getHarvestLevel(int aMeta) {
+ return aMeta % 8;
+ }
+
+ public float getBlockHardness(World aWorld, int aX, int aY, int aZ) {
+ return 1.0F + getHarvestLevel(aWorld.getBlockMetadata(aX, aY, aZ)) * 1.0F;
+ }
+
+ public float getExplosionResistance(Entity par1Entity, World aWorld, int aX, int aY, int aZ, double explosionX, double explosionY, double explosionZ) {
+ return 1.0F + getHarvestLevel(aWorld.getBlockMetadata(aX, aY, aZ)) * 1.0F;
+ }
+
+ protected boolean canSilkHarvest() {
+ return false;
+ }
+
+ public String getUnlocalizedName() {
+ return "gt.blockores";
+ }
+
+ public String getLocalizedName() {
+ return StatCollector.translateToLocal(getUnlocalizedName() + ".name");
+ }
+
+ public int getRenderType() {
+ if (GT_Renderer_Block.INSTANCE == null) {
+ return super.getRenderType();
+ }
+ return GT_Renderer_Block.INSTANCE.mRenderID;
+ }
+
+ public boolean canBeReplacedByLeaves(IBlockAccess aWorld, int aX, int aY, int aZ) {
+ return false;
+ }
+
+ public boolean isNormalCube(IBlockAccess aWorld, int aX, int aY, int aZ) {
+ return true;
+ }
+
+ public boolean hasTileEntity(int aMeta) {
+ return true;
+ }
+
+ public boolean renderAsNormalBlock() {
+ return true;
+ }
+
+ public boolean isOpaqueCube() {
+ return true;
+ }
+
+ public TileEntity createNewTileEntity(World aWorld, int aMeta) {
+ return createTileEntity(aWorld, aMeta);
+ }
+
+ public IIcon getIcon(IBlockAccess aIBlockAccess, int aX, int aY, int aZ, int aSide) {
+ return Blocks.stone.getIcon(0, 0);
+ }
+
+ public IIcon getIcon(int aSide, int aMeta) {
+ return Blocks.stone.getIcon(0, 0);
+ }
+
+ @SideOnly(Side.CLIENT)
+ public void registerBlockIcons(IIconRegister aIconRegister) {
+ }
+
+ public int getDamageValue(World aWorld, int aX, int aY, int aZ) {
+ TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
+ if ((tTileEntity != null) && ((tTileEntity instanceof GT_TileEntity_Ores))) {
+ return ((GT_TileEntity_Ores) tTileEntity).getMetaData();
+ }
+ return 0;
+ }
+
+ public void breakBlock(World aWorld, int aX, int aY, int aZ, Block par5, int par6) {
+ TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
+ if ((tTileEntity instanceof GT_TileEntity_Ores)) {
+ mTemporaryTileEntity.set((GT_TileEntity_Ores) tTileEntity);
+ }
+ super.breakBlock(aWorld, aX, aY, aZ, par5, par6);
+ aWorld.removeTileEntity(aX, aY, aZ);
+ }
+
+ public ArrayList<ItemStack> getDrops(World aWorld, int aX, int aY, int aZ, int aMeta, int aFortune) {
+ TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
+ if ((tTileEntity instanceof GT_TileEntity_Ores)) {
+ return ((GT_TileEntity_Ores) tTileEntity).getDrops(aFortune);
+ }
+ return mTemporaryTileEntity.get() == null ? new ArrayList() : ((GT_TileEntity_Ores) mTemporaryTileEntity.get()).getDrops(aFortune);
+ }
+
+ public TileEntity createTileEntity(World aWorld, int aMeta) {
+ return new GT_TileEntity_Ores();
+ }
+
+ @SideOnly(Side.CLIENT)
+ public void getSubBlocks(Item aItem, CreativeTabs aTab, List aList) {
+ for (int i = 0; i < GregTech_API.sGeneratedMaterials.length; i++) {
+ Materials tMaterial = GregTech_API.sGeneratedMaterials[i];
+ if ((tMaterial != null) && ((tMaterial.mTypes & 0x8) != 0)) {
+ aList.add(new ItemStack(aItem, 1, i));
+ aList.add(new ItemStack(aItem, 1, i + 1000));
+ aList.add(new ItemStack(aItem, 1, i + 2000));
+ aList.add(new ItemStack(aItem, 1, i + 3000));
+ aList.add(new ItemStack(aItem, 1, i + 4000));
+ aList.add(new ItemStack(aItem, 1, i + 16000));
+ aList.add(new ItemStack(aItem, 1, i + 17000));
+ aList.add(new ItemStack(aItem, 1, i + 18000));
+ aList.add(new ItemStack(aItem, 1, i + 19000));
+ aList.add(new ItemStack(aItem, 1, i + 20000));
+ }
+ }
+ }
+}
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java
new file mode 100644
index 0000000000..a8547669db
--- /dev/null
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Reinforced.java
@@ -0,0 +1,190 @@
+package gregtech.common.blocks;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.Textures;
+import gregtech.api.items.GT_Generic_Block;
+import gregtech.api.util.GT_LanguageManager;
+import gregtech.api.util.GT_ModHandler;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EnumCreatureType;
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+import net.minecraft.util.StatCollector;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+
+import java.util.List;
+import java.util.Random;
+
+public class GT_Block_Reinforced extends GT_Generic_Block {
+
+ public GT_Block_Reinforced(String aName) {
+ super(GT_Item_Storage.class, aName, Material.rock);
+ setStepSound(soundTypeStone);
+ setCreativeTab(GregTech_API.TAB_GREGTECH);
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Bronzeplate Reinforced Block");
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Iridium-Tungstensteel Reinforced Block");
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Plascrete Block");
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Tungstensteel Reinforced Block");
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Brittle Charcoal");
+ ItemList.Block_BronzePlate.set(new ItemStack(this.setHardness(60.0f).setResistance(150.0f), 1, 0));
+ ItemList.Block_IridiumTungstensteel.set(new ItemStack(this.setHardness(200.0f).setResistance(600.0f), 1, 1));
+ ItemList.Block_Plascrete.set(new ItemStack(this.setHardness(80.0f).setResistance(350.0f), 1, 2));
+ ItemList.Block_TungstenSteelReinforced.set(new ItemStack(this.setHardness(100.0f).setResistance(400.0f), 1, 3));
+ ItemList.Block_BrittleCharcoal.set(new ItemStack(this.setHardness(0.5f).setResistance(8.0f), 1, 4));
+ GT_ModHandler.addCraftingRecipe(ItemList.Block_BronzePlate.get(1L, new Object[0]), new Object[]{"hP ", "PBP", " P ", 'P', OrePrefixes.plate.get(Materials.Bronze), 'B', OrePrefixes.stone.get(Materials.GraniteBlack)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Block_BronzePlate.get(1L, new Object[0]), new Object[]{"hP ", "PBP", " P ", 'P', OrePrefixes.plate.get(Materials.Bronze), 'B', OrePrefixes.stone.get(Materials.GraniteRed)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Block_IridiumTungstensteel.get(1L, new Object[0]), new Object[]{"hBP", 'P', OrePrefixes.plate.get(Materials.Iridium), 'B', ItemList.Block_TungstenSteelReinforced.get(1L, new Object[0])});
+ GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(Items.coal, 1, 1), new Object[]{ItemList.Block_BrittleCharcoal.get(1, new Object[0])});
+ }
+
+ public String getHarvestTool(int aMeta) {
+ if (aMeta == 4) return "axe";
+ return "pickaxe";
+ }
+
+ public int getHarvestLevel(int aMeta) {
+ if (aMeta == 4) return 1;
+ return 4;
+ }
+
+ public IIcon getIcon(int aSide, int aMeta) {
+ if ((aMeta >= 0) && (aMeta < 16)) {
+ switch (aMeta) {
+ case 0:
+ return Textures.BlockIcons.BLOCK_BRONZEPREIN.getIcon();
+ case 1:
+ return Textures.BlockIcons.BLOCK_IRREIN.getIcon();
+ case 2:
+ return Textures.BlockIcons.BLOCK_PLASCRETE.getIcon();
+ case 3:
+ return Textures.BlockIcons.BLOCK_TSREIN.getIcon();
+ case 4:
+ return Blocks.coal_block.getIcon(0, 0);
+ }
+ }
+ return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon();
+ }
+
+ public float getBlockHardness(World aWorld, int aX, int aY, int aZ) {
+ if (aWorld == null) {
+ return 0.0F;
+ }
+ int tMeta = aWorld.getBlockMetadata(aX, aY, aZ);
+ if (tMeta == 0) {
+ return 60.0F;
+ }
+ if (tMeta == 1) {
+ return 200.0F;
+ }
+ if (tMeta == 2) {
+ return 80.0F;
+ }
+ if (tMeta == 3) {
+ return 100.0F;
+ }
+ if (tMeta == 4) {
+ return 0.5F;
+ }
+ return Blocks.iron_block.getBlockHardness(aWorld, aX, aY, aZ);
+ }
+
+ public float getExplosionResistance(Entity par1Entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ) {
+ if (world == null) {
+ return 0.0F;
+ }
+ int tMeta = world.getBlockMetadata(x, y, z);
+ if (tMeta == 0) {
+ return 150.0F;
+ }
+ if (tMeta == 1) {
+ return 600.0F;
+ }
+ if (tMeta == 2) {
+ return 350.0F;
+ }
+ if (tMeta == 3) {
+ return 400.0F;
+ }
+ if (tMeta == 4) {
+ return 8.0F;
+ }
+ return super.getExplosionResistance(par1Entity, world, x, y, z, explosionX, explosionY, explosionZ);
+ }
+
+ public String getUnlocalizedName() {
+ return this.mUnlocalizedName;
+ }
+
+ public String getLocalizedName() {
+ return StatCollector.translateToLocal(this.mUnlocalizedName + ".name");
+ }
+
+ public boolean canBeReplacedByLeaves(IBlockAccess aWorld, int aX, int aY, int aZ) {
+ return false;
+ }
+
+ public boolean isNormalCube(IBlockAccess aWorld, int aX, int aY, int aZ) {
+ return true;
+ }
+
+ public boolean renderAsNormalBlock() {
+ return true;
+ }
+
+ public boolean isOpaqueCube() {
+ return true;
+ }
+
+ public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) {
+ return true;
+ }
+
+ public int damageDropped(int par1) {
+ return par1;
+ }
+
+ public int getDamageValue(World par1World, int par2, int par3, int par4) {
+ return par1World.getBlockMetadata(par2, par3, par4);
+ }
+
+ public int quantityDropped(Random par1Random) {
+ return 1;
+ }
+
+ public Item getItemDropped(int par1, Random par2Random, int par3) {
+ return Item.getItemFromBlock(this);
+ }
+
+ public void dropBlockAsItemWithChance(World aWorld, int aX, int aY, int aZ, int par5, float chance, int par7) {
+ if (par5 == 4) {
+ Random ran = new Random();
+
+ this.dropBlockAsItem(aWorld, aX, aY, aZ, new ItemStack(Items.coal, ran.nextInt(2) + 1, 1));
+ } else {
+ super.dropBlockAsItemWithChance(aWorld, aX, aY, aZ, par5, chance, par7);
+ }
+ }
+
+ @SideOnly(Side.CLIENT)
+ public void registerBlockIcons(IIconRegister aIconRegister) {
+ }
+
+ @SideOnly(Side.CLIENT)
+ public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) {
+ for (int i = 0; i < 16; i++) {
+ aList.add(new ItemStack(aItem, 1, i));
+ }
+ }
+}
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Storage.java b/src/main/java/gregtech/common/blocks/GT_Block_Storage.java
new file mode 100644
index 0000000000..e2272a6503
--- /dev/null
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Storage.java
@@ -0,0 +1,101 @@
+package gregtech.common.blocks;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.GregTech_API;
+import gregtech.api.items.GT_Generic_Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EnumCreatureType;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.StatCollector;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+
+import java.util.List;
+import java.util.Random;
+
+public class GT_Block_Storage extends GT_Generic_Block {
+
+ protected GT_Block_Storage(Class<? extends ItemBlock> aItemClass, String aName, Material aMaterial) {
+ super(aItemClass, aName, aMaterial);
+ setStepSound(soundTypeMetal);
+ setCreativeTab(GregTech_API.TAB_GREGTECH_MATERIALS);
+ }
+
+ public String getHarvestTool(int aMeta) {
+ return "pickaxe";
+ }
+
+ public int getHarvestLevel(int aMeta) {
+ return 1;
+ }
+
+ public float getBlockHardness(World aWorld, int aX, int aY, int aZ) {
+ return Blocks.iron_block.getBlockHardness(aWorld, aX, aY, aZ);
+ }
+
+ public float getExplosionResistance(Entity aTNT) {
+ return Blocks.iron_block.getExplosionResistance(aTNT);
+ }
+
+ public String getUnlocalizedName() {
+ return this.mUnlocalizedName;
+ }
+
+ public String getLocalizedName() {
+ return StatCollector.translateToLocal(this.mUnlocalizedName + ".name");
+ }
+
+ public boolean canBeReplacedByLeaves(IBlockAccess aWorld, int aX, int aY, int aZ) {
+ return false;
+ }
+
+ public boolean isNormalCube(IBlockAccess aWorld, int aX, int aY, int aZ) {
+ return true;
+ }
+
+ public boolean renderAsNormalBlock() {
+ return true;
+ }
+
+ public boolean isOpaqueCube() {
+ return true;
+ }
+
+ public boolean canCreatureSpawn(EnumCreatureType type, IBlockAccess world, int x, int y, int z) {
+ return true;
+ }
+
+ public int damageDropped(int par1) {
+ return par1;
+ }
+
+ public int getDamageValue(World par1World, int par2, int par3, int par4) {
+ return par1World.getBlockMetadata(par2, par3, par4);
+ }
+
+ public int quantityDropped(Random par1Random) {
+ return 1;
+ }
+
+ public Item getItemDropped(int par1, Random par2Random, int par3) {
+ return Item.getItemFromBlock(this);
+ }
+
+ @SideOnly(Side.CLIENT)
+ public void registerBlockIcons(IIconRegister aIconRegister) {
+ }
+
+ @SideOnly(Side.CLIENT)
+ public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) {
+ for (int i = 0; i < 16; i++) {
+ aList.add(new ItemStack(aItem, 1, i));
+ }
+ }
+}
diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Storage.java b/src/main/java/gregtech/common/blocks/GT_Item_Storage.java
new file mode 100644
index 0000000000..6dccff429a
--- /dev/null
+++ b/src/main/java/gregtech/common/blocks/GT_Item_Storage.java
@@ -0,0 +1,30 @@
+package gregtech.common.blocks;
+
+import gregtech.api.GregTech_API;
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+
+import java.util.List;
+
+public class GT_Item_Storage extends ItemBlock {
+ public GT_Item_Storage(Block par1) {
+ super(par1);
+ setMaxDamage(0);
+ setHasSubtypes(true);
+ setCreativeTab(GregTech_API.TAB_GREGTECH_MATERIALS);
+ }
+
+ public String getUnlocalizedName(ItemStack aStack) {
+ return this.field_150939_a.getUnlocalizedName() + "." + getDamage(aStack);
+ }
+
+ public int getMetadata(int aMeta) {
+ return aMeta;
+ }
+
+ public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) {
+ super.addInformation(aStack, aPlayer, aList, aF3_H);
+ }
+} \ No newline at end of file
diff --git a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java
index c8706776b2..6d70067eaf 100644
--- a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java
+++ b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java
@@ -1,222 +1,228 @@
-package gregtech.common.blocks;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.enums.Textures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.ITexturedTileEntity;
-import gregtech.api.objects.GT_CopiedBlockTexture;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.network.Packet;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-
-import java.util.ArrayList;
-import java.util.Random;
-
-public class GT_TileEntity_Ores
- extends TileEntity
- implements ITexturedTileEntity {
- private static final ITexture[] mStoneTextures = {new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.netherrack, 0, 0), new GT_CopiedBlockTexture(Blocks.end_stone, 0, 0), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_BLACK_STONE), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_RED_STONE), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0)};
- public short mMetaData = 0;
- public boolean mNatural = false;
- public boolean mBlocked = true;
-
- public static byte getHarvestData(short aMetaData) {
- Materials aMaterial = GregTech_API.sGeneratedMaterials[(aMetaData % 1000)];
- return aMaterial == null ? 0 : (byte) Math.max((aMetaData % 16000 / 1000 == 3) || (aMetaData % 16000 / 1000 == 4) ? 3 : 0, Math.min(7, aMaterial.mToolQuality - (aMetaData < 16000 ? 0 : 1)));
- }
-
- public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData) {
- aY = Math.min(aWorld.getActualHeight(), Math.max(aY, 1));
- Block tBlock = aWorld.getBlock(aX, aY, aZ);
- if ((aMetaData > 0) && (tBlock != Blocks.air)) {
- if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack)) {
- aMetaData += 1000;
- } else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone)) {
- aMetaData += 2000;
- } else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites)) {
- if (tBlock == GregTech_API.sBlockGranites) {
- if (aWorld.getBlockMetadata(aX, aY, aZ) < 8) {
- aMetaData += 3000;
- } else {
- aMetaData += 4000;
- }
- } else {
- aMetaData += 3000;
- }
- } else if (!tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone)) {
- return false;
- }
- aWorld.setBlock(aX, aY, aZ, GregTech_API.sBlockOres1, getHarvestData((short) aMetaData), 0);
- TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
- if ((tTileEntity instanceof GT_TileEntity_Ores)) {
- ((GT_TileEntity_Ores) tTileEntity).mMetaData = ((short) aMetaData);
- ((GT_TileEntity_Ores) tTileEntity).mNatural = true;
- }
- return true;
- }
- return false;
- }
-
- public void readFromNBT(NBTTagCompound aNBT) {
- super.readFromNBT(aNBT);
- this.mMetaData = aNBT.getShort("m");
- this.mNatural = aNBT.getBoolean("n");
- }
-
- public void writeToNBT(NBTTagCompound aNBT) {
- super.writeToNBT(aNBT);
- aNBT.setShort("m", this.mMetaData);
- aNBT.setBoolean("n", this.mNatural);
- }
-
- public void onUpdated() {
- if ((!this.worldObj.isRemote) && (this.mBlocked)) {
- this.mBlocked = false;
- GT_Values.NW.sendPacketToAllPlayersInRange(this.worldObj, new GT_Packet_Ores(this.xCoord, (short) this.yCoord, this.zCoord, this.mMetaData), this.xCoord, this.zCoord);
- }
- }
-
- public Packet getDescriptionPacket() {
- if (!this.worldObj.isRemote) {
- if ((this.mBlocked == (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord + 1, this.yCoord, this.zCoord)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord - 1, this.yCoord, this.zCoord)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord + 1, this.zCoord)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord - 1, this.zCoord)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord, this.zCoord + 1)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord, this.zCoord - 1)) ? 1 : 0) == 0) {
- GT_Values.NW.sendPacketToAllPlayersInRange(this.worldObj, new GT_Packet_Ores(this.xCoord, (short) this.yCoord, this.zCoord, this.mMetaData), this.xCoord, this.zCoord);
- }
- }
- return null;
- }
-
- public void overrideOreBlockMaterial(Block aOverridingStoneBlock, byte aOverridingStoneMeta) {
- this.mMetaData = ((short) (int) (this.mMetaData % 1000L + this.mMetaData / 16000L * 16000L));
- if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.netherrack)) {
- this.mMetaData = ((short) (this.mMetaData + 1000));
- } else if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.end_stone)) {
- this.mMetaData = ((short) (this.mMetaData + 2000));
- } else if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, GregTech_API.sBlockGranites)) {
- if (aOverridingStoneBlock == GregTech_API.sBlockGranites) {
- if (aOverridingStoneMeta < 8) {
- this.mMetaData = ((short) (this.mMetaData + 3000));
- } else {
- this.mMetaData = ((short) (this.mMetaData + 4000));
- }
- } else {
- this.mMetaData = ((short) (this.mMetaData + 3000));
- }
- }
- this.worldObj.setBlockMetadataWithNotify(this.xCoord, this.yCoord, this.zCoord, getHarvestData(this.mMetaData), 0);
- }
-
- public short getMetaData() {
- return this.mMetaData;
- }
-
- public boolean canUpdate() {
- return false;
- }
-
- public ArrayList<ItemStack> getDrops(int aFortune) {
- ArrayList<ItemStack> rList = new ArrayList();
- if (this.mMetaData <= 0) {
- rList.add(new ItemStack(Blocks.cobblestone, 1, 0));
- return rList;
- }
- if (this.mMetaData < 16000) {
- rList.add(new ItemStack(GregTech_API.sBlockOres1, 1, this.mMetaData));
- return rList;
- }
- Materials aMaterial = GregTech_API.sGeneratedMaterials[(this.mMetaData % 1000)];
- if (!this.mNatural) {
- aFortune = 0;
- }
- if (aMaterial != null) {
- Random tRandom = new Random(this.xCoord ^ this.yCoord ^ this.zCoord);
- ArrayList<ItemStack> tSelector = new ArrayList();
-
-
- ItemStack tStack = GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L);
- if (tStack != null) {
- for (int i = 0; i < 1; i++) {
- tSelector.add(tStack);
- }
- }
- tStack = GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L);
- if (tStack != null) {
- for (int i = 0; i < 2; i++) {
- tSelector.add(tStack);
- }
- }
- tStack = GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L);
- if (tStack != null) {
- for (int i = 0; i < 12; i++) {
- tSelector.add(tStack);
- }
- }
- tStack = GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L), 1L);
- if (tStack != null) {
- for (int i = 0; i < 5; i++) {
- tSelector.add(tStack);
- }
- }
- tStack = GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L);
- if (tStack != null) {
- for (int i = 0; i < 10; i++) {
- tSelector.add(tStack);
- }
- }
- tStack = GT_OreDictUnificator.get(OrePrefixes.gemChipped, aMaterial, GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), 1L);
- if (tStack != null) {
- for (int i = 0; i < 5; i++) {
- tSelector.add(tStack);
- }
- }
- tStack = GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L);
- if (tStack != null) {
- for (int i = 0; i < 10; i++) {
- tSelector.add(tStack);
- }
- }
- if (tSelector.size() > 0) {
- int i = 0;
- for (int j = Math.max(1, aMaterial.mOreMultiplier + (aFortune > 0 ? tRandom.nextInt(1 + aFortune * aMaterial.mOreMultiplier) : 0) / 2); i < j; i++) {
- rList.add(GT_Utility.copyAmount(1L, new Object[]{tSelector.get(tRandom.nextInt(tSelector.size()))}));
- }
- }
- if (tRandom.nextInt(3 + aFortune) > 1) {
- switch (this.mMetaData / 1000 % 16) {
- case 0:
- rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Stone, 1L));
- break;
- case 1:
- rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Netherrack, 1L));
- break;
- case 2:
- rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Endstone, 1L));
- break;
- case 3:
- rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.GraniteBlack, 1L));
- break;
- case 4:
- rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.GraniteRed, 1L));
- }
- }
- }
- return rList;
- }
-
- public ITexture[] getTexture(byte aSide) {
- Materials aMaterial = GregTech_API.sGeneratedMaterials[(this.mMetaData % 1000)];
- if ((aMaterial != null) && (this.mMetaData < 32000)) {
- return new ITexture[]{mStoneTextures[(this.mMetaData / 1000 % 16)], new GT_RenderedTexture(aMaterial.mIconSet.mTextures[this.mMetaData / 16000 == 0 ? OrePrefixes.ore.mTextureIndex : OrePrefixes.oreSmall.mTextureIndex], aMaterial.mRGBa)};
- }
- return new ITexture[]{mStoneTextures[0], new GT_RenderedTexture(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.ore.mTextureIndex])};
- }
-}
+package gregtech.common.blocks;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.Textures;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.tileentity.ITexturedTileEntity;
+import gregtech.api.objects.GT_CopiedBlockTexture;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Utility;
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.network.Packet;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.World;
+
+import java.util.ArrayList;
+import java.util.Random;
+
+public class GT_TileEntity_Ores
+ extends TileEntity
+ implements ITexturedTileEntity {
+ private static final ITexture[] mStoneTextures = {new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.netherrack, 0, 0), new GT_CopiedBlockTexture(Blocks.end_stone, 0, 0), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_BLACK_STONE), new GT_RenderedTexture(Textures.BlockIcons.GRANITE_RED_STONE), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0), new GT_CopiedBlockTexture(Blocks.stone, 0, 0)};
+ public short mMetaData = 0;
+ public boolean mNatural = false;
+ public boolean mBlocked = true;
+
+ public static byte getHarvestData(short aMetaData) {
+ Materials aMaterial = GregTech_API.sGeneratedMaterials[(aMetaData % 1000)];
+ return aMaterial == null ? 0 : (byte) Math.max((aMetaData % 16000 / 1000 == 3) || (aMetaData % 16000 / 1000 == 4) ? 3 : 0, Math.min(7, aMaterial.mToolQuality - (aMetaData < 16000 ? 0 : 1)));
+ }
+
+ public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData) {
+ return setOreBlock(aWorld, aX, aY, aZ, aMetaData, false);
+ }
+
+ public static boolean setOreBlock(World aWorld, int aX, int aY, int aZ, int aMetaData, boolean air) {
+ if (!air) {
+ aY = Math.min(aWorld.getActualHeight(), Math.max(aY, 1));
+ }
+ Block tBlock = aWorld.getBlock(aX, aY, aZ);
+ if ((aMetaData > 0) && ((tBlock != Blocks.air) || air)) {
+ if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.netherrack)) {
+ aMetaData += 1000;
+ } else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.end_stone)) {
+ aMetaData += 2000;
+ } else if (tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, GregTech_API.sBlockGranites)) {
+ if (tBlock == GregTech_API.sBlockGranites) {
+ if (aWorld.getBlockMetadata(aX, aY, aZ) < 8) {
+ aMetaData += 3000;
+ } else {
+ aMetaData += 4000;
+ }
+ } else {
+ aMetaData += 3000;
+ }
+ } else if (!tBlock.isReplaceableOreGen(aWorld, aX, aY, aZ, Blocks.stone)) {
+ return false;
+ }
+ aWorld.setBlock(aX, aY, aZ, GregTech_API.sBlockOres1, getHarvestData((short) aMetaData), 0);
+ TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
+ if ((tTileEntity instanceof GT_TileEntity_Ores)) {
+ ((GT_TileEntity_Ores) tTileEntity).mMetaData = ((short) aMetaData);
+ ((GT_TileEntity_Ores) tTileEntity).mNatural = true;
+ }
+ return true;
+ }
+ return false;
+ }
+
+ public void readFromNBT(NBTTagCompound aNBT) {
+ super.readFromNBT(aNBT);
+ this.mMetaData = aNBT.getShort("m");
+ this.mNatural = aNBT.getBoolean("n");
+ }
+
+ public void writeToNBT(NBTTagCompound aNBT) {
+ super.writeToNBT(aNBT);
+ aNBT.setShort("m", this.mMetaData);
+ aNBT.setBoolean("n", this.mNatural);
+ }
+
+ public void onUpdated() {
+ if ((!this.worldObj.isRemote) && (this.mBlocked)) {
+ this.mBlocked = false;
+ GT_Values.NW.sendPacketToAllPlayersInRange(this.worldObj, new GT_Packet_Ores(this.xCoord, (short) this.yCoord, this.zCoord, this.mMetaData), this.xCoord, this.zCoord);
+ }
+ }
+
+ public Packet getDescriptionPacket() {
+ if (!this.worldObj.isRemote) {
+ if ((this.mBlocked == (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord + 1, this.yCoord, this.zCoord)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord - 1, this.yCoord, this.zCoord)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord + 1, this.zCoord)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord - 1, this.zCoord)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord, this.zCoord + 1)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord, this.zCoord - 1)) ? 1 : 0) == 0) {
+ GT_Values.NW.sendPacketToAllPlayersInRange(this.worldObj, new GT_Packet_Ores(this.xCoord, (short) this.yCoord, this.zCoord, this.mMetaData), this.xCoord, this.zCoord);
+ }
+ }
+ return null;
+ }
+
+ public void overrideOreBlockMaterial(Block aOverridingStoneBlock, byte aOverridingStoneMeta) {
+ this.mMetaData = ((short) (int) (this.mMetaData % 1000L + this.mMetaData / 16000L * 16000L));
+ if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.netherrack)) {
+ this.mMetaData = ((short) (this.mMetaData + 1000));
+ } else if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.end_stone)) {
+ this.mMetaData = ((short) (this.mMetaData + 2000));
+ } else if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, GregTech_API.sBlockGranites)) {
+ if (aOverridingStoneBlock == GregTech_API.sBlockGranites) {
+ if (aOverridingStoneMeta < 8) {
+ this.mMetaData = ((short) (this.mMetaData + 3000));
+ } else {
+ this.mMetaData = ((short) (this.mMetaData + 4000));
+ }
+ } else {
+ this.mMetaData = ((short) (this.mMetaData + 3000));
+ }
+ }
+ this.worldObj.setBlockMetadataWithNotify(this.xCoord, this.yCoord, this.zCoord, getHarvestData(this.mMetaData), 0);
+ }
+
+ public short getMetaData() {
+ return this.mMetaData;
+ }
+
+ public boolean canUpdate() {
+ return false;
+ }
+
+ public ArrayList<ItemStack> getDrops(int aFortune) {
+ ArrayList<ItemStack> rList = new ArrayList();
+ if (this.mMetaData <= 0) {
+ rList.add(new ItemStack(Blocks.cobblestone, 1, 0));
+ return rList;
+ }
+ if (this.mMetaData < 16000) {
+ rList.add(new ItemStack(GregTech_API.sBlockOres1, 1, this.mMetaData));
+ return rList;
+ }
+ Materials aMaterial = GregTech_API.sGeneratedMaterials[(this.mMetaData % 1000)];
+ if (!this.mNatural) {
+ aFortune = 0;
+ }
+ if (aMaterial != null) {
+ Random tRandom = new Random(this.xCoord ^ this.yCoord ^ this.zCoord);
+ ArrayList<ItemStack> tSelector = new ArrayList();
+
+
+ ItemStack tStack = GT_OreDictUnificator.get(OrePrefixes.gemExquisite, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L);
+ if (tStack != null) {
+ for (int i = 0; i < 1; i++) {
+ tSelector.add(tStack);
+ }
+ }
+ tStack = GT_OreDictUnificator.get(OrePrefixes.gemFlawless, aMaterial, GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L), 1L);
+ if (tStack != null) {
+ for (int i = 0; i < 2; i++) {
+ tSelector.add(tStack);
+ }
+ }
+ tStack = GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L);
+ if (tStack != null) {
+ for (int i = 0; i < 12; i++) {
+ tSelector.add(tStack);
+ }
+ }
+ tStack = GT_OreDictUnificator.get(OrePrefixes.gemFlawed, aMaterial, GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L), 1L);
+ if (tStack != null) {
+ for (int i = 0; i < 5; i++) {
+ tSelector.add(tStack);
+ }
+ }
+ tStack = GT_OreDictUnificator.get(OrePrefixes.crushed, aMaterial, 1L);
+ if (tStack != null) {
+ for (int i = 0; i < 10; i++) {
+ tSelector.add(tStack);
+ }
+ }
+ tStack = GT_OreDictUnificator.get(OrePrefixes.gemChipped, aMaterial, GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), 1L);
+ if (tStack != null) {
+ for (int i = 0; i < 5; i++) {
+ tSelector.add(tStack);
+ }
+ }
+ tStack = GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L);
+ if (tStack != null) {
+ for (int i = 0; i < 10; i++) {
+ tSelector.add(tStack);
+ }
+ }
+ if (tSelector.size() > 0) {
+ int i = 0;
+ for (int j = Math.max(1, aMaterial.mOreMultiplier + (aFortune > 0 ? tRandom.nextInt(1 + aFortune * aMaterial.mOreMultiplier) : 0) / 2); i < j; i++) {
+ rList.add(GT_Utility.copyAmount(1L, new Object[]{tSelector.get(tRandom.nextInt(tSelector.size()))}));
+ }
+ }
+ if (tRandom.nextInt(3 + aFortune) > 1) {
+ switch (this.mMetaData / 1000 % 16) {
+ case 0:
+ rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Stone, 1L));
+ break;
+ case 1:
+ rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Netherrack, 1L));
+ break;
+ case 2:
+ rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.Endstone, 1L));
+ break;
+ case 3:
+ rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.GraniteBlack, 1L));
+ break;
+ case 4:
+ rList.add(GT_OreDictUnificator.get(tRandom.nextInt(3) > 0 ? OrePrefixes.dustImpure : OrePrefixes.dust, Materials.GraniteRed, 1L));
+ }
+ }
+ }
+ return rList;
+ }
+
+ public ITexture[] getTexture(byte aSide) {
+ Materials aMaterial = GregTech_API.sGeneratedMaterials[(this.mMetaData % 1000)];
+ if ((aMaterial != null) && (this.mMetaData < 32000)) {
+ return new ITexture[]{mStoneTextures[(this.mMetaData / 1000 % 16)], new GT_RenderedTexture(aMaterial.mIconSet.mTextures[this.mMetaData / 16000 == 0 ? OrePrefixes.ore.mTextureIndex : OrePrefixes.oreSmall.mTextureIndex], aMaterial.mRGBa)};
+ }
+ return new ITexture[]{mStoneTextures[0], new GT_RenderedTexture(gregtech.api.enums.TextureSet.SET_NONE.mTextures[OrePrefixes.ore.mTextureIndex])};
+ }
+}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java
index beaf10a96f..882c32e244 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java
@@ -1,83 +1,83 @@
-package gregtech.common.covers;
-
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.util.GT_CoverBehavior;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.Fluid;
-import net.minecraftforge.fluids.FluidStack;
-import net.minecraftforge.fluids.FluidTankInfo;
-import net.minecraftforge.fluids.IFluidHandler;
-
-public class GT_Cover_LiquidMeter
- extends GT_CoverBehavior {
- public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
- if ((aTileEntity instanceof IFluidHandler)) {
- FluidTankInfo[] tTanks = ((IFluidHandler) aTileEntity).getTankInfo(ForgeDirection.UNKNOWN);
- long tAll = 0L;
- long tFull = 0L;
- if (tTanks != null) {
- for (FluidTankInfo tTank : tTanks) {
- if (tTank != null) {
- tAll += tTank.capacity;
- FluidStack tLiquid = tTank.fluid;
- if (tLiquid != null) {
- tFull += tLiquid.amount;
- }
- }
- }
- }
- tAll /= 14L;
- if (tAll > 0L) {
- aTileEntity.setOutputRedstoneSignal(aSide, aCoverVariable != 0 ? (byte) (int) (15L - (tFull <= 0L ? 0L : tFull / tAll + 1L)) : tFull <= 0L ? 0 : (byte) (int) (tFull / tAll + 1L));
- } else {
- aTileEntity.setOutputRedstoneSignal(aSide, ((byte) (aCoverVariable != 0 ? 15 : 0)));
- }
- } else {
- aTileEntity.setOutputRedstoneSignal(aSide, (byte) 0);
- }
- return aCoverVariable;
- }
-
- public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- if (aCoverVariable == 0) {
- GT_Utility.sendChatToPlayer(aPlayer, "Inverted");
- } else {
- GT_Utility.sendChatToPlayer(aPlayer, "Normal");
- }
- return aCoverVariable == 0 ? 1 : 0;
- }
-
- public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
- return true;
- }
-
- public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
- public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return 5;
- }
+package gregtech.common.covers;
+
+import gregtech.api.interfaces.tileentity.ICoverable;
+import gregtech.api.util.GT_CoverBehavior;
+import gregtech.api.util.GT_Utility;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.fluids.FluidTankInfo;
+import net.minecraftforge.fluids.IFluidHandler;
+
+public class GT_Cover_LiquidMeter
+ extends GT_CoverBehavior {
+ public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
+ if ((aTileEntity instanceof IFluidHandler)) {
+ FluidTankInfo[] tTanks = ((IFluidHandler) aTileEntity).getTankInfo(ForgeDirection.UNKNOWN);
+ long tAll = 0L;
+ long tFull = 0L;
+ if (tTanks != null) {
+ for (FluidTankInfo tTank : tTanks) {
+ if (tTank != null) {
+ tAll += tTank.capacity;
+ FluidStack tLiquid = tTank.fluid;
+ if (tLiquid != null) {
+ tFull += tLiquid.amount;
+ }
+ }
+ }
+ }
+ tAll /= 14L;
+ if (tAll > 0L) {
+ aTileEntity.setOutputRedstoneSignal(aSide, aCoverVariable != 0 ? (byte) (int) (15L - (tFull <= 0L ? 0L : tFull / tAll + 1L)) : tFull <= 0L ? 0 : (byte) (int) (tFull / tAll + 1L));
+ } else {
+ aTileEntity.setOutputRedstoneSignal(aSide, ((byte) (aCoverVariable != 0 ? 15 : 0)));
+ }
+ } else {
+ aTileEntity.setOutputRedstoneSignal(aSide, (byte) 0);
+ }
+ return aCoverVariable;
+ }
+
+ public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ if (aCoverVariable == 0) {
+ GT_Utility.sendChatToPlayer(aPlayer, "Inverted");
+ } else {
+ GT_Utility.sendChatToPlayer(aPlayer, "Normal");
+ }
+ return aCoverVariable == 0 ? 1 : 0;
+ }
+
+ public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
+ return true;
+ }
+
+ public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
+ return true;
+ }
+
+ public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
+ return true;
+ }
+
+ public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
+ return true;
+ }
+
+ public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
+ return true;
+ }
+
+ public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
+ return true;
+ }
+
+ public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
+ return true;
+ }
+
+ public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
+ return 5;
+ }
} \ No newline at end of file
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java
index 98a0e8030d..7924dbe2f3 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneTransmitterInternal.java
@@ -14,11 +14,11 @@ public class GT_Cover_RedstoneTransmitterInternal
return true;
}
- public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return true;
- }
-
public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
return 1;
}
+
+ public boolean manipulatesSidedRedstoneOutput(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
+ return true;
+ }
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java b/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java
index 5c15505c4b..ca25a0a12d 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java
@@ -1,32 +1,32 @@
-package gregtech.common.covers;
-
-import gregtech.api.interfaces.tileentity.ICoverable;
-import gregtech.api.util.GT_CoverBehavior;
-
-public class GT_Cover_SolarPanel
- extends GT_CoverBehavior {
- private final int mVoltage;
-
- public GT_Cover_SolarPanel(int aVoltage) {
- this.mVoltage = aVoltage;
- }
-
- public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
- if (aTimer % 100L == 0L) {
- if ((aSide != 1) || (aTileEntity.getWorld().isThundering())) {
- aCoverVariable = 0;
- } else {
- boolean bRain = (aTileEntity.getWorld().isRaining()) && (aTileEntity.getBiome().rainfall > 0.0F);
- aCoverVariable = bRain && aTileEntity.getWorld().skylightSubtracted >= 4 || !aTileEntity.getSkyAtSide(aSide) ? 0 : ((int) (!bRain && aTileEntity.getWorld().isDaytime() ? 1 : 2));
- }
- }
- if ((aCoverVariable == 1) || ((aCoverVariable == 2) && (aTimer % 8L == 0L))) {
- aTileEntity.injectEnergyUnits((byte) 6, this.mVoltage, 1L);
- }
- return aCoverVariable;
- }
-
- public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
- return 1;
- }
+package gregtech.common.covers;
+
+import gregtech.api.interfaces.tileentity.ICoverable;
+import gregtech.api.util.GT_CoverBehavior;
+
+public class GT_Cover_SolarPanel
+ extends GT_CoverBehavior {
+ private final int mVoltage;
+
+ public GT_Cover_SolarPanel(int aVoltage) {
+ this.mVoltage = aVoltage;
+ }
+
+ public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity, long aTimer) {
+ if (aTimer % 100L == 0L) {
+ if ((aSide != 1) || (aTileEntity.getWorld().isThundering())) {
+ aCoverVariable = 0;
+ } else {
+ boolean bRain = (aTileEntity.getWorld().isRaining()) && (aTileEntity.getBiome().rainfall > 0.0F);
+ aCoverVariable = bRain && aTileEntity.getWorld().skylightSubtracted >= 4 || !aTileEntity.getSkyAtSide(aSide) ? 0 : ((int) (!bRain && aTileEntity.getWorld().isDaytime() ? 1 : 2));
+ }
+ }
+ if ((aCoverVariable == 1) || ((aCoverVariable == 2) && (aTimer % 8L == 0L))) {
+ aTileEntity.injectEnergyUnits((byte) 6, this.mVoltage, 1L);
+ }
+ return aCoverVariable;
+ }
+
+ public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
+ return 1;
+ }
} \ No newline at end of file
diff --git a/src/main/java/gregtech/common/gui/GT_Container_MicrowaveEnergyTransmitter.java b/src/main/java/gregtech/common/gui/GT_Container_MicrowaveEnergyTransmitter.java
new file mode 100644
index 0000000000..3bd32c24a2
--- /dev/null
+++ b/src/main/java/gregtech/common/gui/GT_Container_MicrowaveEnergyTransmitter.java
@@ -0,0 +1,171 @@
+package gregtech.common.gui;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gregtech.api.gui.GT_ContainerMetaTile_Machine;
+import gregtech.api.gui.GT_Slot_Holo;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_MicrowaveEnergyTransmitter;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.ICrafting;
+import net.minecraft.inventory.Slot;
+import net.minecraft.item.ItemStack;
+
+import java.util.Iterator;
+
+public class GT_Container_MicrowaveEnergyTransmitter
+ extends GT_ContainerMetaTile_Machine {
+ public int mEgg = 0;
+ public int mTargetD = 0;
+ public int mTargetZ = 0;
+ public int mTargetY = 0;
+ public int mTargetX = 0;
+ public GT_Container_MicrowaveEnergyTransmitter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
+ super(aInventoryPlayer, aTileEntity);
+ }
+
+ @Override
+ public void addSlots(InventoryPlayer aInventoryPlayer) {
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 8, 5, false, false, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 8, 23, false, false, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 8, 41, false, false, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 8, 59, false, false, 1));
+
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 26, 5, false, false, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 26, 23, false, false, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 26, 41, false, false, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 26, 59, false, false, 1));
+
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 152, 5, false, false, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 152, 23, false, false, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 152, 41, false, false, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 152, 59, false, false, 1));
+
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 134, 5, false, false, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 134, 23, false, false, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 134, 41, false, false, 1));
+ addSlotToContainer(new GT_Slot_Holo(this.mTileEntity, 2, 134, 59, false, false, 1));
+ }
+
+ @Override
+ public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
+ if (aSlotIndex < 0) {
+ return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
+ }
+ Slot tSlot = (Slot) this.inventorySlots.get(aSlotIndex);
+ if ((tSlot != null) && (this.mTileEntity.getMetaTileEntity() != null)) {
+ switch (aSlotIndex) {
+ case 0:
+ ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetX -= (aShifthold == 1 ? 512 : 64);
+ return null;
+ case 1:
+ ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetY -= (aShifthold == 1 ? 512 : 64);
+ return null;
+ case 2:
+ ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetZ -= (aShifthold == 1 ? 512 : 64);
+ return null;
+ case 3:
+ ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetD -= (aShifthold == 1 ? 16 : 8);
+ return null;
+ case 4:
+ ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetX -= (aShifthold == 1 ? 16 : 1);
+ return null;
+ case 5:
+ ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetY -= (aShifthold == 1 ? 16 : 1);
+ return null;
+ case 6:
+ ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetZ -= (aShifthold == 1 ? 16 : 1);
+ return null;
+ case 7:
+ ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetD -= (aShifthold == 1 ? 4 : 1);
+ return null;
+ case 8:
+ ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetX += (aShifthold == 1 ? 512 : 64);
+ return null;
+ case 9:
+ ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetY += (aShifthold == 1 ? 512 : 64);
+ return null;
+ case 10:
+ ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetZ += (aShifthold == 1 ? 512 : 64);
+ return null;
+ case 11:
+ ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetD += (aShifthold == 1 ? 16 : 8);
+ return null;
+ case 12:
+ ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetX += (aShifthold == 1 ? 16 : 1);
+ return null;
+ case 13:
+ ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetY += (aShifthold == 1 ? 16 : 1);
+ return null;
+ case 14:
+ ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetZ += (aShifthold == 1 ? 16 : 1);
+ return null;
+ case 15:
+ ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetD += (aShifthold == 1 ? 4 : 1);
+ return null;
+ }
+ }
+ return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
+ }
+
+ @Override
+ public void detectAndSendChanges() {
+ super.detectAndSendChanges();
+ if ((this.mTileEntity.isClientSide()) || (this.mTileEntity.getMetaTileEntity() == null)) {
+ return;
+ }
+ this.mTargetX = ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetX;
+ this.mTargetY = ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetY;
+ this.mTargetZ = ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetZ;
+ this.mTargetD = ((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).mTargetD;
+ this.mEgg = (((GT_MetaTileEntity_MicrowaveEnergyTransmitter) this.mTileEntity.getMetaTileEntity()).hasDimensionalTeleportCapability() ? 1 : 0);
+
+ Iterator var2 = this.crafters.iterator();
+ while (var2.hasNext()) {
+ ICrafting var1 = (ICrafting) var2.next();
+ var1.sendProgressBarUpdate(this, 100, this.mTargetX & 0xFFFF);
+ var1.sendProgressBarUpdate(this, 101, this.mTargetX >>> 16);
+ var1.sendProgressBarUpdate(this, 102, this.mTargetY & 0xFFFF);
+ var1.sendProgressBarUpdate(this, 103, this.mTargetY >>> 16);
+ var1.sendProgressBarUpdate(this, 104, this.mTargetZ & 0xFFFF);
+ var1.sendProgressBarUpdate(this, 105, this.mTargetZ >>> 16);
+ var1.sendProgressBarUpdate(this, 106, this.mTargetD & 0xFFFF);
+ var1.sendProgressBarUpdate(this, 107, this.mTargetD >>> 16);
+ var1.sendProgressBarUpdate(this, 108, this.mEgg);
+ }
+ }
+
+ @SideOnly(Side.CLIENT)
+ public void updateProgressBar(int par1, int par2) {
+ super.updateProgressBar(par1, par2);
+ switch (par1) {
+ case 100:
+ this.mTargetX = (this.mTargetX & 0xFFFF0000 | par2);
+ break;
+ case 101:
+ this.mTargetX = (this.mTargetX & 0xFFFF | par2 << 16);
+ break;
+ case 102:
+ this.mTargetY = (this.mTargetY & 0xFFFF0000 | par2);
+ break;
+ case 103:
+ this.mTargetY = (this.mTargetY & 0xFFFF | par2 << 16);
+ break;
+ case 104:
+ this.mTargetZ = (this.mTargetZ & 0xFFFF0000 | par2);
+ break;
+ case 105:
+ this.mTargetZ = (this.mTargetZ & 0xFFFF | par2 << 16);
+ break;
+ case 106:
+ this.mTargetD = (this.mTargetD & 0xFFFF0000 | par2);
+ break;
+ case 107:
+ this.mTargetD = (this.mTargetD & 0xFFFF | par2 << 16);
+ break;
+ case 108:
+ this.mEgg = par2;
+ }
+ }
+}
diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java
new file mode 100644
index 0000000000..0d03b12aa1
--- /dev/null
+++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_MicrowaveEnergyTransmitter.java
@@ -0,0 +1,34 @@
+package gregtech.common.gui;
+
+import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.util.GT_Utility;
+import net.minecraft.entity.player.InventoryPlayer;
+
+import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
+
+public class GT_GUIContainer_MicrowaveEnergyTransmitter
+ extends GT_GUIContainerMetaTile_Machine {
+ public GT_GUIContainer_MicrowaveEnergyTransmitter(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
+ super(new GT_Container_MicrowaveEnergyTransmitter(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "Teleporter.png");
+ }
+
+ protected void drawGuiContainerForegroundLayer(int par1, int par2) {
+ this.fontRendererObj.drawString("Teleporter", 46, 8, 16448255);
+ if (this.mContainer != null) {
+ this.fontRendererObj.drawString("X: " + GT_Utility.parseNumberToString(((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mTargetX), 46, 16, 16448255);
+ this.fontRendererObj.drawString("Y: " + GT_Utility.parseNumberToString(((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mTargetY), 46, 24, 16448255);
+ this.fontRendererObj.drawString("Z: " + GT_Utility.parseNumberToString(((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mTargetZ), 46, 32, 16448255);
+ if (((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mEgg > 0) {
+ this.fontRendererObj.drawString("Dim: " + GT_Utility.parseNumberToString(((GT_Container_MicrowaveEnergyTransmitter) this.mContainer).mTargetD), 46, 40, 16448255);
+ }
+ }
+ }
+
+ protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
+ super.drawGuiContainerBackgroundLayer(par1, par2, par3);
+ int x = (this.width - this.xSize) / 2;
+ int y = (this.height - this.ySize) / 2;
+ drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
+ }
+}
diff --git a/src/main/java/gregtech/common/items/CombType.java b/src/main/java/gregtech/common/items/CombType.java
new file mode 100644
index 0000000000..dcc829eb56
--- /dev/null
+++ b/src/main/java/gregtech/common/items/CombType.java
@@ -0,0 +1,108 @@
+package gregtech.common.items;
+
+import gregtech.api.enums.Materials;
+import gregtech.api.util.GT_LanguageManager;
+
+public enum CombType {
+ //Organic
+ LIGNIE("lignite", true, Materials.Lignite, 100),
+ COAL("coal", true, Materials.Coal, 100),
+ STICKY("stickyresin", true, Materials._NULL, 50),
+ OIL("oil", true, Materials._NULL, 100),
+ //Gem Line
+ STONE("stone", true, Materials._NULL, 70),
+ CERTUS("certus", true, Materials.CertusQuartz, 100),
+ REDSTONE("redstone", true, Materials.Redstone, 100),
+ LAPIS("lapis", true, Materials.Lapis, 100),
+ RUBY("ruby", true, Materials.Ruby, 100),
+ SAPPHIRE("sapphire", true, Materials.Sapphire, 100),
+ DIAMOND("diamond", true, Materials.Diamond, 100),
+ OLIVINE("olivine", true, Materials.Olivine, 100),
+ EMERALD("emerald", true, Materials.Emerald, 100),
+
+ // Metals Line
+ SLAG("slag", true, Materials._NULL, 50),
+ COPPER("copperdust", true, Materials.Copper, 100),
+ TIN("tindust", true, Materials.Tin, 100),
+ LEAD("leaddust", true, Materials.Lead, 100),
+ IRON("irondust", true, Materials.Iron, 100),
+ STEEL("steeldust", true, Materials.Steel, 100),
+ NICKEL("nickeldust", true, Materials.Nickel, 100),
+ ZINC("zincdust", true, Materials.Zinc, 100),
+ SILVER("silverdust", true, Materials.Silver, 100),
+ GOLD("golddust", true, Materials.Gold, 100),
+
+ // Rare Metals Line
+ ALUMINIUM("aluminium", true, Materials.Aluminium, 60),
+ MANGANESE("manganese", true, Materials.Manganese, 30),
+ TITANIUM("titanium", true, Materials.Ilmenite, 100),
+ CHROME("chrome", true, Materials.Chrome, 50),
+ TUNGSTEN("tungsten", true, Materials.Tungstate, 100),
+ PLATINUM("platinum", true, Materials.Platinum, 40),
+ IRIDIUM("iridium", true, Materials._NULL, 20),
+
+
+ // Radioactive Line
+ URANIUM("uranium", true, Materials.Uranium, 50),
+ PLUTONIUM("plutonium", true, Materials.Plutonium, 10),
+ NAQUADAH("naquada", true, Materials.Naquadah, 10),;
+
+ private static int[][] colours = new int[][]{
+ {0x906237, 0x58300B},
+ {0x666666, 0x525252},
+ {0x2E8F5B, 0xDCC289},
+ {0x4C4C4C, 0x333333},
+ {0x808080, 0x999999},
+ {0x57CFFB, 0xBBEEFF},
+ {0x7D0F0F, 0xD11919},
+ {0x1947D1, 0x476CDA},
+ {0xE6005C, 0xCC0052},
+ {0x0033CC, 0x00248F},
+ {0xCCFFFF, 0xA3CCCC},
+ {0x248F24, 0xCCFFCC},
+ {0x248F24, 0x2EB82E},
+ {0xD4D4D4, 0x58300B},
+ {0xFF6600, 0xE65C00},
+ {0xD4D4D4, 0xDDDDDD},
+ {0x666699, 0xA3A3CC},
+ {0xDA9147, 0xDE9C59},
+ {0x808080, 0x999999},
+ {0x8585AD, 0x9D9DBD},
+ {0xF0DEF0, 0xF2E1F2},
+ {0xC2C2D6, 0xCECEDE},
+ {0xE6B800, 0xCFA600},
+ {0x008AB8, 0xD6D6FF},
+ {0xD5D5D5, 0xAAAAAA},
+ {0xCC99FF, 0xDBB8FF},
+ {0xEBA1EB, 0xF2C3F2},
+ {0x62626D, 0x161620},
+ {0xE6E6E6, 0xFFFFCC},
+ {0xDADADA, 0xD1D1E0},
+ {0x19AF19, 0x169E16},
+ {0x335C33, 0x6B8F00},
+ {0x003300, 0x002400},
+ };
+ public boolean showInList;
+ public Materials material;
+ public int chance;
+ private String name;
+ private CombType(String pName, boolean show, Materials material, int chance) {
+ this.name = pName;
+ this.material = material;
+ this.chance = chance;
+ this.showInList = show;
+ }
+
+ public void setHidden() {
+ this.showInList = false;
+ }
+
+ public String getName() {
+// return "gt.comb."+this.name;
+ return GT_LanguageManager.addStringLocalization("comb." + this.name, this.name.substring(0, 1).toUpperCase() + this.name.substring(1) + " Comb");
+ }
+
+ public int[] getColours() {
+ return colours[this.ordinal()];
+ }
+} \ No newline at end of file
diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java
index b2313a4207..1c28e91fd4 100644
--- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java
+++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java
@@ -368,23 +368,23 @@ public class GT_MetaGenerated_Item_01
GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_3by3});
GT_ModHandler.addShapelessCraftingRecipe(ItemList.Schematic.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{ItemList.Schematic_Dust});
- ItemList.Battery_Hull_LV.set(addItem(tLastID = 500, "Small Battery Hull", "An empty LV Battery Hull", new Object[]{new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 2L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)}));
- ItemList.Battery_Hull_MV.set(addItem(tLastID = 501, "Medium Battery Hull", "An empty MV Battery Hull", new Object[]{new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 6L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)}));
- ItemList.Battery_Hull_HV.set(addItem(tLastID = 502, "Large Battery Hull", "An empty HV Battery Hull", new Object[]{new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 18L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)}));
+ ItemList.Battery_Hull_LV.set(addItem(tLastID = 500, "Small Battery Hull", "An empty LV Battery Hull", new Object[]{new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 1L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)}));
+ ItemList.Battery_Hull_MV.set(addItem(tLastID = 501, "Medium Battery Hull", "An empty MV Battery Hull", new Object[]{new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 3L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)}));
+ ItemList.Battery_Hull_HV.set(addItem(tLastID = 502, "Large Battery Hull", "An empty HV Battery Hull", new Object[]{new ItemData(Materials.BatteryAlloy, OrePrefixes.plate.mMaterialAmount * 9L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.VACUOS, 1L)}));
GT_ModHandler.addCraftingRecipe(ItemList.Battery_Hull_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"C", "P", "P", Character.valueOf('P'), OrePrefixes.plate.get(Materials.BatteryAlloy), Character.valueOf('C'), OreDictNames.craftingWireTin});
GT_ModHandler.addCraftingRecipe(ItemList.Battery_Hull_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[]{"C C", "PPP", "PPP", Character.valueOf('P'), OrePrefixes.plate.get(Materials.BatteryAlloy), Character.valueOf('C'), OreDictNames.craftingWireCopper});
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tin, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BatteryAlloy, 2L), ItemList.Battery_Hull_LV.get(1L, new Object[0]), 800, 1);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Copper, 2L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BatteryAlloy, 6L), ItemList.Battery_Hull_MV.get(1L, new Object[0]), 1600, 2);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.AnnealedCopper, 2L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BatteryAlloy, 6L), ItemList.Battery_Hull_MV.get(1L, new Object[0]), 1600, 2);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Gold, 4L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BatteryAlloy, 18L), ItemList.Battery_Hull_HV.get(1L, new Object[0]), 3200, 4);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tin, 1L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BatteryAlloy, 1L), Materials.Plastic.getMolten(144), ItemList.Battery_Hull_LV.get(1L, new Object[0]), 800, 1);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Copper, 2L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BatteryAlloy, 3L), Materials.Plastic.getMolten(432), ItemList.Battery_Hull_MV.get(1L, new Object[0]), 1600, 2);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.AnnealedCopper, 2L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BatteryAlloy, 3L), Materials.Plastic.getMolten(432), ItemList.Battery_Hull_MV.get(1L, new Object[0]), 1600, 2);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Gold, 4L), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BatteryAlloy, 9L), Materials.Plastic.getMolten(1296), ItemList.Battery_Hull_HV.get(1L, new Object[0]), 3200, 4);
ItemList.Battery_RE_ULV_Tantalum.set(addItem(tLastID = 499, "Tantalum Capacitor", "Reusable", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L)}));
setElectricStats(32000 + tLastID, 1000L, GT_Values.V[0], 0L, -3L, false);
ItemList.Battery_SU_LV_SulfuricAcid.set(addItem(tLastID = 510, "Small Acid Battery", "Single Use", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L)}));
- setElectricStats(32000 + tLastID, 12000L, GT_Values.V[1], 1L, -2L, true);
+ setElectricStats(32000 + tLastID, 18000L, GT_Values.V[1], 1L, -2L, true);
ItemList.Battery_SU_LV_Mercury.set(addItem(tLastID = 511, "Small Mercury Battery", "Single Use", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 2L)}));
setElectricStats(32000 + tLastID, 32000L, GT_Values.V[1], 1L, -2L, true);
@@ -396,7 +396,7 @@ public class GT_MetaGenerated_Item_01
setElectricStats(32000 + tLastID, 50000L, GT_Values.V[1], 1L, -3L, true);
ItemList.Battery_SU_MV_SulfuricAcid.set(addItem(tLastID = 520, "Medium Acid Battery", "Single Use", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L)}));
- setElectricStats(32000 + tLastID, 48000L, GT_Values.V[2], 2L, -2L, true);
+ setElectricStats(32000 + tLastID, 72000L, GT_Values.V[2], 2L, -2L, true);
ItemList.Battery_SU_MV_Mercury.set(addItem(tLastID = 521, "Medium Mercury Battery", "Single Use", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 4L)}));
setElectricStats(32000 + tLastID, 128000L, GT_Values.V[2], 2L, -2L, true);
@@ -408,7 +408,7 @@ public class GT_MetaGenerated_Item_01
setElectricStats(32000 + tLastID, 200000L, GT_Values.V[2], 2L, -3L, true);
ItemList.Battery_SU_HV_SulfuricAcid.set(addItem(tLastID = 530, "Large Acid Battery", "Single Use", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 8L)}));
- setElectricStats(32000 + tLastID, 192000L, GT_Values.V[3], 3L, -2L, true);
+ setElectricStats(32000 + tLastID, 288000L, GT_Values.V[3], 3L, -2L, true);
ItemList.Battery_SU_HV_Mercury.set(addItem(tLastID = 531, "Large Mercury Battery", "Single Use", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ELECTRUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 8L)}));
setElectricStats(32000 + tLastID, 512000L, GT_Values.V[3], 3L, -2L, true);
@@ -488,14 +488,14 @@ public class GT_MetaGenerated_Item_01
GregTech_API.registerCover(ItemList.Electric_Pump_EV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[4][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(2048));
GregTech_API.registerCover(ItemList.Electric_Pump_IV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP)}), new GT_Cover_Pump(8192));
- ItemList.Rotor_LV.set(addItem(tLastID = 620, "Tin Rotor", "", new Object[]{OrePrefixes.rotor.get(Materials.Tin), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L)}));
- ItemList.Rotor_MV.set(addItem(tLastID = 621, "Bronze Rotor", "", new Object[]{OrePrefixes.rotor.get(Materials.Bronze), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L)}));
- ItemList.Rotor_HV.set(addItem(tLastID = 622, "Steel Rotor", "", new Object[]{OrePrefixes.rotor.get(Materials.Steel), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 4L)}));
- ItemList.Rotor_EV.set(addItem(tLastID = 623, "Stainless Steel Rotor", "", new Object[]{OrePrefixes.rotor.get(Materials.StainlessSteel), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 8L)}));
- ItemList.Rotor_IV.set(addItem(tLastID = 624, "Tungstensteel Rotor", "", new Object[]{OrePrefixes.rotor.get(Materials.TungstenSteel), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L)}));
- ItemList.Rotor_LuV.set(ItemList.Rotor_IV.get(1L, new Object[0]));
- ItemList.Rotor_ZPM.set(ItemList.Rotor_LuV.get(1L, new Object[0]));
- ItemList.Rotor_UV.set(ItemList.Rotor_ZPM.get(1L, new Object[0]));
+ /**ItemList.Rotor_LV.set(addItem(tLastID = 620, "Tin Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.Tin), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 1L) }));
+ ItemList.Rotor_MV.set(addItem(tLastID = 621, "Bronze Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.Bronze), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 2L) }));
+ ItemList.Rotor_HV.set(addItem(tLastID = 622, "Steel Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.Steel), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 4L) }));
+ ItemList.Rotor_EV.set(addItem(tLastID = 623, "Stainless Steel Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.StainlessSteel), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 8L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 8L) }));
+ ItemList.Rotor_IV.set(addItem(tLastID = 624, "Tungstensteel Rotor", "", new Object[] { OrePrefixes.rotor.get(Materials.TungstenSteel), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 16L), new TC_Aspects.TC_AspectStack(TC_Aspects.MOTUS, 16L) }));
+ ItemList.Rotor_LuV.set(ItemList.Rotor_IV.get(1L, new Object[0]));
+ ItemList.Rotor_ZPM.set(ItemList.Rotor_LuV.get(1L, new Object[0]));
+ ItemList.Rotor_UV.set(ItemList.Rotor_ZPM.get(1L, new Object[0]));**/
GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", Character.valueOf('M'), ItemList.Electric_Motor_LV, Character.valueOf('O'), OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'), OrePrefixes.rotor.get(Materials.Tin), Character.valueOf('S'), OrePrefixes.screw.get(Materials.Tin), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.Tin), Character.valueOf('P'), OrePrefixes.pipeMedium.get(Materials.Bronze)});
GT_ModHandler.addCraftingRecipe(ItemList.Electric_Pump_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"SXO", "dPw", "OMW", Character.valueOf('M'), ItemList.Electric_Motor_MV, Character.valueOf('O'), OrePrefixes.ring.get(Materials.Rubber), Character.valueOf('X'), OrePrefixes.rotor.get(Materials.Bronze), Character.valueOf('S'), OrePrefixes.screw.get(Materials.Bronze), Character.valueOf('W'), OrePrefixes.cableGt01.get(Materials.AnyCopper), Character.valueOf('P'), OrePrefixes.pipeMedium.get(Materials.Steel)});
@@ -628,6 +628,8 @@ public class GT_MetaGenerated_Item_01
ItemList.Circuit_Parts_Wiring_Basic.set(addItem(tLastID = 716, "Etched Medium Voltage Wiring", "Part of Circuit Boards", new Object[0]));
ItemList.Circuit_Parts_Wiring_Advanced.set(addItem(tLastID = 717, "Etched High Voltage Wiring", "Part of Circuit Boards", new Object[0]));
ItemList.Circuit_Parts_Wiring_Elite.set(addItem(tLastID = 718, "Etched Extreme Voltage Wiring", "Part of Circuit Boards", new Object[0]));
+ ItemList.Empty_Board_Basic.set(addItem(tLastID = 719, "Empty Circuit Board", "A Board Part", new Object[0]));
+ ItemList.Empty_Board_Elite.set(addItem(tLastID = 720, "Empty Processor Board", "A Processor Board Part", new Object[0]));
ItemList.Component_Sawblade_Diamond.set(addItem(tLastID = 721, "Diamond Sawblade", "", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.PERDITIO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 4L), OreDictNames.craftingDiamondBlade}));
@@ -653,7 +655,7 @@ public class GT_MetaGenerated_Item_01
ItemList.Component_Filter.set(addItem(tLastID = 729, "Item Filter", "", new Object[]{new ItemData(Materials.Zinc, OrePrefixes.foil.mMaterialAmount * 16L, new MaterialStack[0]), new TC_Aspects.TC_AspectStack(TC_Aspects.COGNITO, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.ITER, 1L), OreDictNames.craftingFilter}));
- GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getIC2Item("carbonMesh", 4L), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Zinc, 16L), ItemList.Component_Filter.get(1L, new Object[0]), 1600, 32);
+ GT_Values.RA.addAssemblerRecipe(GT_ModHandler.getIC2Item("carbonMesh", 4L), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Zinc, 16L), Materials.Plastic.getMolten(144), ItemList.Component_Filter.get(1L, new Object[0]), 1600, 32);
ItemList.Cover_Controller.set(addItem(tLastID = 730, "Machine Controller", "Turns Machines ON/OFF", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)}));
ItemList.Cover_ActivityDetector.set(addItem(tLastID = 731, "Activity Detector", "Gives out Activity as Redstone", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.SENSUS, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L)}));
diff --git a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java
index 4b26f3b349..120406354f 100644
--- a/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java
+++ b/src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java
@@ -275,6 +275,8 @@ public class GT_MetaGenerated_Item_02
ItemList.Crop_Drop_OilBerry.set(addItem(tLastID = 510, "Oil Berry", "Oil in Berry form", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L)}));
ItemList.Crop_Drop_BobsYerUncleRanks.set(addItem(tLastID = 511, "Bobs-Yer-Uncle-Berry", "Source of Emeralds", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.VITREUS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 1L)}));
+ ItemList.Crop_Drop_UUMBerry.set(addItem(tLastID = 512, "UUM Berry", "UUM in Berry form", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L)}));
+ ItemList.Crop_Drop_UUABerry.set(addItem(tLastID = 513, "UUA Berry", "UUA in Berry form", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.POTENTIA, 1L)}));
ItemList.Crop_Drop_MilkWart.set(addItem(tLastID = 520, "Milk Wart", "Source of Milk", new Object[]{new TC_Aspects.TC_AspectStack(TC_Aspects.MESSIS, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.AQUA, 1L), new TC_Aspects.TC_AspectStack(TC_Aspects.SANO, 1L)}));
diff --git a/src/main/java/gregtech/common/items/ItemComb.java b/src/main/java/gregtech/common/items/ItemComb.java
new file mode 100644
index 0000000000..68bf481cc5
--- /dev/null
+++ b/src/main/java/gregtech/common/items/ItemComb.java
@@ -0,0 +1,131 @@
+package gregtech.common.items;
+
+import com.google.common.collect.ImmutableMap;
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import forestry.api.core.Tabs;
+import forestry.api.recipes.RecipeManagers;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.util.GT_OreDictUnificator;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.IIcon;
+
+import java.util.List;
+
+import static gregtech.api.enums.GT_Values.MOD_ID;
+
+public class ItemComb extends Item {
+ @SideOnly(Side.CLIENT)
+ private IIcon secondIcon;
+
+ public ItemComb() {
+ super();
+ this.setCreativeTab(Tabs.tabApiculture);
+ this.setHasSubtypes(true);
+ this.setUnlocalizedName("gt.comb");
+ GameRegistry.registerItem(this, "gt.comb", MOD_ID);
+ }
+
+ public ItemStack getStackForType(CombType type) {
+ return new ItemStack(this, 1, type.ordinal());
+ }
+
+ public ItemStack getStackForType(CombType type, int count) {
+ return new ItemStack(this, count, type.ordinal());
+ }
+
+ @SuppressWarnings({"unchecked", "rawtypes"})
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void getSubItems(Item item, CreativeTabs tabs, List list) {
+ for (CombType type : CombType.values()) {
+ if (type.showInList) {
+ list.add(this.getStackForType(type));
+ }
+ }
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public boolean requiresMultipleRenderPasses() {
+ return true;
+ }
+
+ @Override
+ public int getRenderPasses(int meta) {
+ return 2;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IIconRegister par1IconRegister) {
+ this.itemIcon = par1IconRegister.registerIcon("forestry:beeCombs.0");
+ this.secondIcon = par1IconRegister.registerIcon("forestry:beeCombs.1");
+ }
+
+ @Override
+ public IIcon getIcon(ItemStack stack, int pass) {
+ return (pass == 0) ? itemIcon : secondIcon;
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public int getColorFromItemStack(ItemStack stack, int pass) {
+ int meta = Math.max(0, Math.min(CombType.values().length - 1, stack.getItemDamage()));
+ int colour = CombType.values()[meta].getColours()[0];
+
+ if (pass >= 1) {
+ colour = CombType.values()[meta].getColours()[1];
+ }
+
+ return colour;
+ }
+
+ @Override
+ public String getItemStackDisplayName(ItemStack stack) {
+ return CombType.values()[stack.getItemDamage()].getName();
+ }
+
+ public void initCombsRecipes() {
+ for (CombType type : CombType.values()) {
+ ItemStack tComb = getStackForType(type);
+ if (type.material == Materials._NULL) {
+ if (type == type.STICKY) {
+ GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.IC2_Resin.get(1, new Object[0]), ItemList.FR_Wax.get(1, new Object[0]), ItemList.IC2_Plantball.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{5000, 10000, 1500}, 128, 5);
+ RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(
+ ItemList.IC2_Resin.get(1, new Object[0]), 0.5f,
+ ItemList.FR_Wax.get(1, new Object[0]), 1.0f,
+ ItemList.IC2_Plantball.get(1, new Object[0]), 0.15f));
+ } else if (type == type.OIL) {
+ GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, ItemList.Crop_Drop_OilBerry.get(1, new Object[0]), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{10000, 10000}, 128, 5);
+ RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(
+ ItemList.Crop_Drop_OilBerry.get(1, new Object[0]), 1.0f,
+ ItemList.FR_Wax.get(1, new Object[0]), 1.0f));
+ } else if (type == type.STONE || type == type.SLAG) {
+ GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{7000, 3000}, 128, 5);
+ RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(
+ GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1), 0.7f,
+ ItemList.FR_Wax.get(1, new Object[0]), 0.3f));
+ } else if (type == type.IRIDIUM) {
+ GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Iridium, 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Osmium, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{2000, 800, 3000}, 128, 5);
+ RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(
+ GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Iridium, 1), 0.2f,
+ GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Osmium, 1), 0.08f,
+ ItemList.FR_Wax.get(1, new Object[0]), 0.3f));
+ }
+ } else {
+ GT_Values.RA.addCentrifugeRecipe(tComb, GT_Values.NI, GT_Values.NF, GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.dustTiny, type.material, 1), ItemList.FR_Wax.get(1, new Object[0]), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, new int[]{type.chance * 100, 3000}, 128, 5);
+ RecipeManagers.centrifugeManager.addRecipe(40, tComb, ImmutableMap.of(
+ GT_OreDictUnificator.get(OrePrefixes.dustTiny, type.material, 1), type.chance * 0.01f,
+ ItemList.FR_Wax.get(1, new Object[0]), 0.3f));
+ }
+ }
+ }
+
+} \ No newline at end of file
diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Item.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Item.java
index 3bfa811eb8..049a5bfbcb 100644
--- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Item.java
+++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Item.java
@@ -1,68 +1,68 @@
-package gregtech.common.items.behaviors;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntityItemPipe;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.items.GT_MetaBase_Item;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-
-import java.util.HashMap;
-import java.util.List;
-
-public class Behaviour_Plunger_Item
- extends Behaviour_None {
- private final int mCosts;
- private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.plunger.item", "Clears Items from Pipes");
-
- public Behaviour_Plunger_Item(int aCosts) {
- this.mCosts = aCosts;
- }
-
- public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- if (aWorld.isRemote) {
- return false;
- }
- TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ);
- if ((aTileEntity instanceof IGregTechTileEntity)) {
- IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aTileEntity).getMetaTileEntity();
- if ((tMetaTileEntity instanceof IMetaTileEntityItemPipe)) {
- for (Object tTileEntity : GT_Utility.sortMapByValuesAcending(IMetaTileEntityItemPipe.Util.scanPipes((IMetaTileEntityItemPipe) tMetaTileEntity, new HashMap(), 0L, false, true)).keySet())
-
- {
- int i = 0;
- for (int j = ((IMetaTileEntityItemPipe) tTileEntity).getSizeInventory(); i < j; i++) {
- if (((IMetaTileEntityItemPipe) tTileEntity).isValidSlot(i)) {
- if ((((IMetaTileEntityItemPipe) tTileEntity).getStackInSlot(i) != null) && (
- (aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) {
- ItemStack tStack = ((IMetaTileEntityItemPipe) tTileEntity).decrStackSize(i, 64);
- if (tStack != null) {
- EntityItem tEntity = new EntityItem(aWorld, ((IGregTechTileEntity) aTileEntity).getOffsetX((byte) aSide, 1) + 0.5D, ((IGregTechTileEntity) aTileEntity).getOffsetY((byte) aSide, 1) + 0.5D, ((IGregTechTileEntity) aTileEntity).getOffsetZ((byte) aSide, 1) + 0.5D, tStack);
- tEntity.motionX = 0.0D;
- tEntity.motionY = 0.0D;
- tEntity.motionZ = 0.0D;
- aWorld.spawnEntityInWorld(tEntity);
- GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ);
- }
- return true;
- }
- }
- }
- }
- }
- }
- return false;
- }
-
- public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) {
- aList.add(this.mTooltip);
- return aList;
- }
-}
+package gregtech.common.items.behaviors;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntityItemPipe;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.items.GT_MetaBase_Item;
+import gregtech.api.items.GT_MetaGenerated_Tool;
+import gregtech.api.util.GT_LanguageManager;
+import gregtech.api.util.GT_Utility;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.World;
+
+import java.util.HashMap;
+import java.util.List;
+
+public class Behaviour_Plunger_Item
+ extends Behaviour_None {
+ private final int mCosts;
+ private final String mTooltip = GT_LanguageManager.addStringLocalization("gt.behaviour.plunger.item", "Clears Items from Pipes");
+
+ public Behaviour_Plunger_Item(int aCosts) {
+ this.mCosts = aCosts;
+ }
+
+ public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
+ if (aWorld.isRemote) {
+ return false;
+ }
+ TileEntity aTileEntity = aWorld.getTileEntity(aX, aY, aZ);
+ if ((aTileEntity instanceof IGregTechTileEntity)) {
+ IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aTileEntity).getMetaTileEntity();
+ if ((tMetaTileEntity instanceof IMetaTileEntityItemPipe)) {
+ for (Object tTileEntity : GT_Utility.sortMapByValuesAcending(IMetaTileEntityItemPipe.Util.scanPipes((IMetaTileEntityItemPipe) tMetaTileEntity, new HashMap(), 0L, false, true)).keySet())
+
+ {
+ int i = 0;
+ for (int j = ((IMetaTileEntityItemPipe) tTileEntity).getSizeInventory(); i < j; i++) {
+ if (((IMetaTileEntityItemPipe) tTileEntity).isValidSlot(i)) {
+ if ((((IMetaTileEntityItemPipe) tTileEntity).getStackInSlot(i) != null) && (
+ (aPlayer.capabilities.isCreativeMode) || (((GT_MetaGenerated_Tool) aItem).doDamage(aStack, this.mCosts)))) {
+ ItemStack tStack = ((IMetaTileEntityItemPipe) tTileEntity).decrStackSize(i, 64);
+ if (tStack != null) {
+ EntityItem tEntity = new EntityItem(aWorld, ((IGregTechTileEntity) aTileEntity).getOffsetX((byte) aSide, 1) + 0.5D, ((IGregTechTileEntity) aTileEntity).getOffsetY((byte) aSide, 1) + 0.5D, ((IGregTechTileEntity) aTileEntity).getOffsetZ((byte) aSide, 1) + 0.5D, tStack);
+ tEntity.motionX = 0.0D;
+ tEntity.motionY = 0.0D;
+ tEntity.motionZ = 0.0D;
+ aWorld.spawnEntityInWorld(tEntity);
+ GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(101)), 1.0F, -1.0F, aX, aY, aZ);
+ }
+ return true;
+ }
+ }
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) {
+ aList.add(this.mTooltip);
+ return aList;
+ }
+}
diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Spray_Color.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Spray_Color.java
index 60fe907c49..46487156a0 100644
--- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Spray_Color.java
+++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Spray_Color.java
@@ -59,8 +59,7 @@ public class Behaviour_Spray_Color
Items.feather.setDamage(aStack, Items.feather.getDamage(this.mUsed));
tUses = this.mUses;
}
- if ((GT_Utility.areStacksEqual(aStack, this.mUsed, true)) &&
- (colorize(aWorld, aX, aY, aZ, aSide))) {
+ if ((GT_Utility.areStacksEqual(aStack, this.mUsed, true)) && (colorize(aWorld, aX, aY, aZ, aSide))) {
GT_Utility.sendSoundToPlayers(aWorld, (String) GregTech_API.sSoundList.get(Integer.valueOf(102)), 1.0F, 1.0F, aX, aY, aZ);
if (!aPlayer.capabilities.isCreativeMode) {
tUses -= 1L;
diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java
index 854596650c..596ee77bcb 100644
--- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java
+++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_TypeFilter.java
@@ -63,7 +63,6 @@ public class GT_MetaTileEntity_TypeFilter
i = OrePrefixes.values().length - 1;
}
} while (OrePrefixes.values()[i].mPrefixedItems.isEmpty());
-
} else {
do {
i++;
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java
index f9dd1ccf73..23a6f83c14 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler.java
@@ -228,7 +228,7 @@ public abstract class GT_MetaTileEntity_Boiler
aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 1L));
}
} else if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.gem.get(Materials.Lignite))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dust.get(Materials.Lignite))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dustImpure.get(Materials.Lignite))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.crushed.get(Materials.Lignite)))) {
- this.mProcessingEnergy += 40;
+ this.mProcessingEnergy += 120;
aBaseMetaTileEntity.decrStackSize(2, 1);
if (aBaseMetaTileEntity.getRandomNumber(8) == 0) {
aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L));
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java
index 1a68147f51..dfe74e34fe 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Bronze.java
@@ -127,7 +127,7 @@ public class GT_MetaTileEntity_Boiler_Bronze
aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 1L));
}
} else if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.gem.get(Materials.Lignite))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dust.get(Materials.Lignite))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dustImpure.get(Materials.Lignite))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.crushed.get(Materials.Lignite)))) {
- this.mProcessingEnergy += 40;
+ this.mProcessingEnergy += 120;
aBaseMetaTileEntity.decrStackSize(2, 1);
if (aBaseMetaTileEntity.getRandomNumber(8) == 0) {
aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L));
diff --git a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java
index d46b876773..5ce3089466 100644
--- a/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java
@@ -132,7 +132,7 @@ public class GT_MetaTileEntity_Boiler_Steel
aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Ash, 1L));
}
} else if ((GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.gem.get(Materials.Lignite))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dust.get(Materials.Lignite))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.dustImpure.get(Materials.Lignite))) || (GT_OreDictUnificator.isItemStackInstanceOf(this.mInventory[2], OrePrefixes.crushed.get(Materials.Lignite)))) {
- this.mProcessingEnergy += 40;
+ this.mProcessingEnergy += 120;
aBaseMetaTileEntity.decrStackSize(2, 1);
if (aBaseMetaTileEntity.getRandomNumber(8) == 0) {
aBaseMetaTileEntity.addStackToSlot(3, GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 1L));
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java
index eaa17b62ff..ebc670f5e6 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_DieselGenerator.java
@@ -46,7 +46,7 @@ public class GT_MetaTileEntity_DieselGenerator
}
public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "DieselGenerator.efficiency.tier." + this.mTier, (100 - this.mTier * 10));
+ this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "DieselGenerator.efficiency.tier." + this.mTier, (100 - this.mTier * 5));
}
public int getEfficiency() {
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java
index 0f6db156c1..7002e56cee 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java
@@ -42,7 +42,7 @@ public class GT_MetaTileEntity_GasTurbine
}
public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "GasTurbine.efficiency.tier." + this.mTier, (100 - this.mTier * 10));
+ this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "GasTurbine.efficiency.tier." + this.mTier, (100 - this.mTier * 5));
}
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java
index 602c7fc8d0..5007c9a907 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicEnergyConverter.java
@@ -42,7 +42,7 @@ public class GT_MetaTileEntity_MagicEnergyConverter
}
public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MagicEnergyConverter.efficiency.tier." + this.mTier, 100 - this.mTier * 10);
+ this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MagicEnergyConverter.efficiency.tier." + this.mTier, 100 - this.mTier * 5);
}
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java
index f638bebad5..5f452c6e00 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java
@@ -70,7 +70,8 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
}
public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MagicEnergyAbsorber.efficiency.tier." + this.mTier, 100 - this.mTier * 10);
+ this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MagicEnergyAbsorber.efficiency.tier." + this.mTier,
+ 100 - this.mTier * 10);
this.sAllowMultipleEggs = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MagicEnergyAbsorber.AllowMultipleEggs", false);
this.sEnergyPerEnderCrystal = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MagicEnergyAbsorber.EnergyPerTick.EnderCrystal", 32);
this.sEnergyFromVis = (GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MagicEnergyAbsorber.EnergyPerVisDivisor", 2500) * 10);
@@ -80,12 +81,14 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.getUniversalEnergyStored() < maxEUOutput() + aBaseMetaTileEntity.getEUCapacity()) {
- //Dragon Egg
+ if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork()
+ && aBaseMetaTileEntity.getUniversalEnergyStored() < maxEUOutput() + aBaseMetaTileEntity.getEUCapacity()) {
+ // Dragon Egg
if (hasEgg() && aTick % 10 == 0) {
getBaseMetaTileEntity().increaseStoredEnergyUnits(sDragonEggEnergyPerTick * getEfficiency() * 10, false);
if ((mActiveSiphon != this) && (!sAllowMultipleEggs)) {
- if ((mActiveSiphon == null) || (mActiveSiphon.getBaseMetaTileEntity() == null) || (mActiveSiphon.getBaseMetaTileEntity().isInvalidTileEntity()) || (!mActiveSiphon.hasEgg())) {
+ if ((mActiveSiphon == null) || (mActiveSiphon.getBaseMetaTileEntity() == null)
+ || (mActiveSiphon.getBaseMetaTileEntity().isInvalidTileEntity()) || (!mActiveSiphon.hasEgg())) {
mActiveSiphon = this;
} else {
Block tEgg = mActiveSiphon.getBaseMetaTileEntity().getBlockOffset(0, 1, 0);
@@ -94,11 +97,10 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
} else {
mActiveSiphon = this;
}
-
}
}
}
- //Energyzed node
+ // Energyzed node
if (isThaumcraftLoaded) {
try {
World tmpWorld = this.getBaseMetaTileEntity().getWorld();
@@ -111,24 +113,34 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
int destruction = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.ENTROPY, 1000);
int order = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.ORDER, 1000);
int water = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.WATER, 1000);
- int visEU = (int) (Math.pow(fire, 4) + Math.pow(earth, 4) + Math.pow(air, 4) + Math.pow(destruction, 4) + Math.pow(order, 4) + Math.pow(water, 4));
+ int visEU = (int) (Math.pow(fire, 4) + Math.pow(earth, 4) + Math.pow(air, 4) + Math.pow(destruction, 4) + Math.pow(order, 4) + Math.pow(
+ water, 4));
int mult = 85;
- if (fire > 4) mult += 15;
- if (earth > 4) mult += 15;
- if (air > 4) mult += 15;
- if (destruction > 4) mult += 15;
- if (order > 4) mult += 15;
- if (water > 4) mult += 15;
+ if (fire > 4)
+ mult += 15;
+ if (earth > 4)
+ mult += 15;
+ if (air > 4)
+ mult += 15;
+ if (destruction > 4)
+ mult += 15;
+ if (order > 4)
+ mult += 15;
+ if (water > 4)
+ mult += 15;
visEU = (visEU * mult) / 100;
getBaseMetaTileEntity().increaseStoredEnergyUnits(Math.min(maxEUOutput(), visEU * getEfficiency() / this.sEnergyFromVis), false);
} catch (Throwable e) {
}
}
- //EnderCrystal
-
+ // EnderCrystal
if (sEnergyPerEnderCrystal > 0) {
if (this.mTargetedCrystal == null) {
- ArrayList<EntityEnderCrystal> tList = (ArrayList) getBaseMetaTileEntity().getWorld().getEntitiesWithinAABB(EntityEnderCrystal.class, AxisAlignedBB.getBoundingBox(getBaseMetaTileEntity().getXCoord() - 64, getBaseMetaTileEntity().getYCoord() - 64, getBaseMetaTileEntity().getZCoord() - 64, getBaseMetaTileEntity().getXCoord() + 64, getBaseMetaTileEntity().getYCoord() + 64, getBaseMetaTileEntity().getZCoord() + 64));
+ ArrayList<EntityEnderCrystal> tList = (ArrayList) getBaseMetaTileEntity().getWorld().getEntitiesWithinAABB(
+ EntityEnderCrystal.class,
+ AxisAlignedBB.getBoundingBox(getBaseMetaTileEntity().getXCoord() - 64, getBaseMetaTileEntity().getYCoord() - 64,
+ getBaseMetaTileEntity().getZCoord() - 64, getBaseMetaTileEntity().getXCoord() + 64,
+ getBaseMetaTileEntity().getYCoord() + 64, getBaseMetaTileEntity().getZCoord() + 64));
if ((tList != null) && (!tList.isEmpty())) {
tList.removeAll(sUsedDragonCrystalList);
if (tList.size() > 0) {
@@ -146,7 +158,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
}
}
- //Absorb entchantments
+ // Absorb entchantments and TC essentia
try {
if ((this.mInventory[0] != null) && (this.mInventory[1] == null)) {
if (isThaumcraftLoaded && this.mInventory[0].getItem() instanceof IEssentiaContainerItem) {
@@ -174,7 +186,8 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
if ((tID > -1) && (tID < Enchantment.enchantmentsList.length)) {
Enchantment tEnchantment = Enchantment.enchantmentsList[tID];
if (tEnchantment != null) {
- getBaseMetaTileEntity().increaseStoredEnergyUnits(1000000 * tLevel / (tEnchantment.getMaxLevel() * tEnchantment.getWeight()), true);
+ getBaseMetaTileEntity().increaseStoredEnergyUnits(
+ 1000000 * tLevel / (tEnchantment.getMaxLevel() * tEnchantment.getWeight()), true);
}
}
}
@@ -189,7 +202,8 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
if ((tID > -1) && (tID < Enchantment.enchantmentsBookList.length)) {
Enchantment tEnchantment = Enchantment.enchantmentsBookList[tID];
if (tEnchantment != null) {
- getBaseMetaTileEntity().increaseStoredEnergyUnits(1000000 * tLevel / (tEnchantment.getMaxLevel() * tEnchantment.getWeight()), true);
+ getBaseMetaTileEntity().increaseStoredEnergyUnits(
+ 1000000 * tLevel / (tEnchantment.getMaxLevel() * tEnchantment.getWeight()), true);
}
}
}
@@ -219,17 +233,18 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
return Blocks.dragon_egg == above || above.getUnlocalizedName().equals("tile.dragonEgg");
}
+ public int getEfficiency() {
+ return this.mEfficiency;
+ }
+
@Override
public long maxEUStore() {
return Math.max(getEUVar(), V[mTier] * 16000 + getMinimumStoredEU());
}
- public int getEfficiency() {
- return this.mEfficiency;
- }
-
public ITexture[] getFront(byte aColor) {
- return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]};
+ return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]};
}
public ITexture[] getBack(byte aColor) {
@@ -249,7 +264,8 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
}
public ITexture[] getFrontActive(byte aColor) {
- return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]};
+ return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_MAGIC_ACTIVE),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]};
}
public ITexture[] getBackActive(byte aColor) {
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java
index 6cfc98d8c5..0ee3bdc726 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java
@@ -12,8 +12,7 @@ import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Recipe;
import net.minecraftforge.fluids.FluidStack;
-public class GT_MetaTileEntity_SteamTurbine
- extends GT_MetaTileEntity_BasicGenerator {
+public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGenerator {
public int mEfficiency;
@@ -39,12 +38,17 @@ public class GT_MetaTileEntity_SteamTurbine
return null;
}
+ @Override
+ public String[] getDescription() {
+ return new String[]{mDescription, "Fuel Efficiency: " + (600 / getEfficiency()) + "%"};
+ }
+
public int getCapacity() {
return 24000 * this.mTier;
}
public void onConfigLoad() {
- this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "SteamTurbine.efficiency.tier." + this.mTier, (200 / consumedFluidPerOperation(GT_ModHandler.getSteam(1L))));
+ this.mEfficiency = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "SteamTurbine.efficiency.tier." + this.mTier, 6 + this.mTier);
}
public int getEfficiency() {
@@ -52,15 +56,16 @@ public class GT_MetaTileEntity_SteamTurbine
}
public int getFuelValue(FluidStack aLiquid) {
- return GT_ModHandler.isSteam(aLiquid) ? 1 : 0;
+ return GT_ModHandler.isSteam(aLiquid) ? 3 : 0;
}
public int consumedFluidPerOperation(FluidStack aLiquid) {
- return 2 + this.mTier;
+ return this.mEfficiency;
}
public ITexture[] getFront(byte aColor) {
- return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_FRONT), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]};
+ return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_FRONT),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]};
}
public ITexture[] getBack(byte aColor) {
@@ -80,7 +85,8 @@ public class GT_MetaTileEntity_SteamTurbine
}
public ITexture[] getFrontActive(byte aColor) {
- return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_FRONT_ACTIVE), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]};
+ return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_FRONT_ACTIVE),
+ Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]};
}
public ITexture[] getBackActive(byte aColor) {
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java
new file mode 100644
index 0000000000..8937dfbcf5
--- /dev/null
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Charger.java
@@ -0,0 +1,80 @@
+package gregtech.common.tileentities.machines.basic;
+
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.BaseMetaTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicBatteryBuffer;
+import gregtech.api.util.GT_ModHandler;
+
+import static gregtech.api.enums.GT_Values.V;
+
+public class GT_MetaTileEntity_Charger extends GT_MetaTileEntity_BasicBatteryBuffer {
+
+ public GT_MetaTileEntity_Charger(int aID, String aName, String aNameRegional, int aTier, String aDescription, int aSlotCount) {
+ super(aID, aName, aNameRegional, aTier, aDescription, aSlotCount);
+ }
+
+ public GT_MetaTileEntity_Charger(String aName, int aTier, String aDescription, ITexture[][][] aTextures, int aSlotCount) {
+ super(aName, aTier, aDescription, aTextures, aSlotCount);
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_Charger(mName, mTier, mDescription, mTextures, mInventory.length);
+ }
+
+ @Override
+ public long getMinimumStoredEU() {
+ return V[mTier] * 64 * mInventory.length;
+ }
+
+ @Override
+ public long maxEUStore() {
+ return V[mTier] * 256 * mInventory.length;
+ }
+
+ @Override
+ public long maxAmperesIn() {
+ return mChargeableCount * 8;
+ }
+
+ @Override
+ public long maxAmperesOut() {
+ return mBatteryCount * 4;
+ }
+
+ @Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ if (aBaseMetaTileEntity.isServerSide()) {
+ super.onPostTick(aBaseMetaTileEntity, aTick);
+ if (this.getBaseMetaTileEntity() instanceof BaseMetaTileEntity) {
+ BaseMetaTileEntity mBaseMetaTileEntity = (BaseMetaTileEntity) getBaseMetaTileEntity();
+ if (mBaseMetaTileEntity.getMetaTileEntity() instanceof MetaTileEntity) {
+ MetaTileEntity mMetaTileEntity = (MetaTileEntity) mBaseMetaTileEntity.getMetaTileEntity();
+ //for (int t = 0; t < 6; t++) {
+ if (mMetaTileEntity.dechargerSlotCount() > 0 && mBaseMetaTileEntity.getStoredEU() < mBaseMetaTileEntity.getEUCapacity()) {
+ for (int i = mMetaTileEntity.dechargerSlotStartIndex(), k = mMetaTileEntity.dechargerSlotCount() + i; i < k; i++) {
+ if (mMetaTileEntity.mInventory[i] != null && mBaseMetaTileEntity.getStoredEU() < mBaseMetaTileEntity.getEUCapacity()) {
+ mBaseMetaTileEntity.increaseStoredEnergyUnits(GT_ModHandler.dischargeElectricItem(mMetaTileEntity.mInventory[i], (int) Math.min(V[mTier] * 15, mBaseMetaTileEntity.getEUCapacity() - mBaseMetaTileEntity.getStoredEU()), (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getInputTier()), true, false, false), true);
+ if (mMetaTileEntity.mInventory[i].stackSize <= 0)
+ mMetaTileEntity.mInventory[i] = null;
+ }
+ }
+ }
+ if (mMetaTileEntity.rechargerSlotCount() > 0 && mBaseMetaTileEntity.getStoredEU() > 0) {
+ for (int i = mMetaTileEntity.rechargerSlotStartIndex(), k = mMetaTileEntity.rechargerSlotCount() + i; i < k; i++) {
+ if (mBaseMetaTileEntity.getStoredEU() > 0 && mMetaTileEntity.mInventory[i] != null) {
+ mBaseMetaTileEntity.decreaseStoredEU(GT_ModHandler.chargeElectricItem(mMetaTileEntity.mInventory[i], (int) Math.min(V[this.mTier] * 15, mBaseMetaTileEntity.getStoredEU()), (int) Math.min(Integer.MAX_VALUE, mMetaTileEntity.getOutputTier()), true, false), true);
+ if (mMetaTileEntity.mInventory[i].stackSize <= 0)
+ mMetaTileEntity.mInventory[i] = null;
+ }
+ }
+ //}
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java
index d7bd1e195d..030eca8984 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java
@@ -12,6 +12,8 @@ import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Config;
import net.minecraftforge.fluids.FluidStack;
+import static gregtech.api.enums.GT_Values.V;
+
public class GT_MetaTileEntity_Massfabricator
extends GT_MetaTileEntity_BasicMachine {
public static int sUUAperUUM = 1;
@@ -40,12 +42,22 @@ public class GT_MetaTileEntity_Massfabricator
Materials.UUAmplifier.mChemicalFormula = ("Mass Fabricator Eff/Speed Bonus: x" + sUUASpeedBonus);
}
+ @Override
+ public long maxAmperesIn() {
+ return 10;
+ }
+
+ @Override
+ public long maxEUStore() {
+ return V[mTier] * 512;
+ }
+
public int checkRecipe() {
FluidStack tFluid = getDrainableStack();
if ((tFluid == null) || (tFluid.amount < getCapacity())) {
this.mOutputFluid = Materials.UUMatter.getFluid(1L);
- this.mEUt = ((int) gregtech.api.enums.GT_Values.V[this.mTier]);
- this.mMaxProgresstime = (sDurationMultiplier / (1 << this.mTier - 1));
+ this.mEUt = ((int) gregtech.api.enums.GT_Values.V[this.mTier]) * 8;
+ this.mMaxProgresstime = (sDurationMultiplier / (1 << (this.mTier * 2) - 2));
if (((tFluid = getFillableStack()) != null) && (tFluid.amount >= sUUAperUUM) && (tFluid.isFluidEqual(Materials.UUAmplifier.getFluid(1L)))) {
tFluid.amount -= sUUAperUUM;
this.mMaxProgresstime /= sUUASpeedBonus;
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java
new file mode 100644
index 0000000000..de0a468582
--- /dev/null
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java
@@ -0,0 +1,331 @@
+package gregtech.common.tileentities.machines.basic;
+
+import gregtech.api.enums.ConfigCategories;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.Textures;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IEnergyConnected;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_Config;
+import gregtech.api.util.GT_Utility;
+import gregtech.common.gui.GT_Container_MicrowaveEnergyTransmitter;
+import gregtech.common.gui.GT_GUIContainer_MicrowaveEnergyTransmitter;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.World;
+import net.minecraftforge.common.DimensionManager;
+import net.minecraftforge.fluids.FluidStack;
+
+import static gregtech.api.enums.GT_Values.V;
+
+public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEntity_BasicTank {
+
+ public static boolean sInterDimensionalTeleportAllowed = true;
+ public int mTargetX = 0;
+ public int mTargetY = 0;
+ public int mTargetZ = 0;
+ public int mTargetD = 0;
+ public boolean mDebug = false;
+ public boolean hasEgg = false;
+ public int mMaxLoss = 50;
+ public int mMaxLossDistance = 10000;
+ public boolean mPassiveEnergyUse = true;
+ public int tTargetX = 0;
+ public int tTargetY = 0;
+ public int tTargetZ = 0;
+ public int tTargetD = 0;
+ public TileEntity tTile = null;
+
+ public GT_MetaTileEntity_MicrowaveEnergyTransmitter(int aID, String aName, String aNameRegional, int aTier) {
+ super(aID, aName, aNameRegional, aTier, 3, "Transmits Energy wireless");
+ }
+
+ public GT_MetaTileEntity_MicrowaveEnergyTransmitter(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
+ super(aName, aTier, 3, aDescription, aTextures);
+ }
+
+ @Override
+ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
+ if (aBaseMetaTileEntity.isClientSide()) return true;
+ this.hasEgg = checkForEgg();
+ aBaseMetaTileEntity.openGUI(aPlayer);
+ return true;
+ }
+
+ @Override
+ public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_Container_MicrowaveEnergyTransmitter(aPlayerInventory, aBaseMetaTileEntity);
+ }
+
+ @Override
+ public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_GUIContainer_MicrowaveEnergyTransmitter(aPlayerInventory, aBaseMetaTileEntity);
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_MicrowaveEnergyTransmitter(this.mName, this.mTier, this.mDescription, this.mTextures);
+ }
+
+ public String[] getInfoData() {
+ return new String[]{"Coordinates:", "X: " + this.mTargetX, "Y: " + this.mTargetY, "Z: " + this.mTargetZ, "Dimension: " + this.mTargetD};
+ }
+
+ @Override
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex + 1], (aSide == 0) ? null : aActive ? new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE) : new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER)};
+ }
+
+ public void saveNBTData(NBTTagCompound aNBT) {
+ if (mFluid != null) aNBT.setTag("mFluid", mFluid.writeToNBT(new NBTTagCompound()));
+ aNBT.setInteger("mTargetX", this.mTargetX);
+ aNBT.setInteger("mTargetY", this.mTargetY);
+ aNBT.setInteger("mTargetZ", this.mTargetZ);
+ aNBT.setInteger("mTargetD", this.mTargetD);
+ aNBT.setBoolean("mDebug", this.mDebug);
+ }
+
+ public void loadNBTData(NBTTagCompound aNBT) {
+ mFluid = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluid"));
+ this.mTargetX = aNBT.getInteger("mTargetX");
+ this.mTargetY = aNBT.getInteger("mTargetY");
+ this.mTargetZ = aNBT.getInteger("mTargetZ");
+ this.mTargetD = aNBT.getInteger("mTargetD");
+ this.mDebug = aNBT.getBoolean("mDebug");
+ }
+
+ public void onConfigLoad(GT_Config aConfig) {
+ sInterDimensionalTeleportAllowed = aConfig.get(ConfigCategories.machineconfig, "Teleporter.Interdimensional", true);
+ mMaxLoss = Math.max(aConfig.get(ConfigCategories.machineconfig, "MicrowaveTransmitter.MaxLoss", 50), 11);
+ mMaxLossDistance = aConfig.get(ConfigCategories.machineconfig, "MicrowaveTransmitter.MaxLossDistance", 10000);
+ mPassiveEnergyUse = aConfig.get(ConfigCategories.machineconfig, "MicrowaveTransmitter.PassiveEnergy", true);
+ }
+
+ public void onFirstTick() {
+ if (getBaseMetaTileEntity().isServerSide()) {
+ if ((this.mTargetX == 0) && (this.mTargetY == 0) && (this.mTargetZ == 0) && (this.mTargetD == 0)) {
+ this.mTargetX = getBaseMetaTileEntity().getXCoord();
+ this.mTargetY = getBaseMetaTileEntity().getYCoord();
+ this.mTargetZ = getBaseMetaTileEntity().getZCoord();
+ this.mTargetD = getBaseMetaTileEntity().getWorld().provider.dimensionId;
+ }
+ this.hasEgg = checkForEgg();
+ }
+ }
+
+ public boolean checkForEgg() {
+ for (byte i = -5; i <= 5; i = (byte) (i + 1)) {
+ for (byte j = -5; j <= 5; j = (byte) (j + 1)) {
+ for (byte k = -5; k <= 5; k = (byte) (k + 1)) {
+ if (getBaseMetaTileEntity().getBlockOffset(i, j, k) == Blocks.dragon_egg) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ public boolean hasDimensionalTeleportCapability() {
+ return (this.mDebug) || (this.hasEgg) || (mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) && mFluid.amount >= 1000);
+ }
+
+ public boolean isDimensionalTeleportAvailable() {
+ return (this.mDebug) || ((hasDimensionalTeleportCapability()) && (GT_Utility.isRealDimension(this.mTargetD)) && (GT_Utility.isRealDimension(getBaseMetaTileEntity().getWorld().provider.dimensionId)));
+ }
+
+ @Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ if (mFluid == null) {
+ mFluid = Materials.Nitrogen.getPlasma(0);
+ }
+ super.onPostTick(aBaseMetaTileEntity, aTick);
+ if (getBaseMetaTileEntity().isServerSide()) {
+ if (getBaseMetaTileEntity().getTimer() % 100L == 50L) {
+ this.hasEgg = checkForEgg();
+ }
+ if ((getBaseMetaTileEntity().isAllowedToWork()) && (getBaseMetaTileEntity().getRedstone())) {
+ if (getBaseMetaTileEntity().getStoredEU() > (V[mTier] * 16)) {
+ if (mPassiveEnergyUse) {
+ getBaseMetaTileEntity().decreaseStoredEnergyUnits((long) Math.pow(2, mTier), false);
+ }
+ if (hasDimensionalTeleportCapability() && this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId && mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1))) {
+ mFluid.amount--;
+ if (mFluid.amount < 1) {
+ mFluid = null;
+ }
+ }
+ if (tTargetD != mTargetD || tTargetX != mTargetX || tTargetY != mTargetY || tTargetZ != mTargetZ) {
+ tTargetD = mTargetD;
+ tTargetX = mTargetX;
+ tTargetY = mTargetY;
+ tTargetZ = mTargetZ;
+ if (this.mTargetD == getBaseMetaTileEntity().getWorld().provider.dimensionId) {
+ tTile = getBaseMetaTileEntity().getTileEntity(this.mTargetX, this.mTargetY, this.mTargetZ);
+ } else {
+ World tWorld = DimensionManager.getWorld(this.mTargetD);
+ if (tWorld != null) {
+ tTile = tWorld.getTileEntity(this.mTargetX, this.mTargetY, this.mTargetZ);
+ }
+ }
+ }
+ int tDistance = distanceCalculation();
+ long tEnergyTrans = Math.min(V[mTier], getBaseMetaTileEntity().getStoredEU());
+ if (tTile != null && tTile instanceof IEnergyConnected) {
+ if (((IEnergyConnected) tTile).injectEnergyUnits((byte) 6, V[mTier], 1) > 0) {
+ int tLoss = 1;
+ if (mMaxLossDistance != 0) {
+ tLoss = 10 + tDistance * (mMaxLoss - 10) / mMaxLossDistance;
+ }
+ getBaseMetaTileEntity().decreaseStoredEnergyUnits(V[mTier] + ((V[mTier] * tLoss) / 100), false);
+ }
+ }
+ }
+ getBaseMetaTileEntity().setActive(true);
+ } else {
+ getBaseMetaTileEntity().setActive(false);
+ }
+ }
+ }
+
+ private int distanceCalculation() {
+ return Math.abs(((this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId) && (isDimensionalTeleportAvailable()) ? 100 : 1) * (int) Math.sqrt(Math.pow(getBaseMetaTileEntity().getXCoord() - this.mTargetX, 2.0D) + Math.pow(getBaseMetaTileEntity().getYCoord() - this.mTargetY, 2.0D) + Math.pow(getBaseMetaTileEntity().getZCoord() - this.mTargetZ, 2.0D)));
+ }
+
+ @Override
+ public boolean isSimpleMachine() {
+ return false;
+ }
+
+ @Override
+ public boolean isOverclockerUpgradable() {
+ return false;
+ }
+
+ @Override
+ public boolean isTransformerUpgradable() {
+ return false;
+ }
+
+ @Override
+ public boolean isElectric() {
+ return true;
+ }
+
+ @Override
+ public boolean isFacingValid(byte aFacing) {
+ return true;
+ }
+
+ @Override
+ public boolean isEnetInput() {
+ return true;
+ }
+
+ @Override
+ public boolean isInputFacing(byte aSide) {
+ return true;
+ }
+
+ @Override
+ public boolean isOutputFacing(byte aSide) {
+ return false;
+ }
+
+ @Override
+ public boolean isTeleporterCompatible() {
+ return false;
+ }
+
+ @Override
+ public long getMinimumStoredEU() {
+ return V[mTier] * 16;
+ }
+
+ @Override
+ public long maxEUStore() {
+ return V[mTier] * 256;
+ }
+
+ @Override
+ public long maxEUInput() {
+ return V[mTier];
+ }
+
+ @Override
+ public long maxSteamStore() {
+ return maxEUStore();
+ }
+
+ @Override
+ public long maxAmperesIn() {
+ return 3;
+ }
+
+ @Override
+ public int getStackDisplaySlot() {
+ return 2;
+ }
+
+ @Override
+ public boolean isAccessAllowed(EntityPlayer aPlayer) {
+ return true;
+ }
+
+ @Override
+ public int getInputSlot() {
+ return 0;
+ }
+
+ @Override
+ public int getOutputSlot() {
+ return 0;
+ }
+
+ @Override
+ public int getCapacity() {
+ return 64000;
+ }
+
+ @Override
+ public boolean doesFillContainers() {
+ return false;
+ }
+
+ @Override
+ public boolean doesEmptyContainers() {
+ return false;
+ }
+
+ @Override
+ public boolean canTankBeFilled() {
+ return true;
+ }
+
+ @Override
+ public boolean canTankBeEmptied() {
+ return true;
+ }
+
+ @Override
+ public boolean displaysItemStack() {
+ return false;
+ }
+
+ @Override
+ public boolean displaysStackSize() {
+ return false;
+ }
+
+ @Override
+ public ITexture[][][] getTextureSet(ITexture[] aTextures) {
+ return null;
+ }
+
+}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java
index b1ba0101e0..6aabea8286 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java
@@ -203,7 +203,6 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord(), y, getBaseMetaTileEntity().getZCoord(),
GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L)));
getBaseMetaTileEntity().decrStackSize(0, 1);
-
}
return y;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java
index bb1afd3a74..95d6ef9364 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java
@@ -134,6 +134,20 @@ public class GT_MetaTileEntity_Scanner
return 2;
}
}
+ if (getSpecialSlot() == null && ItemList.Tool_DataStick.isStackEqual(aStack, false, true)) {
+ if (GT_Utility.ItemNBT.getBookTitle(aStack).equals("Raw Prospection Data")) {
+ GT_Utility.ItemNBT.setBookTitle(aStack, "Analyzed Prospection Data");
+ GT_Utility.ItemNBT.convertProspectionData(aStack);
+ aStack.stackSize -= 1;
+
+ this.mOutputItems[0] = GT_Utility.copyAmount(1L, new Object[]{aStack});
+ this.mMaxProgresstime = (1000 / (1 << this.mTier - 1));
+ this.mEUt = (32 * (1 << this.mTier - 1) * (1 << this.mTier - 1));
+ return 2;
+
+ }
+ }
+
}
return 0;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java
new file mode 100644
index 0000000000..5af6e69cee
--- /dev/null
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java
@@ -0,0 +1,99 @@
+package gregtech.common.tileentities.machines.basic;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.Textures;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.objects.ItemData;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Utility;
+import gregtech.common.blocks.GT_Block_Ores;
+import gregtech.common.blocks.GT_TileEntity_Ores;
+import ic2.core.Ic2Items;
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraftforge.fluids.FluidStack;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_BasicMachine {
+
+ boolean ready = false;
+
+ public GT_MetaTileEntity_SeismicProspector(int aID, String aName, String aNameRegional, int aTier) {
+ super(aID, aName, aNameRegional, aTier, 1, "Place, activate with explosives, use Data Stick", 1, 1, "Default.png", "", new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER)});
+ }
+
+ public GT_MetaTileEntity_SeismicProspector(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
+ super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
+ }
+
+ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_SeismicProspector(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
+ }
+
+ @Override
+ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
+ if (aBaseMetaTileEntity.isServerSide()) {
+ ItemStack aStack = aPlayer.getCurrentEquippedItem();
+ if ((aStack != null) && (aStack.getItem() == Item.getItemFromBlock(Blocks.tnt) || aStack.getItem() == Ic2Items.industrialTnt.getItem()) && aStack.stackSize > 7 && !ready) {
+ if ((!aPlayer.capabilities.isCreativeMode) && (aStack.stackSize != 111)) {
+ aStack.stackSize -= 8;
+ }
+ this.ready = true;
+ this.mMaxProgresstime = 200;
+ } else if (ready && mMaxProgresstime == 0 && aStack != null && aStack.stackSize == 1 && aStack.getItem() == ItemList.Tool_DataStick.getItem()) {
+ this.ready = false;
+ GT_Utility.ItemNBT.setBookTitle(aPlayer.getCurrentEquippedItem(), "Raw Prospection Data");
+ List<String> tStringList = new ArrayList<String>();
+ for (int i = this.getBaseMetaTileEntity().getYCoord(); i > 0; i--) {
+ for (int f = -1; f < 2; f++) {
+ for (int g = -1; g < 2; g++) {
+ Block tBlock = this.getBaseMetaTileEntity().getBlockOffset(f, -i, g);
+ if ((tBlock instanceof GT_Block_Ores)) {
+ TileEntity tTileEntity = getBaseMetaTileEntity().getWorld().getTileEntity(getBaseMetaTileEntity().getXCoord() + f, getBaseMetaTileEntity().getYCoord() + (-i), getBaseMetaTileEntity().getZCoord() + g);
+ if ((tTileEntity instanceof GT_TileEntity_Ores)) {
+ Materials tMaterial = GregTech_API.sGeneratedMaterials[(((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000)];
+ if ((tMaterial != null) && (tMaterial != Materials._NULL)) {
+ if (!tStringList.contains(tMaterial.mDefaultLocalName)) {
+ tStringList.add(tMaterial.mDefaultLocalName);
+ }
+ }
+ }
+ } else {
+ int tMetaID = getBaseMetaTileEntity().getWorld().getBlockMetadata(getBaseMetaTileEntity().getXCoord() + f, getBaseMetaTileEntity().getYCoord() + (-i), getBaseMetaTileEntity().getZCoord() + g);
+ ItemData tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(tBlock, 1, tMetaID));
+ if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore"))) {
+ if (!tStringList.contains(tAssotiation.mMaterial.mMaterial.mDefaultLocalName)) {
+ tStringList.add(tAssotiation.mMaterial.mMaterial.mDefaultLocalName);
+ }
+ }
+ }
+ }
+ }
+ }
+ FluidStack tFluid = GT_Utility.getUndergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord(), getBaseMetaTileEntity().getZCoord());
+ String[] tStringArray = new String[tStringList.size()];
+ {
+ for (int i = 0; i < tStringArray.length; i++) {
+ tStringArray[i] = tStringList.get(i);
+ }
+ }
+ GT_Utility.ItemNBT.setProspectionData(aPlayer.getCurrentEquippedItem(), this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), this.getBaseMetaTileEntity().getWorld().provider.dimensionId, tFluid, tStringArray);
+ }
+ }
+
+ return true;
+ }
+
+}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java
index ee47231746..36272e13a7 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java
@@ -1,6 +1,7 @@
package gregtech.common.tileentities.machines.basic;
import gregtech.api.enums.ConfigCategories;
+import gregtech.api.enums.Materials;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -26,8 +27,13 @@ import net.minecraft.entity.projectile.EntityFireball;
import net.minecraft.entity.projectile.EntityFishHook;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.init.Blocks;
+import net.minecraft.inventory.IInventory;
import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.world.World;
+import net.minecraftforge.common.DimensionManager;
+import net.minecraftforge.fluids.FluidStack;
import static gregtech.api.enums.GT_Values.V;
@@ -161,6 +167,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank {
}
public void saveNBTData(NBTTagCompound aNBT) {
+ if (mFluid != null) aNBT.setTag("mFluid", mFluid.writeToNBT(new NBTTagCompound()));
aNBT.setInteger("mTargetX", this.mTargetX);
aNBT.setInteger("mTargetY", this.mTargetY);
aNBT.setInteger("mTargetZ", this.mTargetZ);
@@ -169,6 +176,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank {
}
public void loadNBTData(NBTTagCompound aNBT) {
+ mFluid = FluidStack.loadFluidStackFromNBT(aNBT.getCompoundTag("mFluid"));
this.mTargetX = aNBT.getInteger("mTargetX");
this.mTargetY = aNBT.getInteger("mTargetY");
this.mTargetZ = aNBT.getInteger("mTargetZ");
@@ -206,7 +214,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank {
}
public boolean hasDimensionalTeleportCapability() {
- return (this.mDebug) || (this.hasEgg);
+ return (this.mDebug) || (this.hasEgg) || (mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) && mFluid.amount >= 1000);
}
public boolean isDimensionalTeleportAvailable() {
@@ -215,18 +223,52 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank {
@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ if (mFluid == null) {
+ mFluid = Materials.Nitrogen.getPlasma(0);
+ }
super.onPostTick(aBaseMetaTileEntity, aTick);
if (getBaseMetaTileEntity().isServerSide()) {
if (getBaseMetaTileEntity().getTimer() % 100L == 50L) {
this.hasEgg = checkForEgg();
}
if ((getBaseMetaTileEntity().isAllowedToWork()) && (getBaseMetaTileEntity().getRedstone())) {
- if (getBaseMetaTileEntity().decreaseStoredEnergyUnits(8192, false)) {
+ if (getBaseMetaTileEntity().decreaseStoredEnergyUnits(2048, false)) {
+ if (hasDimensionalTeleportCapability() && this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId && mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1))) {
+ mFluid.amount--;
+ if (mFluid.amount < 1) {
+ mFluid = null;
+ }
+ }
int tDistance = distanceCalculation();
+ if (mInventory[0] != null) {
+ TileEntity tTile = null;
+ if (this.mTargetD == getBaseMetaTileEntity().getWorld().provider.dimensionId) {
+ tTile = getBaseMetaTileEntity().getTileEntity(this.mTargetX, this.mTargetY, this.mTargetZ);
+ } else {
+ World tWorld = DimensionManager.getWorld(this.mTargetD);
+ if (tWorld != null) {
+ tTile = tWorld.getTileEntity(this.mTargetX, this.mTargetY, this.mTargetZ);
+ }
+ }
+ if (tTile != null && tTile instanceof IInventory) {
+ int tStacksize = mInventory[0].stackSize;
+ GT_Utility.moveOneItemStack(this, tTile, (byte) 0, (byte) 0, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1);
+ if (mInventory[0] == null || mInventory[0].stackSize < tStacksize) {
+ getBaseMetaTileEntity().decreaseStoredEnergyUnits((int) (tDistance * tDistance * (tStacksize - (mInventory[0] == null ? 0 : mInventory[0].stackSize))), false);
+ }
+ }
+
+ }
for (Object tObject : getBaseMetaTileEntity().getWorld().getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 2) - 1, getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 2) - 1, getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 2) - 1, getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 2) + 2, getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 2) + 2, getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 2) + 2))) {
if (((tObject instanceof Entity)) && (!((Entity) tObject).isDead)) {
Entity tEntity = (Entity) tObject;
if (getBaseMetaTileEntity().decreaseStoredEnergyUnits((int) (tDistance * tDistance * weightCalculation(tEntity)), false)) {
+ if (hasDimensionalTeleportCapability() && this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId && mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1))) {
+ mFluid.amount = mFluid.amount - ((int) Math.min(1000, (tDistance * tDistance * weightCalculation(tEntity) / 8192)));
+ if (mFluid.amount < 1) {
+ mFluid = null;
+ }
+ }
if (tEntity.ridingEntity != null) {
tEntity.mountEntity(null);
}
@@ -336,6 +378,21 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank {
}
@Override
+ public int getInputSlot() {
+ return 0;
+ }
+
+ @Override
+ public int getOutputSlot() {
+ return 0;
+ }
+
+ @Override
+ public int getCapacity() {
+ return 64000;
+ }
+
+ @Override
public boolean doesFillContainers() {
return false;
}
@@ -352,7 +409,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank {
@Override
public boolean canTankBeEmptied() {
- return false;
+ return true;
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java
new file mode 100644
index 0000000000..9aa75449d9
--- /dev/null
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java
@@ -0,0 +1,283 @@
+package gregtech.common.tileentities.machines.multi;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.Textures;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
+import gregtech.common.blocks.GT_TileEntity_Ores;
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.ChunkPosition;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+
+import java.util.ArrayList;
+
+public class GT_MetaTileEntity_AdvMiner2 extends GT_MetaTileEntity_MultiBlockBase {
+
+ public ArrayList<ChunkPosition> mMineList = new ArrayList();
+ private boolean completedCycle = false;
+
+ public GT_MetaTileEntity_AdvMiner2(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_MetaTileEntity_AdvMiner2(String aName) {
+ super(aName);
+ }
+
+ public String[] getDescription() {
+ return new String[]{
+ "Controller Block for the Advanced Miner II",
+ "Size: 3x7x3", "Controller (front middle at bottom)",
+ "3x3 Base of Solid Steel Casings",
+ "Also part of Base: MV+ Energy Input Hatch",
+ "Fluid Input Hatch, Output Bus and Maintainance Hatch",
+ "3x Solid Steel Casings on top the Center of the base",
+ "Steel Frame Boxes on each side and 3 more on top"};
+ }
+
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ if (aSide == aFacing) {
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER)};
+ }
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16]};
+ }
+
+ @Override
+ public boolean checkRecipe(ItemStack aStack) {
+ if (mInventory[1] == null || (mInventory[1].isItemEqual(GT_ModHandler.getIC2Item("miningPipe", 1L)) && mInventory[1].stackSize < mInventory[1].getMaxStackSize())) {
+ ArrayList<ItemStack> tItems = getStoredInputs();
+ for (ItemStack tStack : tItems) {
+ if (tStack.isItemEqual(GT_ModHandler.getIC2Item("miningPipe", 1L))) {
+ if (tStack.stackSize < 2) {
+ tStack = null;
+ } else {
+ tStack.stackSize--;
+ }
+
+ }
+ if (mInventory[1] == null) {
+ mInventory[1] = GT_ModHandler.getIC2Item("miningPipe", 1L);
+ } else {
+ mInventory[1].stackSize++;
+ }
+ }
+ }
+ if (mInputHatches == null || mInputHatches.get(0).mFluid == null || mInputHatches.get(0).mFluid.getFluid().getID() != ItemList.sDrillingFluid.getID()) {
+ return false;
+ }
+ FluidStack tFluid = mInputHatches.get(0).mFluid.copy();
+ if (tFluid == null) {
+ return false;
+ }
+ if (tFluid.amount < 20) {
+ return false;
+ }
+ tFluid.amount = 100;
+ depleteInput(tFluid);
+ long tVoltage = getMaxInputVoltage();
+ if (getBaseMetaTileEntity().getRandomNumber(20) == 0) {
+ if (mMineList.isEmpty()) {
+ int yLevel = getYOfPumpHead();
+ for (int i = -48; i < 49; i++) {
+ for (int f = -48; f < 49; f++) {
+ Block tBlock = getBaseMetaTileEntity().getBlockOffset(i, yLevel - getBaseMetaTileEntity().getYCoord(), f);
+ if (tBlock == GregTech_API.sBlockOres1) {
+ TileEntity tTileEntity = getBaseMetaTileEntity().getTileEntityOffset(i, yLevel - getBaseMetaTileEntity().getYCoord(), f);
+ if ((tTileEntity instanceof GT_TileEntity_Ores) && ((GT_TileEntity_Ores) tTileEntity).mNatural == true && !mMineList.contains(new ChunkPosition(i, yLevel - getBaseMetaTileEntity().getYCoord(), f))) {
+ mMineList.add(new ChunkPosition(i, yLevel - getBaseMetaTileEntity().getYCoord(), f));
+ }
+ }
+ }
+ }
+ }
+ if (mMineList.isEmpty() && getBaseMetaTileEntity().getBlockOffset(ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX, getYOfPumpHead() - 1 - getBaseMetaTileEntity().getYCoord(), ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ) != Blocks.bedrock) {
+ if (mEnergyHatches.size() > 0 && mEnergyHatches.get(0).getEUVar() > (512 + getMaxInputVoltage() * 4)) {
+ moveOneDown();
+ }
+ }
+ ArrayList<ItemStack> tDrops = new ArrayList();
+ if (!mMineList.isEmpty()) {
+ Block tMineBlock = getBaseMetaTileEntity().getBlockOffset(mMineList.get(0).chunkPosX, mMineList.get(0).chunkPosY, mMineList.get(0).chunkPosZ);
+ tDrops = tMineBlock.getDrops(getBaseMetaTileEntity().getWorld(), mMineList.get(0).chunkPosX, mMineList.get(0).chunkPosY, mMineList.get(0).chunkPosZ, getBaseMetaTileEntity().getMetaIDOffset(mMineList.get(0).chunkPosX, mMineList.get(0).chunkPosY, mMineList.get(0).chunkPosZ), 1);
+ if (!tDrops.isEmpty()) {
+ if (GT_OreDictUnificator.getItemData(tDrops.get(0)).mPrefix != OrePrefixes.crushed) {
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes.findRecipe(getBaseMetaTileEntity(), false, tVoltage, null, tDrops.get(0));
+ if (tRecipe != null) {
+ this.mOutputItems = new ItemStack[tRecipe.mOutputs.length];
+ for (int g = 0; g < mOutputItems.length; g++) {
+ mOutputItems[g] = tRecipe.mOutputs[g].copy();
+ mOutputItems[g].stackSize = mOutputItems[g].stackSize * (getBaseMetaTileEntity().getRandomNumber(4) + 1);
+ }
+ }
+ } else {
+ this.mOutputItems = null;
+ ItemStack[] tStack = new ItemStack[tDrops.size()];
+ for (int j = 0; j < tDrops.size(); j++) {
+ tStack[j] = tDrops.get(j).copy();
+ tStack[j].stackSize = tStack[j].stackSize * (getBaseMetaTileEntity().getRandomNumber(4) + 1);
+ }
+ mOutputItems = tStack;
+ }
+ }
+ getBaseMetaTileEntity().getWorld().setBlockToAir(mMineList.get(0).chunkPosX + getBaseMetaTileEntity().getXCoord(), mMineList.get(0).chunkPosY + getBaseMetaTileEntity().getYCoord(), mMineList.get(0).chunkPosZ + getBaseMetaTileEntity().getZCoord());
+ mMineList.remove(0);
+ }
+ }
+
+ byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+ this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
+ this.mEfficiencyIncrease = 10000;
+ int tEU = 48;
+ int tDuration = 40;
+ if (tEU <= 16) {
+ this.mEUt = (tEU * (1 << tTier - 1) * (1 << tTier - 1));
+ this.mMaxProgresstime = (tDuration / (1 << tTier - 1));
+ } else {
+ this.mEUt = tEU;
+ this.mMaxProgresstime = tDuration;
+ while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
+ this.mEUt *= 4;
+ this.mMaxProgresstime /= 2;
+ }
+ }
+ if (this.mEUt > 0) {
+ this.mEUt = (-this.mEUt);
+ }
+ this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
+ return true;
+ }
+
+ private boolean moveOneDown() {
+ if ((this.mInventory[1] == null) || (this.mInventory[1].stackSize < 1)
+ || (!GT_Utility.areStacksEqual(this.mInventory[1], GT_ModHandler.getIC2Item("miningPipe", 1L)))) {
+ return false;
+ }
+ int xDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX;
+ int zDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ;
+ int yHead = getYOfPumpHead();
+ if (yHead <= 0) {
+ return false;
+ }
+ if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, yHead - 1, getBaseMetaTileEntity().getZCoord() + zDir) == Blocks.bedrock) {
+ return false;
+ }
+ if (!(getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord() + xDir, yHead - 1, getBaseMetaTileEntity().getZCoord() + zDir, GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))))) {
+ return false;
+ }
+ if (yHead != getBaseMetaTileEntity().getYCoord()) {
+ getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord() + xDir, yHead, getBaseMetaTileEntity().getZCoord() + zDir, GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipe", 1L)));
+ }
+ getBaseMetaTileEntity().decrStackSize(1, 1);
+ return true;
+ }
+
+ private int getYOfPumpHead() {
+ int xDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX;
+ int zDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ;
+ int y = getBaseMetaTileEntity().getYCoord() - 1;
+ while (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, y, getBaseMetaTileEntity().getZCoord() + zDir) == GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipe", 1L))) {
+ y--;
+ }
+ if (y == getBaseMetaTileEntity().getYCoord() - 1) {
+ if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, y, getBaseMetaTileEntity().getZCoord() + zDir) != GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))) {
+ return y + 1;
+ }
+ } else if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, y, getBaseMetaTileEntity().getZCoord() + zDir) != GT_Utility
+ .getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L)) && this.mInventory[1] != null && this.mInventory[1].stackSize > 0 && GT_Utility.areStacksEqual(this.mInventory[1], GT_ModHandler.getIC2Item("miningPipe", 1L))) {
+ getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord() + xDir, y, getBaseMetaTileEntity().getZCoord() + zDir,
+ GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L)));
+ getBaseMetaTileEntity().decrStackSize(0, 1);
+ }
+ return y;
+ }
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+ for (int i = -1; i < 2; i++) {
+ for (int j = -1; j < 2; j++) {
+ if ((xDir + i != 0) || (zDir + j != 0)) {
+ IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 0, zDir + j);
+ if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16)) && (!addOutputToMachineList(tTileEntity, 16)) && (!addEnergyInputToMachineList(tTileEntity, 16))) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j) != GregTech_API.sBlockCasings2) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 0, zDir + j) != 0) {
+ return false;
+ }
+ }
+ }
+ }
+ }
+ for (int y = 1; y < 4; y++) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir) != GregTech_API.sBlockCasings2) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + 1, y, zDir) != GregTech_API.sBlockMachines) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getBlockOffset(xDir - 1, y, zDir) != GregTech_API.sBlockMachines) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir + 1) != GregTech_API.sBlockMachines) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir - 1) != GregTech_API.sBlockMachines) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getBlockOffset(xDir, y + 3, zDir) != GregTech_API.sBlockMachines) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ @Override
+ public boolean isCorrectMachinePart(ItemStack aStack) {
+ return true;
+ }
+
+ @Override
+ public int getMaxEfficiency(ItemStack aStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(ItemStack aStack) {
+ return 0;
+ }
+
+ @Override
+ public int getDamageToComponent(ItemStack aStack) {
+ return 0;
+ }
+
+ @Override
+ public int getAmountOfOutputs() {
+ return 0;
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(ItemStack aStack) {
+ return false;
+ }
+
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_AdvMiner2(this.mName);
+ }
+
+}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java
new file mode 100644
index 0000000000..ad22536d6e
--- /dev/null
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Charcoal_Pit.java
@@ -0,0 +1,214 @@
+package gregtech.common.tileentities.machines.multi;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.Textures;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_Recipe;
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.ChunkPosition;
+
+import java.util.ArrayList;
+
+public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlockBase {
+
+ private boolean running = false;
+ private boolean p1, p2, p3, p4, p5, p6;
+
+ public GT_MetaTileEntity_Charcoal_Pit(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_MetaTileEntity_Charcoal_Pit(String aName) {
+ super(aName);
+ }
+
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_Charcoal_Pit(this.mName);
+ }
+
+ public String[] getDescription() {
+ return new String[]{"Charcoal pit controller",
+ "Place on top of a pile of wood logs",
+ "Maximum size of logs below 11x5x11",
+ "Each log only can have other logs,",
+ "dirt or grass on its sides or above",
+ "or only logs or bricks below",
+ "Turns logs into Brittle Charcoal blocks"};
+ }
+
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ if (aSide == 1) {
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[10], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER)};
+ }
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[10]};
+ }
+
+ public GT_Recipe.GT_Recipe_Map getRecipeMap() {
+ return null;
+ }
+
+ @Override
+ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
+ if (aBaseMetaTileEntity.isClientSide()) return true;
+
+ return true;
+ }
+
+ public boolean isCorrectMachinePart(ItemStack aStack) {
+ return true;
+ }
+
+ public boolean isFacingValid(byte aFacing) {
+ return aFacing > 1;
+ }
+
+ public boolean checkRecipe(ItemStack aStack) {
+ if (!checkRecursiveBlocks()) {
+ return false;
+ }
+
+ if (mEfficiency == 0) {
+ this.mEfficiency = 10000;
+ this.mEfficiencyIncrease = 10000;
+ this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
+ return true;
+ } else {
+ this.mEfficiency = 0;
+ this.mEfficiencyIncrease = 0;
+ this.mMaxProgresstime = 0;
+ }
+ return false;
+ }
+
+ private boolean checkRecursiveBlocks() {
+ ArrayList<ChunkPosition> tList1 = new ArrayList();
+ ArrayList<ChunkPosition> tList2 = new ArrayList();
+
+ Block tBlock = this.getBaseMetaTileEntity().getBlockOffset(0, -1, 0);
+ if (tBlock != Blocks.log && tBlock != Blocks.log2) {
+ return false;
+ } else {
+ tList2.add(new ChunkPosition(0, -1, 0));//this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord()-1, this.getBaseMetaTileEntity().getZCoord()));
+ }
+ while (!tList2.isEmpty()) {
+ ChunkPosition tPos = (ChunkPosition) tList2.get(0);
+ tList2.remove(0);
+ if (!checkAllBlockSides(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ, tList1, tList2)) {
+ return false;
+ }
+ }
+ if (running) {
+ for (ChunkPosition tPos : tList1) {
+ if (this.getBaseMetaTileEntity().getBlockOffset(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ) == Blocks.log)
+ this.getBaseMetaTileEntity().getWorld().setBlock(this.getBaseMetaTileEntity().getXCoord() + tPos.chunkPosX, this.getBaseMetaTileEntity().getYCoord() + tPos.chunkPosY, this.getBaseMetaTileEntity().getZCoord() + tPos.chunkPosZ, GregTech_API.sBlockReinforced, 4, 3);
+ }
+ running = false;
+ return false;
+ } else {
+ this.mMaxProgresstime = (int) Math.sqrt(tList1.size() * 240000);
+ }
+ running = true;
+ return true;
+ }
+
+ private boolean checkAllBlockSides(int aX, int aY, int aZ, ArrayList<ChunkPosition> aList1, ArrayList<ChunkPosition> aList2) {
+ p1 = false;
+ p2 = false;
+ p3 = false;
+ p4 = false;
+ p5 = false;
+ p6 = false;
+ Block tBlock = this.getBaseMetaTileEntity().getBlockOffset(aX + 1, aY, aZ);
+ if (aX + 1 < 6 && (tBlock == Blocks.log || tBlock == Blocks.log2)) {
+ if (!aList1.contains(new ChunkPosition(aX + 1, aY, aZ)) && (!aList2.contains(new ChunkPosition(aX + 1, aY, aZ))))
+ p1 = true;
+ } else if (!(tBlock == Blocks.dirt || tBlock == Blocks.grass)) {
+ return false;
+ }
+
+ tBlock = this.getBaseMetaTileEntity().getBlockOffset(aX - 1, aY, aZ);
+ if (aX - 1 > -6 && (tBlock == Blocks.log || tBlock == Blocks.log2)) {
+ if (!aList1.contains(new ChunkPosition(aX - 1, aY, aZ)) && (!aList2.contains(new ChunkPosition(aX - 1, aY, aZ))))
+ p2 = true;
+ } else if (!(tBlock == Blocks.dirt || tBlock == Blocks.grass)) {
+ return false;
+ }
+
+ tBlock = this.getBaseMetaTileEntity().getBlockOffset(aX, aY + 1, aZ);
+ if (aY + 1 < 1 && (tBlock == Blocks.log || tBlock == Blocks.log2)) {
+ if (!aList1.contains(new ChunkPosition(aX, aY + 1, aZ)) && (!aList2.contains(new ChunkPosition(aX, aY + 1, aZ))))
+ p3 = true;
+ } else if (!(tBlock == Blocks.dirt || tBlock == Blocks.grass || (aX == 0 && aY == -1 && aZ == 0 && tBlock == GregTech_API.sBlockMachines))) {
+ return false;
+ }
+
+ tBlock = this.getBaseMetaTileEntity().getBlockOffset(aX, aY - 1, aZ);
+ if (aY - 1 > -6 && (tBlock == Blocks.log || tBlock == Blocks.log2)) {
+ if (!aList1.contains(new ChunkPosition(aX, aY - 1, aZ)) && (!aList2.contains(new ChunkPosition(aX, aY - 1, aZ))))
+ p4 = true;
+ } else if (tBlock != Blocks.brick_block) {
+ return false;
+ }
+
+ tBlock = this.getBaseMetaTileEntity().getBlockOffset(aX, aY, aZ + 1);
+ if (aZ + 1 < 6 && (tBlock == Blocks.log || tBlock == Blocks.log2)) {
+ if (!aList1.contains(new ChunkPosition(aX, aY, aZ + 1)) && (!aList2.contains(new ChunkPosition(aX, aY, aZ + 1))))
+ p5 = true;
+ } else if (!(tBlock == Blocks.dirt || tBlock == Blocks.grass)) {
+ return false;
+ }
+
+ tBlock = this.getBaseMetaTileEntity().getBlockOffset(aX, aY, aZ - 1);
+ if (aZ - 1 > -6 && (tBlock == Blocks.log || tBlock == Blocks.log2)) {
+ if (!aList1.contains(new ChunkPosition(aX, aY, aZ - 1)) && (!aList2.contains(new ChunkPosition(aX, aY, aZ - 1))))
+ p6 = true;
+ } else if (!(tBlock == Blocks.dirt || tBlock == Blocks.grass)) {
+ return false;
+ }
+ aList1.add(new ChunkPosition(aX, aY, aZ));
+ if (p1) aList2.add(new ChunkPosition(aX + 1, aY, aZ));
+ if (p2) aList2.add(new ChunkPosition(aX - 1, aY, aZ));
+ if (p3) aList2.add(new ChunkPosition(aX, aY + 1, aZ));
+ if (p4) aList2.add(new ChunkPosition(aX, aY - 1, aZ));
+ if (p5) aList2.add(new ChunkPosition(aX, aY, aZ + 1));
+ if (p6) aList2.add(new ChunkPosition(aX, aY, aZ - 1));
+ return true;
+ }
+
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ mWrench = true;
+ mScrewdriver = true;
+ mSoftHammer = true;
+ mHardHammer = true;
+ mSolderingTool = true;
+ mCrowbar = true;
+ return true;
+ }
+
+ public int getMaxEfficiency(ItemStack aStack) {
+ return 10000;
+ }
+
+ public int getPollutionPerTick(ItemStack aStack) {
+ return 0;
+ }
+
+ public int getDamageToComponent(ItemStack aStack) {
+ return 0;
+ }
+
+ public int getAmountOfOutputs() {
+ return 1;
+ }
+
+ public boolean explodesOnComponentBreak(ItemStack aStack) {
+ return false;
+ }
+}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java
index 98d7c253d1..486c9faf3f 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java
@@ -34,7 +34,14 @@ public class GT_MetaTileEntity_DistillationTower
}
public String[] getDescription() {
- return new String[]{"Controller Block for the Distillation Tower", "Size: 3x6x3 (Hollow)", "Controller (front bottom)", "1x Input Hatch (bottom)", "5x Output Hatch (one each height level besides botton)", "1x Output Bus (Botton)", "1x Energy Hatch (anywhere)", "1x Maintenance Hatch (anywhere)", "Clean Stainless Steel Casings for the rest (26 at least!)"};
+ return new String[]{
+ "Controller Block for the Distillation Tower",
+ "Size: 3x6x3 (Hollow)", "Controller (front bottom)",
+ "1x Input Hatch (bottom)",
+ "5x Output Hatch (one each height level besides botton)",
+ "1x Output Bus (Botton)", "1x Energy Hatch (anywhere)",
+ "1x Maintenance Hatch (anywhere)",
+ "Clean Stainless Steel Casings for the rest (26 at least!)"};
}
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
index c49fe6fe05..b08eea2e3f 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
@@ -353,7 +353,10 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity
mMaxProgresstime = 0;
mEfficiencyIncrease = 0;
if (mOutputFluids != null && mOutputFluids.length > 0) {
- GT_Mod.instance.achievements.issueAchivementHatchFluid(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), mOutputFluids[0]);
+ try {
+ GT_Mod.instance.achievements.issueAchivementHatchFluid(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), mOutputFluids[0]);
+ } catch (Exception e) {
+ }
}
this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU();
if (aBaseMetaTileEntity.isAllowedToWork())
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java
index c24476cdf4..9d1a9a9579 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer3.java
@@ -65,6 +65,5 @@ public class GT_MetaTileEntity_FusionComputer3 extends GT_MetaTileEntity_FusionC
public IIconContainer getIconOverlay() {
return Textures.BlockIcons.OVERLAY_FUSION3;
}
-
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java
index d3c72835bb..3b76ecccaf 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_HeatExchanger.java
@@ -21,6 +21,7 @@ import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
public class GT_MetaTileEntity_HeatExchanger extends GT_MetaTileEntity_MultiBlockBase {
+
private static boolean controller;
public GT_MetaTileEntity_Hatch_Input mInputHotFluidHatch;
public GT_MetaTileEntity_Hatch_Output mOutputColdFluidHatch;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
index 88d8ae1edb..2975c6104f 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
@@ -80,7 +80,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler
if ((tFluid != null) && (tRecipe.mSpecialValue > 1)) {
tFluid.amount = 1000;
if (depleteInput(tFluid)) {
- this.mMaxProgresstime = (tRecipe.mSpecialValue / 2);
+ this.mMaxProgresstime = (runtimeBoost(tRecipe.mSpecialValue / 2));
this.mEUt = getEUt();
this.mEfficiencyIncrease = (this.mMaxProgresstime * getEfficiencyIncrease() * 4);
return true;
@@ -92,7 +92,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler
if (tFluid != null) {
tFluid.amount = 1000;
if (depleteInput(tFluid)) {
- this.mMaxProgresstime = Math.max(1, tRecipe.mSpecialValue * 2);
+ this.mMaxProgresstime = Math.max(1, runtimeBoost(tRecipe.mSpecialValue * 2));
this.mEUt = getEUt();
this.mEfficiencyIncrease = (this.mMaxProgresstime * getEfficiencyIncrease());
return true;
@@ -102,7 +102,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler
ArrayList<ItemStack> tInputList = getStoredInputs();
if (!tInputList.isEmpty()) {
for (ItemStack tInput : tInputList) {
- if ((GT_Utility.getFluidForFilledItem(tInput, true) == null) && ((this.mMaxProgresstime = GT_ModHandler.getFuelValue(tInput) / 80) > 0)) {
+ if ((GT_Utility.getFluidForFilledItem(tInput, true) == null) && ((this.mMaxProgresstime = runtimeBoost(GT_ModHandler.getFuelValue(tInput) / 80)) > 0)) {
this.mEUt = getEUt();
this.mEfficiencyIncrease = (this.mMaxProgresstime * getEfficiencyIncrease());
this.mOutputItems = new ItemStack[]{GT_Utility.getContainerItem(tInput, true)};
@@ -117,6 +117,8 @@ public abstract class GT_MetaTileEntity_LargeBoiler
return false;
}
+ abstract int runtimeBoost(int mTime);
+
public boolean onRunningTick(ItemStack aStack) {
if (this.mEUt > 0) {
int tGeneratedEU = (int) (this.mEUt * 2L * this.mEfficiency / 10000L);
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java
index ed16103d08..7c5dad3c96 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Bronze.java
@@ -58,4 +58,9 @@ public class GT_MetaTileEntity_LargeBoiler_Bronze
public int getEfficiencyIncrease() {
return 16;
}
+
+ @Override
+ int runtimeBoost(int mTime) {
+ return mTime * 2;
+ }
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java
index 40e317881c..a68c0e6212 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Steel.java
@@ -58,4 +58,9 @@ public class GT_MetaTileEntity_LargeBoiler_Steel
public int getEfficiencyIncrease() {
return 12;
}
+
+ @Override
+ int runtimeBoost(int mTime) {
+ return mTime * 150 / 100;
+ }
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java
index 070339ac2d..6fc32f8c34 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_Titanium.java
@@ -1,61 +1,66 @@
-package gregtech.common.tileentities.machines.multi;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.block.Block;
-
-public class GT_MetaTileEntity_LargeBoiler_Titanium
- extends GT_MetaTileEntity_LargeBoiler {
- public GT_MetaTileEntity_LargeBoiler_Titanium(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional);
- }
-
- public GT_MetaTileEntity_LargeBoiler_Titanium(String aName) {
- super(aName);
- }
-
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_LargeBoiler_Titanium(this.mName);
- }
-
- public Block getCasingBlock() {
- return GregTech_API.sBlockCasings4;
- }
-
- public byte getCasingMeta() {
- return 2;
- }
-
- public byte getCasingTextureIndex() {
- return 50;
- }
-
- public Block getPipeBlock() {
- return GregTech_API.sBlockCasings2;
- }
-
- public byte getPipeMeta() {
- return 14;
- }
-
- public Block getFireboxBlock() {
- return GregTech_API.sBlockCasings4;
- }
-
- public byte getFireboxMeta() {
- return 3;
- }
-
- public byte getFireboxTextureIndex() {
- return 51;
- }
-
- public int getEUt() {
- return 800;
- }
-
- public int getEfficiencyIncrease() {
- return 8;
- }
+package gregtech.common.tileentities.machines.multi;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import net.minecraft.block.Block;
+
+public class GT_MetaTileEntity_LargeBoiler_Titanium
+ extends GT_MetaTileEntity_LargeBoiler {
+ public GT_MetaTileEntity_LargeBoiler_Titanium(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_MetaTileEntity_LargeBoiler_Titanium(String aName) {
+ super(aName);
+ }
+
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_LargeBoiler_Titanium(this.mName);
+ }
+
+ public Block getCasingBlock() {
+ return GregTech_API.sBlockCasings4;
+ }
+
+ public byte getCasingMeta() {
+ return 2;
+ }
+
+ public byte getCasingTextureIndex() {
+ return 50;
+ }
+
+ public Block getPipeBlock() {
+ return GregTech_API.sBlockCasings2;
+ }
+
+ public byte getPipeMeta() {
+ return 14;
+ }
+
+ public Block getFireboxBlock() {
+ return GregTech_API.sBlockCasings4;
+ }
+
+ public byte getFireboxMeta() {
+ return 3;
+ }
+
+ public byte getFireboxTextureIndex() {
+ return 51;
+ }
+
+ public int getEUt() {
+ return 800;
+ }
+
+ public int getEfficiencyIncrease() {
+ return 8;
+ }
+
+ @Override
+ int runtimeBoost(int mTime) {
+ return mTime * 130 / 100;
+ }
} \ No newline at end of file
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java
index 64cdcbb136..997a176e34 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler_TungstenSteel.java
@@ -58,4 +58,10 @@ public class GT_MetaTileEntity_LargeBoiler_TungstenSteel
public int getEfficiencyIncrease() {
return 4;
}
+
+ @Override
+ int runtimeBoost(int mTime) {
+ return mTime * 120 / 100;
+ }
+
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java
index b44fbc7184..ace7524606 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java
@@ -80,7 +80,8 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
@Override
int fluidIntoPower(ArrayList<FluidStack> aFluids, int aOptFlow, int aBaseEff) {
- aOptFlow *= 20;
+
+ aOptFlow *= 40;
int tEU = 0;
int actualOptimalFlow = 0;
@@ -89,6 +90,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
FluidStack firstFuelType = new FluidStack(aFluids.get(0), 0); // Identify a SINGLE type of fluid to process. Doesn't matter which one. Ignore the rest!
int fuelValue = getFuelValue(firstFuelType);
actualOptimalFlow = (int) ((aOptFlow + fuelValue - 1) / fuelValue);
+
int remainingFlow = (int) (actualOptimalFlow * 1.25f); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios.
int flow = 0;
int totalFlow = 0;
@@ -114,6 +116,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
} else {
tEU = tEU * aBaseEff / 10000;
}
+
return tEU;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java
new file mode 100644
index 0000000000..5e7cc4937a
--- /dev/null
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilCracker.java
@@ -0,0 +1,243 @@
+package gregtech.common.tileentities.machines.multi;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.Textures;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+
+import java.util.ArrayList;
+
+public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_MultiBlockBase {
+
+ public GT_MetaTileEntity_OilCracker(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_MetaTileEntity_OilCracker(String aName) {
+ super(aName);
+ }
+
+ public String[] getDescription() {
+ return new String[]{
+ "Controller Block for the Oil Cracking Unit",
+ "Cracks heavy oil into lighter parts",
+ "Size: 3 high, 3 deep, 5 wide",
+ "Controller (front center)",
+ "Made from Clean Stainless Steel Casings (18 at least!)",
+ "On both sides of the Controller each",
+ "a ring of 8 Cupronickel Coils",
+ "2 Blocks left Input Hatch and 8 Casings",
+ "2 Blocks right Output Hatch and 8 Casings",
+ "beween coils: Controller, second input Hatch",
+ "Maintainance Hatch and Energy Hatch"};
+ }
+
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ if (aSide == aFacing) {
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[49],
+ new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER)};
+ }
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[49]};
+ }
+
+ @Override
+ public boolean checkRecipe(ItemStack aStack) {
+ ArrayList<FluidStack> tInputList = getStoredFluids();
+ for (FluidStack tInput : tInputList) {
+ long tVoltage = getMaxInputVoltage();
+ byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sCrakingRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], new FluidStack[]{tInput}, new ItemStack[]{});
+ if (tRecipe != null) {
+ if (tRecipe.isRecipeInputEqual(true, new FluidStack[]{tInput}, new ItemStack[]{})) {
+ boolean steam = false;
+ boolean hydrogen = false;
+ for (FluidStack tInput2 : tInputList) {
+ if (tInput2.getFluid() == GT_ModHandler.getSteam(1).getFluid()) {
+ steam = true;
+ tInput2.amount -= 64;
+ }
+ if (tInput2.getFluid() == Materials.Hydrogen.mGas) {
+ hydrogen = true;
+ steam = false;
+ tInput2.amount -= 64;
+ }
+
+ }
+
+ this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
+ this.mEfficiencyIncrease = 10000;
+ if (tRecipe.mEUt <= 16) {
+ this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1));
+ this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1));
+ } else {
+ this.mEUt = tRecipe.mEUt;
+ this.mMaxProgresstime = tRecipe.mDuration;
+ while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
+ this.mEUt *= 4;
+ this.mMaxProgresstime /= 2;
+ }
+ }
+ if (steam) this.mEUt = this.mEUt * 66 / 100;
+ if (this.mEUt > 0) {
+ this.mEUt = (-this.mEUt);
+ }
+ this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
+ this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)};
+ if (hydrogen) this.mOutputFluids[0].amount = this.mOutputFluids[0].amount * 130 / 100;
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+ int amount = 0;
+ if (xDir != 0) {
+ for (int i = -1; i < 2; i++) {// xDirection
+ for (int j = -1; j < 2; j++) {// height
+ for (int h = -2; h < 3; h++) {
+ if (!(j == 0 && i == 0 && (h == -1 || h == 0 || h == 1))) {
+ if (h == 1 || h == -1) {
+ IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, j, h + zDir);
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, j, h + zDir) != GregTech_API.sBlockCasings1) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, j, h + zDir) != 12) {
+ return false;
+ }
+ }
+ if (h == 2 || h == -2) {
+ IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, j, h + zDir);
+ boolean tSide = ((aBaseMetaTileEntity.getBackFacing() == 4 && 2 == h) || (aBaseMetaTileEntity.getBackFacing() == 5 && -2 == h));
+ if (tSide ? !addInputToMachineList(tTileEntity, 49) : !addOutputToMachineList(tTileEntity, 49)) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, j, h + zDir) != GregTech_API.sBlockCasings4) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, j, h + zDir) != 1) {
+ return false;
+ }
+ amount++;
+ }
+ }
+ if (h == 0) {
+ IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, j, h + zDir);
+ if ((!addMaintenanceToMachineList(tTileEntity, 49)) && (!addInputToMachineList(tTileEntity, 49))
+ && (!addEnergyInputToMachineList(tTileEntity, 49))) {
+ if (!((xDir + i) == 0 && j == 0 && (h + zDir) == 0)) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, j, h + zDir) != GregTech_API.sBlockCasings4) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, j, h + zDir) != 1) {
+ return false;
+ }
+ amount++;
+ }
+ }
+ }
+
+ }
+ }
+ }
+ }
+ } else {
+ for (int i = -1; i < 2; i++) {// zDirection
+ for (int j = -1; j < 2; j++) {// height
+ for (int h = -2; h < 3; h++) {
+ if (!(j == 0 && i == 0 && (h == -1 || h == 0 || h == 1))) {
+ if (h == 1 || h == -1) {
+ IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + h, j, i + zDir);
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + h, j, i + zDir) != GregTech_API.sBlockCasings1) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + h, j, i + zDir) != 12) {
+ return false;
+ }
+ }
+ if (h == 2 || h == -2) {
+ IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + h, j, i + zDir);
+ boolean tSide = (aBaseMetaTileEntity.getBackFacing() == h || (aBaseMetaTileEntity.getBackFacing() == 3 && -2 == h));
+ if (tSide ? !addOutputToMachineList(tTileEntity, 49) : !addInputToMachineList(tTileEntity, 49)) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + h, j, i + zDir) != GregTech_API.sBlockCasings4) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + h, j, i + zDir) != 1) {
+ return false;
+ }
+ amount++;
+ }
+ }
+ if (h == 0) {
+ IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + h, j, i + zDir);
+ if ((!addMaintenanceToMachineList(tTileEntity, 49)) && (!addInputToMachineList(tTileEntity, 49))
+ && (!addEnergyInputToMachineList(tTileEntity, 49))) {
+ if (!((xDir + h) == 0 && j == 0 && (i + zDir) == 0)) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + h, j, i + zDir) != GregTech_API.sBlockCasings4) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + h, j, i + zDir) != 1) {
+ return false;
+ }
+ amount++;
+ }
+ }
+ }
+
+ }
+ }
+ }
+ }
+ }
+ if (amount < 19) return false;
+ return true;
+ }
+
+ @Override
+ public boolean isCorrectMachinePart(ItemStack aStack) {
+ return true;
+ }
+
+ @Override
+ public int getMaxEfficiency(ItemStack aStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(ItemStack aStack) {
+ return 0;
+ }
+
+ @Override
+ public int getDamageToComponent(ItemStack aStack) {
+ return 0;
+ }
+
+ @Override
+ public int getAmountOfOutputs() {
+ return 0;
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(ItemStack aStack) {
+ return false;
+ }
+
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_OilCracker(this.mName);
+ }
+
+}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java
new file mode 100644
index 0000000000..13dc671e01
--- /dev/null
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java
@@ -0,0 +1,230 @@
+package gregtech.common.tileentities.machines.multi;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.Textures;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_Utility;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+
+import java.util.ArrayList;
+
+public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase {
+
+ private boolean completedCycle = false;
+
+ public GT_MetaTileEntity_OilDrill(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_MetaTileEntity_OilDrill(String aName) {
+ super(aName);
+ }
+
+ public String[] getDescription() {
+ return new String[]{
+ "Controller Block for the Oil Drilling Rig",
+ "Size: 3x7x3", "Controller (front middle at bottom)",
+ "3x3 Base of Solid Steel Casings",
+ "Also part of Base: Energy Input Hatch",
+ "Fluid Output Hatch and Maintainance Hatch",
+ "3x Solid Steel Casings on top the Center of the base",
+ "Steel Frame Boxes on each side and 3 more on top"};
+ }
+
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ if (aSide == aFacing) {
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER)};
+ }
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16]};
+ }
+
+ @Override
+ public boolean checkRecipe(ItemStack aStack) {
+ if (mInventory[1] == null || (mInventory[1].isItemEqual(GT_ModHandler.getIC2Item("miningPipe", 1L)) && mInventory[1].stackSize < mInventory[1].getMaxStackSize())) {
+ ArrayList<ItemStack> tItems = getStoredInputs();
+ for (ItemStack tStack : tItems) {
+ if (tStack.isItemEqual(GT_ModHandler.getIC2Item("miningPipe", 1L))) {
+ if (tStack.stackSize < 2) {
+ tStack = null;
+ } else {
+ tStack.stackSize--;
+ }
+
+ }
+ if (mInventory[1] == null) {
+ mInventory[1] = GT_ModHandler.getIC2Item("miningPipe", 1L);
+ } else {
+ mInventory[1].stackSize++;
+ }
+ }
+ }
+ FluidStack tFluid = GT_Utility.getUndergroundOil(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord(), getBaseMetaTileEntity().getZCoord());
+ if (tFluid == null) {
+ return false;
+ }
+ if (getBaseMetaTileEntity().getBlockOffset(ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX, getYOfPumpHead() - 1 - getBaseMetaTileEntity().getYCoord(), ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ) != Blocks.bedrock) {
+ if (completedCycle) {
+ moveOneDown();
+ }
+ tFluid = null;
+ if (mEnergyHatches.size() > 0 && mEnergyHatches.get(0).getEUVar() > (512 + getMaxInputVoltage() * 4))
+ completedCycle = true;
+ } else if (tFluid.amount < 5000) {
+ return false;
+ } else {
+ tFluid.amount = tFluid.amount / 5000;
+ }
+ long tVoltage = getMaxInputVoltage();
+ byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+ this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
+ this.mEfficiencyIncrease = 10000;
+ int tEU = 24;
+ int tDuration = 160;
+ if (tEU <= 16) {
+ this.mEUt = (tEU * (1 << tTier - 1) * (1 << tTier - 1));
+ this.mMaxProgresstime = (tDuration / (1 << tTier - 1));
+ } else {
+ this.mEUt = tEU;
+ this.mMaxProgresstime = tDuration;
+ while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
+ this.mEUt *= 4;
+ this.mMaxProgresstime /= 2;
+ }
+ }
+ if (this.mEUt > 0) {
+ this.mEUt = (-this.mEUt);
+ }
+ this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
+ this.mOutputFluids = new FluidStack[]{tFluid};
+ return true;
+ }
+
+ private boolean moveOneDown() {
+ if ((this.mInventory[1] == null) || (this.mInventory[1].stackSize < 1)
+ || (!GT_Utility.areStacksEqual(this.mInventory[1], GT_ModHandler.getIC2Item("miningPipe", 1L)))) {
+ return false;
+ }
+ int xDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX;
+ int zDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ;
+ int yHead = getYOfPumpHead();
+ if (yHead <= 0) {
+ return false;
+ }
+ if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, yHead - 1, getBaseMetaTileEntity().getZCoord() + zDir) == Blocks.bedrock) {
+ return false;
+ }
+ if (!(getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord() + xDir, yHead - 1, getBaseMetaTileEntity().getZCoord() + zDir, GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))))) {
+ return false;
+ }
+ if (yHead != getBaseMetaTileEntity().getYCoord()) {
+ getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord() + xDir, yHead, getBaseMetaTileEntity().getZCoord() + zDir, GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipe", 1L)));
+ }
+ getBaseMetaTileEntity().decrStackSize(1, 1);
+ return true;
+ }
+
+ private int getYOfPumpHead() {
+ int xDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX;
+ int zDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ;
+ int y = getBaseMetaTileEntity().getYCoord() - 1;
+ while (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, y, getBaseMetaTileEntity().getZCoord() + zDir) == GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipe", 1L))) {
+ y--;
+ }
+ if (y == getBaseMetaTileEntity().getYCoord() - 1) {
+ if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, y, getBaseMetaTileEntity().getZCoord() + zDir) != GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))) {
+ return y + 1;
+ }
+ } else if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, y, getBaseMetaTileEntity().getZCoord() + zDir) != GT_Utility
+ .getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L)) && this.mInventory[1] != null && this.mInventory[1].stackSize > 0 && GT_Utility.areStacksEqual(this.mInventory[1], GT_ModHandler.getIC2Item("miningPipe", 1L))) {
+ getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord() + xDir, y, getBaseMetaTileEntity().getZCoord() + zDir,
+ GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L)));
+ getBaseMetaTileEntity().decrStackSize(0, 1);
+ }
+ return y;
+ }
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+ for (int i = -1; i < 2; i++) {
+ for (int j = -1; j < 2; j++) {
+ if ((xDir + i != 0) || (zDir + j != 0)) {
+ IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 0, zDir + j);
+ if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16)) && (!addOutputToMachineList(tTileEntity, 16)) && (!addEnergyInputToMachineList(tTileEntity, 16))) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j) != GregTech_API.sBlockCasings2) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 0, zDir + j) != 0) {
+ return false;
+ }
+ }
+ }
+ }
+ }
+ for (int y = 1; y < 4; y++) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir) != GregTech_API.sBlockCasings2) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + 1, y, zDir) != GregTech_API.sBlockMachines) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getBlockOffset(xDir - 1, y, zDir) != GregTech_API.sBlockMachines) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir + 1) != GregTech_API.sBlockMachines) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir - 1) != GregTech_API.sBlockMachines) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getBlockOffset(xDir, y + 3, zDir) != GregTech_API.sBlockMachines) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ @Override
+ public boolean isCorrectMachinePart(ItemStack aStack) {
+ return true;
+ }
+
+ @Override
+ public int getMaxEfficiency(ItemStack aStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(ItemStack aStack) {
+ return 0;
+ }
+
+ @Override
+ public int getDamageToComponent(ItemStack aStack) {
+ return 0;
+ }
+
+ @Override
+ public int getAmountOfOutputs() {
+ return 0;
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(ItemStack aStack) {
+ return false;
+ }
+
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_OilDrill(this.mName);
+ }
+
+}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
index dd7a7930a5..81259fbef8 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
@@ -108,6 +108,7 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
} else if (tmp.startsWith("arcfurnace")) {
return GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes;
}
+
return null;
}
@@ -178,9 +179,6 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
if (tInputList.size() > 0 || tFluids.length > 0) {
GT_Recipe tRecipe = map.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, gregtech.api.enums.GT_Values.V[tTier], tFluids, tInputs);
if (tRecipe != null) {
- if (tRecipe.mFluidInputs != null) {
-
- }
mLastRecipe = tRecipe;
this.mEUt = 0;
this.mOutputItems = null;
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java
new file mode 100644
index 0000000000..e14a425a39
--- /dev/null
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java
@@ -0,0 +1,171 @@
+package gregtech.common.tileentities.machines.multi;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.Textures;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+
+import java.util.ArrayList;
+
+public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlockBase {
+
+ public GT_MetaTileEntity_PyrolyseOven(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_MetaTileEntity_PyrolyseOven(String aName) {
+ super(aName);
+ }
+
+ public String[] getDescription() {
+ return new String[]{
+ "Controller Block for the Pyrolyse Oven",
+ "Industrial Charcoal producer and Oil from Plants",
+ "Size: 5x4x5, Controller (bottom center)",
+ "Made from ULV Machine Casings (min 60)",
+ "Bottom 3x3 Kantal Heating Coils",
+ "4 high ULV Casings around the coils",
+ "bottom row of casings are Energy Hatch",
+ "Maintainance Hatch and Output Hatch/Bus",
+ "top 3x3 has Input Hatch/Bus and Muffler Hatch"};
+ }
+
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ if (aSide == aFacing) {
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[0],
+ new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_LARGE_BOILER)};
+ }
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[0]};
+ }
+
+ @Override
+ public boolean checkRecipe(ItemStack aStack) {
+ ArrayList<ItemStack> tInputList = getStoredInputs();
+ ArrayList<FluidStack> tFluidInputs = getStoredFluids();
+ for (ItemStack tInput : tInputList) {
+ long tVoltage = getMaxInputVoltage();
+ byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sPyrolyseRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluidInputs.isEmpty() ? null : new FluidStack[]{tFluidInputs.get(0)}, new ItemStack[]{mInventory[1], tInput});
+ if (tRecipe != null) {
+ if (tRecipe.isRecipeInputEqual(true, tFluidInputs.isEmpty() ? null : new FluidStack[]{tFluidInputs.get(0)}, new ItemStack[]{tInput, mInventory[1]})) {
+ this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
+ this.mEfficiencyIncrease = 10000;
+
+ this.mEUt = tRecipe.mEUt;
+ this.mMaxProgresstime = tRecipe.mDuration;
+
+ if (this.mEUt > 0) {
+ this.mEUt = (-this.mEUt);
+ }
+ this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
+ if (tRecipe.mOutputs.length > 0) this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0)};
+ if (tRecipe.mFluidOutputs.length > 0)
+ this.mOutputFluids = new FluidStack[]{tRecipe.getFluidOutput(0)};
+ updateSlots();
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 2;
+ int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 2;
+ for (int i = -2; i < 3; i++) {
+ for (int j = -2; j < 3; j++) {
+ for (int h = 0; h < 4; h++) {
+ IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
+ if ((i != -2 && i != 2) && (j != -2 && j != 2)) {// innerer 3x3 ohne h�he
+ if (h == 0) {// innen boden (kantal coils)
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != GregTech_API.sBlockCasings1) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 13) {
+ return false;
+ }
+ } else if (h == 3) {// innen decke (ulv casings + input + muffler)
+ if ((!addInputToMachineList(tTileEntity, 120)) && (!addMufflerToMachineList(tTileEntity, 120))) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != GregTech_API.sBlockCasings1) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 0) {
+ return false;
+ }
+ }
+ } else {// innen air
+ if (!aBaseMetaTileEntity.getAir(xDir + i, h, zDir + j)) {
+ return false;
+ }
+ }
+ } else {// Au�erer 5x5 ohne h�he
+ if (h == 0) {// au�en boden (controller, output, energy, maintainance, rest ulv casings)
+ if ((!addMaintenanceToMachineList(tTileEntity, 120)) && (!addOutputToMachineList(tTileEntity, 120)) && (!addEnergyInputToMachineList(tTileEntity, 120))) {
+ if ((xDir + i != 0) || (zDir + j != 0)) {//no controller
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != GregTech_API.sBlockCasings1) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 0) {
+ return false;
+ }
+ }
+ }
+ } else {// au�en �ber boden (ulv casings)
+ if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != GregTech_API.sBlockCasings1) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 0) {
+ return false;
+ }
+ }
+ }
+ }
+ }
+ }
+ return true;
+ }
+
+ @Override
+ public boolean isCorrectMachinePart(ItemStack aStack) {
+ return true;
+ }
+
+ @Override
+ public int getMaxEfficiency(ItemStack aStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(ItemStack aStack) {
+ return 20;
+ }
+
+ @Override
+ public int getDamageToComponent(ItemStack aStack) {
+ return 0;
+ }
+
+ @Override
+ public int getAmountOfOutputs() {
+ return 0;
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(ItemStack aStack) {
+ return false;
+ }
+
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_PyrolyseOven(this.mName);
+ }
+
+}
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java
index d88ecb7ea9..6704b42499 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java
@@ -1,114 +1,114 @@
-package gregtech.common.tileentities.machines.steam;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.gui.GT_GUIContainer_BasicMachine;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.item.ItemStack;
-
-import java.util.Random;
-
-import static gregtech.api.enums.GT_Values.V;
-
-public class GT_MetaTileEntity_Macerator_Bronze
- extends GT_MetaTileEntity_BasicMachine_Bronze {
- public GT_MetaTileEntity_Macerator_Bronze(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional, "Macerating your Ores", 1, 1, false);
- }
-
- public GT_MetaTileEntity_Macerator_Bronze(String aName, String aDescription, ITexture[][][] aTextures) {
- super(aName, aDescription, aTextures, 1, 1, false);
- }
-
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeMacerator.png", "ic2.macerator");
- }
-
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_Macerator_Bronze(this.mName, this.mDescription, this.mTextures);
- }
-
- public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- super.onPreTick(aBaseMetaTileEntity, aTick);
- if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive()) && (aBaseMetaTileEntity.getFrontFacing() != 1) && (aBaseMetaTileEntity.getCoverIDAtSide((byte) 1) == 0) && (!aBaseMetaTileEntity.getOpacityAtSide((byte) 1))) {
- Random tRandom = aBaseMetaTileEntity.getWorld().rand;
- aBaseMetaTileEntity.getWorld().spawnParticle("smoke", aBaseMetaTileEntity.getXCoord() + 0.8F - tRandom.nextFloat() * 0.6F, aBaseMetaTileEntity.getYCoord() + 0.9F + tRandom.nextFloat() * 0.2F, aBaseMetaTileEntity.getZCoord() + 0.8F - tRandom.nextFloat() * 0.6F, 0.0D, 0.0D, 0.0D);
- }
- }
-
- public int checkRecipe() {
- GT_Recipe_Map tMap = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes;
- if (tMap == null) return DID_NOT_FIND_RECIPE;
- GT_Recipe tRecipe = tMap.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[1], null, null, getAllInputs());
- if (tRecipe == null) return DID_NOT_FIND_RECIPE;
- if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe;
- if (!canOutput(tRecipe)) {
- mOutputBlocked++;
- return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
- }
- if (tRecipe.getOutput(0) != null) mOutputItems[0] = tRecipe.getOutput(0);
- this.mEUt = 2;
- this.mMaxProgresstime = 800;
- getInputAt(0).stackSize -= tRecipe.mInputs[0].stackSize;
- return FOUND_AND_SUCCESSFULLY_USED_RECIPE;
- }
-
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) {
- return false;
- }
- return GT_ModHandler.getMaceratorOutput(GT_Utility.copyAmount(64L, new Object[]{aStack}), false, null) != null;
- }
-
- public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
- super.startSoundLoop(aIndex, aX, aY, aZ);
- if (aIndex == 1) {
- GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(201)), 10, 1.0F, aX, aY, aZ);
- }
- }
-
- public void startProcess() {
- sendLoopStart((byte) 1);
- }
-
- public ITexture[] getSideFacingActive(byte aColor) {
- return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE)};
- }
-
- public ITexture[] getSideFacingInactive(byte aColor) {
- return new ITexture[]{super.getSideFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_MACERATOR)};
- }
-
- public ITexture[] getFrontFacingActive(byte aColor) {
- return new ITexture[]{super.getFrontFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE)};
- }
-
- public ITexture[] getFrontFacingInactive(byte aColor) {
- return new ITexture[]{super.getFrontFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_MACERATOR)};
- }
-
- public ITexture[] getTopFacingActive(byte aColor) {
- return new ITexture[]{super.getTopFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR_ACTIVE)};
- }
-
- public ITexture[] getTopFacingInactive(byte aColor) {
- return new ITexture[]{super.getTopFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR)};
- }
-
- public ITexture[] getBottomFacingActive(byte aColor) {
- return new ITexture[]{super.getBottomFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE)};
- }
-
- public ITexture[] getBottomFacingInactive(byte aColor) {
- return new ITexture[]{super.getBottomFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_MACERATOR)};
- }
-}
+package gregtech.common.tileentities.machines.steam;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.Textures;
+import gregtech.api.gui.GT_GUIContainer_BasicMachine;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_Bronze;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
+import gregtech.api.util.GT_Utility;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.item.ItemStack;
+
+import java.util.Random;
+
+import static gregtech.api.enums.GT_Values.V;
+
+public class GT_MetaTileEntity_Macerator_Bronze
+ extends GT_MetaTileEntity_BasicMachine_Bronze {
+ public GT_MetaTileEntity_Macerator_Bronze(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional, "Macerating your Ores", 1, 1, false);
+ }
+
+ public GT_MetaTileEntity_Macerator_Bronze(String aName, String aDescription, ITexture[][][] aTextures) {
+ super(aName, aDescription, aTextures, 1, 1, false);
+ }
+
+ public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeMacerator.png", "ic2.macerator");
+ }
+
+ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_Macerator_Bronze(this.mName, this.mDescription, this.mTextures);
+ }
+
+ public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ super.onPreTick(aBaseMetaTileEntity, aTick);
+ if ((aBaseMetaTileEntity.isClientSide()) && (aBaseMetaTileEntity.isActive()) && (aBaseMetaTileEntity.getFrontFacing() != 1) && (aBaseMetaTileEntity.getCoverIDAtSide((byte) 1) == 0) && (!aBaseMetaTileEntity.getOpacityAtSide((byte) 1))) {
+ Random tRandom = aBaseMetaTileEntity.getWorld().rand;
+ aBaseMetaTileEntity.getWorld().spawnParticle("smoke", aBaseMetaTileEntity.getXCoord() + 0.8F - tRandom.nextFloat() * 0.6F, aBaseMetaTileEntity.getYCoord() + 0.9F + tRandom.nextFloat() * 0.2F, aBaseMetaTileEntity.getZCoord() + 0.8F - tRandom.nextFloat() * 0.6F, 0.0D, 0.0D, 0.0D);
+ }
+ }
+
+ public int checkRecipe() {
+ GT_Recipe_Map tMap = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes;
+ if (tMap == null) return DID_NOT_FIND_RECIPE;
+ GT_Recipe tRecipe = tMap.findRecipe(getBaseMetaTileEntity(), mLastRecipe, false, V[1], null, null, getAllInputs());
+ if (tRecipe == null) return DID_NOT_FIND_RECIPE;
+ if (tRecipe.mCanBeBuffered) mLastRecipe = tRecipe;
+ if (!canOutput(tRecipe)) {
+ mOutputBlocked++;
+ return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
+ }
+ if (tRecipe.getOutput(0) != null) mOutputItems[0] = tRecipe.getOutput(0);
+ this.mEUt = 2;
+ this.mMaxProgresstime = 800;
+ getInputAt(0).stackSize -= tRecipe.mInputs[0].stackSize;
+ return FOUND_AND_SUCCESSFULLY_USED_RECIPE;
+ }
+
+ public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) {
+ return false;
+ }
+ return GT_ModHandler.getMaceratorOutput(GT_Utility.copyAmount(64L, new Object[]{aStack}), false, null) != null;
+ }
+
+ public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
+ super.startSoundLoop(aIndex, aX, aY, aZ);
+ if (aIndex == 1) {
+ GT_Utility.doSoundAtClient((String) GregTech_API.sSoundList.get(Integer.valueOf(201)), 10, 1.0F, aX, aY, aZ);
+ }
+ }
+
+ public void startProcess() {
+ sendLoopStart((byte) 1);
+ }
+
+ public ITexture[] getSideFacingActive(byte aColor) {
+ return new ITexture[]{super.getSideFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE)};
+ }
+
+ public ITexture[] getSideFacingInactive(byte aColor) {
+ return new ITexture[]{super.getSideFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_STEAM_MACERATOR)};
+ }
+
+ public ITexture[] getFrontFacingActive(byte aColor) {
+ return new ITexture[]{super.getFrontFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE)};
+ }
+
+ public ITexture[] getFrontFacingInactive(byte aColor) {
+ return new ITexture[]{super.getFrontFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_STEAM_MACERATOR)};
+ }
+
+ public ITexture[] getTopFacingActive(byte aColor) {
+ return new ITexture[]{super.getTopFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR_ACTIVE)};
+ }
+
+ public ITexture[] getTopFacingInactive(byte aColor) {
+ return new ITexture[]{super.getTopFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_STEAM_MACERATOR)};
+ }
+
+ public ITexture[] getBottomFacingActive(byte aColor) {
+ return new ITexture[]{super.getBottomFacingActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE)};
+ }
+
+ public ITexture[] getBottomFacingInactive(byte aColor) {
+ return new ITexture[]{super.getBottomFacingInactive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_STEAM_MACERATOR)};
+ }
+}
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Turbine_Small.java b/src/main/java/gregtech/common/tools/GT_Tool_Turbine_Small.java
index 58bd6b2d00..d9517525c2 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Turbine_Small.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Turbine_Small.java
@@ -23,5 +23,4 @@ public class GT_Tool_Turbine_Small extends GT_Tool_Turbine {
public IIconContainer getTurbineIcon() {
return Textures.ItemIcons.TURBINE_SMALL;
}
-
}
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 0a703f23cc..7ce3155d82 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java
@@ -114,4 +114,14 @@ public class GT_Tool_Wrench
public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
return new ChatComponentText(EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE + " threw a Monkey Wrench into the Plans of " + EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE);
}
-} \ No newline at end of file
+}
+
+
+
+/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar
+
+ * Qualified Name: gregtech.common.tools.GT_Tool_Wrench
+
+ * JD-Core Version: 0.7.0.1
+
+ */ \ No newline at end of file