aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/xmod')
-rw-r--r--src/Java/gtPlusPlus/xmod/eio/material/MaterialEIO.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java109
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java12
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java17
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java14
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java155
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java9
7 files changed, 139 insertions, 183 deletions
diff --git a/src/Java/gtPlusPlus/xmod/eio/material/MaterialEIO.java b/src/Java/gtPlusPlus/xmod/eio/material/MaterialEIO.java
index a8c5382a21..a5c87342e7 100644
--- a/src/Java/gtPlusPlus/xmod/eio/material/MaterialEIO.java
+++ b/src/Java/gtPlusPlus/xmod/eio/material/MaterialEIO.java
@@ -61,7 +61,7 @@ public class MaterialEIO {
10,
10,
10,
- false, //Uses Blast furnace?
+ true, //Uses Blast furnace?
false, //Generates a cell
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -77,7 +77,7 @@ public class MaterialEIO {
10,
10,
10,
- false, //Uses Blast furnace?
+ true, //Uses Blast furnace?
false, //Generates a cell
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
@@ -94,7 +94,7 @@ public class MaterialEIO {
10,
10,
10,
- false, //Uses Blast furnace?
+ true, //Uses Blast furnace?
false, //Generates a cell
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
index 79f5b22840..3a79b2a446 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
@@ -215,7 +215,7 @@ GT_MetaTileEntity_MultiBlockBase {
}
super.updateSlots();
}
-
+
public boolean isToolCreative(ItemStack mStack){
Materials t1 = GT_MetaGenerated_Tool.getPrimaryMaterial(mStack);
Materials t2 = GT_MetaGenerated_Tool.getSecondaryMaterial(mStack);
@@ -252,7 +252,7 @@ GT_MetaTileEntity_MultiBlockBase {
return this.mMultiDynamoHatches.add(
(GT_MetaTileEntity_Hatch) aMetaTileEntity);
}
-
+
}
return super.addToMachineList(aTileEntity, aBaseCasingIndex);
}
@@ -322,19 +322,19 @@ GT_MetaTileEntity_MultiBlockBase {
}
return false;
}
-
+
/**
* Enable Texture Casing Support if found in GT 5.09
*/
-
+
public boolean updateTexture(final IGregTechTileEntity aTileEntity, int aCasingID){
try {
Method mProper = Class.forName("gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch").getDeclaredMethod("updateTexture", int.class);
if (mProper != null){
if (aTileEntity instanceof GT_MetaTileEntity_Hatch){
- mProper.setAccessible(true);
- mProper.invoke(this, aCasingID);
- return true;
+ mProper.setAccessible(true);
+ mProper.invoke(this, aCasingID);
+ return true;
}
}
else {
@@ -344,33 +344,33 @@ GT_MetaTileEntity_MultiBlockBase {
catch (NoSuchMethodException | SecurityException | ClassNotFoundException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {}
return false;
}
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
/**
* TecTech Support
*/
-
-
+
+
/**
* This is the array Used to Store the Tectech Multi-Amp hatches.
*/
-
+
public ArrayList<GT_MetaTileEntity_Hatch> mMultiDynamoHatches = new ArrayList();
-
+
/**
* TecTech Multi-Amp Dynamo Support
* @param aTileEntity - The Dynamo Hatch
* @param aBaseCasingIndex - Casing Texture
* @return
*/
-
+
public boolean addMultiAmpDynamoToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex){
//GT_MetaTileEntity_Hatch_DynamoMulti
if (aTileEntity == null) {
@@ -386,7 +386,7 @@ GT_MetaTileEntity_MultiBlockBase {
}
return false;
}
-
+
public boolean isThisHatchMultiDynamo(){
Class mDynamoClass;
try {
@@ -407,12 +407,12 @@ GT_MetaTileEntity_MultiBlockBase {
if (isThisHatchMultiDynamo()) {
addMultiAmpDynamoToMachineList(aTileEntity, aBaseCasingIndex);
}
-
+
}
return super.addDynamoToMachineList(aTileEntity, aBaseCasingIndex);
}
-
+
/**
* Pollution Management
*/
@@ -421,65 +421,4 @@ GT_MetaTileEntity_MultiBlockBase {
return 0;
}
- public boolean polluteEnvironment(int aPollutionLevel) {
- try {
- Integer mPollution = 0;
- Field f = ReflectionUtils.getField(this.getClass(), "mPollution");
- if (f != null){
- Logger.REFLECTION("pollution field was not null");
- try {
- mPollution = (Integer) f.get(this);
- if (mPollution != null){
- Logger.REFLECTION("pollution field value was not null");
- }
- else {
- Logger.REFLECTION("pollution field value was null");
- }
- }
- catch (IllegalArgumentException | IllegalAccessException e) {}
- }
- else {
- Logger.REFLECTION("pollution field was null");
- }
-
- if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && f != null){
- Logger.REFLECTION("doing pollution");
- mPollution += aPollutionLevel;
- for (final GT_MetaTileEntity_Hatch_Muffler tHatch : this.mMufflerHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- if (mPollution < 10000) {
- break;
- }
- if (!polluteEnvironmentHatch(tHatch)) {
- continue;
- }
- mPollution -= 10000;
- }
- }
- return mPollution < 10000;
- }
- else {
- return false;
- }
- }
- catch (Throwable t){
- Logger.REFLECTION("Failed to add pollution.");
- t.printStackTrace();
- return false;
- }
- }
-
- public boolean polluteEnvironmentHatch(GT_MetaTileEntity_Hatch_Muffler tHatch) {
- if (tHatch.getBaseMetaTileEntity().getAirAtSide(this.getBaseMetaTileEntity().getFrontFacing())) {
- PollutionUtils.addPollution(tHatch.getBaseMetaTileEntity(), calculatePollutionReduction(tHatch, 10000));
- return true;
- } else {
- return false;
- }
- }
-
- public int calculatePollutionReduction(GT_MetaTileEntity_Hatch_Muffler tHatch, int aPollution) {
- return (int) ((double) aPollution * Math.pow(0.7D, (double) (tHatch.mTier - 1)));
- }
-
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java
index f675cbe2ff..a177cf76ae 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java
@@ -7,8 +7,10 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicTank;
import gregtech.api.objects.GT_RenderedTexture;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
public class GT_MetaTileEntity_TieredTank extends GT_MetaTileEntity_BasicTank {
@@ -128,5 +130,15 @@ public class GT_MetaTileEntity_TieredTank extends GT_MetaTileEntity_BasicTank {
public boolean displaysStackSize() {
return false;
}
+
+ @Override
+ public void setItemNBT(NBTTagCompound aNBT) {
+ Logger.INFO("Setting item nbt");
+ super.setItemNBT(aNBT);
+ if (mFluid != null){
+ Logger.INFO("Setting item fluid nbt");
+ aNBT.setTag("mFluid", mFluid.writeToNBT(new NBTTagCompound()));
+ }
+ }
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java
index ed8b4b9a82..b6cf38cd9e 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java
@@ -123,15 +123,15 @@ public class RecipeGen_BlastSmelter implements Runnable{
if (GT_Values.RA.addFluidExtractionRecipe(M.getIngot(1), null, M.getFluid(144), 100, duration, 120)){
Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
}
- if (GT_Values.RA.addFluidExtractionRecipe(ItemUtils.getItemStackOfAmountFromOreDictNoBroken("nugget"+M.getUnlocalizedName(), 1), null, M.getFluid(16), 100, duration/9, 120)){
+ if (GT_Values.RA.addFluidExtractionRecipe(M.getNugget(1), null, M.getFluid(16), 100, duration/9, 120)){
Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
}
- if (GT_Values.RA.addFluidExtractionRecipe(M.getSmallDust(1), null, M.getFluid(36), 100, duration/4, 120)){
+ /*if (GT_Values.RA.addFluidExtractionRecipe(M.getSmallDust(1), null, M.getFluid(36), 100, duration/4, 120)){
Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
}
if (GT_Values.RA.addFluidExtractionRecipe(M.getTinyDust(1), null, M.getFluid(16), 100, duration/9, 120)){
Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
- }
+ }*/
}
}
else {
@@ -146,18 +146,15 @@ public class RecipeGen_BlastSmelter implements Runnable{
if (GT_Values.RA.addFluidExtractionRecipe(M.getIngot(1), null, M.getFluid(144), 100, duration/2, 60)){
Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
}
- final ItemStack tempitem = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("nugget"+M.getUnlocalizedName(), 1);
- if (tempitem != null){
- if (GT_Values.RA.addFluidExtractionRecipe(tempitem, null, M.getFluid(16), 100, duration/2/9, 60)){
- Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
- }
+ if (GT_Values.RA.addFluidExtractionRecipe(M.getNugget(1), null, M.getFluid(16), 100, duration/2/9, 60)){
+ Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
}
- if (GT_Values.RA.addFluidExtractionRecipe(M.getSmallDust(1), null, M.getFluid(36), 100, duration/2/4, 60)){
+ /*if (GT_Values.RA.addFluidExtractionRecipe(M.getSmallDust(1), null, M.getFluid(36), 100, duration/2/4, 60)){
Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
}
if (GT_Values.RA.addFluidExtractionRecipe(M.getTinyDust(1), null, M.getFluid(16), 100, duration/2/9, 60)){
Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
- }
+ }*/
}
}
else {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java
index 426b73f0d8..41fb792fc0 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java
@@ -6,6 +6,7 @@ import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.material.MaterialStack;
import gtPlusPlus.core.material.state.MaterialState;
+import gtPlusPlus.core.recipe.common.CI;
import gtPlusPlus.core.util.item.ItemUtils;
import gtPlusPlus.core.util.recipe.RecipeUtils;
import net.minecraft.item.ItemStack;
@@ -224,6 +225,19 @@ public class RecipeGen_DustGeneration implements Runnable{
input3 = (inputStacks.length >= 3) ? (input3 = (inputStacks[2] == null) ? null : inputStacks[2]) : null;
input4 = (inputStacks.length >= 4) ? (input4 = (inputStacks[3] == null) ? null : inputStacks[3]) : null;
+ if (inputStacks.length == 1) {
+ input2 = CI.getNumberedCircuit(20);
+ }
+ else if (inputStacks.length == 2) {
+ input3 = CI.getNumberedCircuit(20);
+
+ }
+ else if (inputStacks.length == 3) {
+ input4 = CI.getNumberedCircuit(20);
+
+ }
+
+
//Add mixer Recipe
FluidStack oxygen = GT_Values.NF;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java
index 5388f68146..610227e6e8 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java
@@ -26,91 +26,80 @@ public class RecipeGen_Fluids implements Runnable{
//Melting Shapes to fluid
if (!material.getFluid(1).getUnlocalizedName().toLowerCase().contains("plasma")){
- //Dust
- /*if (GT_Values.RA.addFluidExtractionRecipe(material.getDust(1), //Input
- null, //Input 2
- material.getFluid(144), //Fluid Output
- 0, //Chance
- 1*20, //Duration
- 16 //Eu Tick
- )){
- Utils.LOG_WARNING("144l fluid extractor from 1 Dust Recipe: "+material.getLocalizedName()+" - Success");
- }
- else {
- Utils.LOG_WARNING("144l fluid extractor from 1 Dust Recipe: "+material.getLocalizedName()+" - Failed");
- }*/
-
- //Ingot
- if (GT_Values.RA.addFluidExtractionRecipe(material.getIngot(1), //Input
- null, //Input 2
- material.getFluid(144), //Fluid Output
- 0, //Chance
- 1*20, //Duration
- 16 //Eu Tick
- )){
- Logger.WARNING("144l fluid extractor from 1 ingot Recipe: "+material.getLocalizedName()+" - Success");
- }
- else {
- Logger.WARNING("144l fluid extractor from 1 ingot Recipe: "+material.getLocalizedName()+" - Failed");
- }
-
- //Plate
- if (GT_Values.RA.addFluidExtractionRecipe(material.getPlate(1), //Input
- null, //Input 2
- material.getFluid(144), //Fluid Output
- 0, //Chance
- 1*20, //Duration
- 16 //Eu Tick
- )){
- Logger.WARNING("144l fluid extractor from 1 plate Recipe: "+material.getLocalizedName()+" - Success");
- }
- else {
- Logger.WARNING("144l fluid extractor from 1 plate Recipe: "+material.getLocalizedName()+" - Failed");
- }
+
+ if (!material.requiresBlastFurnace()) {
+
+ //Ingot
+ if (GT_Values.RA.addFluidExtractionRecipe(material.getIngot(1), //Input
+ null, //Input 2
+ material.getFluid(144), //Fluid Output
+ 0, //Chance
+ 1*20, //Duration
+ 16 //Eu Tick
+ )){
+ Logger.WARNING("144l fluid extractor from 1 ingot Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING("144l fluid extractor from 1 ingot Recipe: "+material.getLocalizedName()+" - Failed");
+ }
+
+ //Plate
+ if (GT_Values.RA.addFluidExtractionRecipe(material.getPlate(1), //Input
+ null, //Input 2
+ material.getFluid(144), //Fluid Output
+ 0, //Chance
+ 1*20, //Duration
+ 16 //Eu Tick
+ )){
+ Logger.WARNING("144l fluid extractor from 1 plate Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING("144l fluid extractor from 1 plate Recipe: "+material.getLocalizedName()+" - Failed");
+ }
+
+ //Double Plate
+ if (GT_Values.RA.addFluidExtractionRecipe(material.getPlateDouble(1), //Input
+ null, //Input 2
+ material.getFluid(288), //Fluid Output
+ 0, //Chance
+ 1*20, //Duration
+ 16 //Eu Tick
+ )){
+ Logger.WARNING("144l fluid extractor from 1 double plate Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING("144l fluid extractor from 1 double plate Recipe: "+material.getLocalizedName()+" - Failed");
+ }
+
+ //Nugget
+ if (GT_Values.RA.addFluidExtractionRecipe(material.getNugget(1), //Input
+ null, //Input 2
+ material.getFluid(16), //Fluid Output
+ 0, //Chance
+ 16, //Duration
+ 8 //Eu Tick
+ )){
+ Logger.WARNING("16l fluid extractor from 1 nugget Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING("16l fluid extractor from 1 nugget Recipe: "+material.getLocalizedName()+" - Failed");
+ }
+
+ //Block
+ if (GT_Values.RA.addFluidExtractionRecipe(material.getBlock(1), //Input
+ null, //Input 2
+ material.getFluid(144*9), //Fluid Output
+ 0, //Chance
+ 288, //Duration
+ 16 //Eu Tick
+ )){
+ Logger.WARNING((144*9)+"l fluid extractor from 1 block Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING((144*9)+"l fluid extractor from 1 block Recipe: "+material.getLocalizedName()+" - Failed");
+ }
- //Double Plate
- if (GT_Values.RA.addFluidExtractionRecipe(material.getPlateDouble(1), //Input
- null, //Input 2
- material.getFluid(288), //Fluid Output
- 0, //Chance
- 1*20, //Duration
- 16 //Eu Tick
- )){
- Logger.WARNING("144l fluid extractor from 1 double plate Recipe: "+material.getLocalizedName()+" - Success");
}
- else {
- Logger.WARNING("144l fluid extractor from 1 double plate Recipe: "+material.getLocalizedName()+" - Failed");
- }
-
- //Nugget
- if (GT_Values.RA.addFluidExtractionRecipe(material.getNugget(1), //Input
- null, //Input 2
- material.getFluid(16), //Fluid Output
- 0, //Chance
- 16, //Duration
- 8 //Eu Tick
- )){
- Logger.WARNING("16l fluid extractor from 1 nugget Recipe: "+material.getLocalizedName()+" - Success");
- }
- else {
- Logger.WARNING("16l fluid extractor from 1 nugget Recipe: "+material.getLocalizedName()+" - Failed");
- }
-
- //Block
- if (GT_Values.RA.addFluidExtractionRecipe(material.getBlock(1), //Input
- null, //Input 2
- material.getFluid(144*9), //Fluid Output
- 0, //Chance
- 288, //Duration
- 16 //Eu Tick
- )){
- Logger.WARNING((144*9)+"l fluid extractor from 1 block Recipe: "+material.getLocalizedName()+" - Success");
- }
- else {
- Logger.WARNING((144*9)+"l fluid extractor from 1 block Recipe: "+material.getLocalizedName()+" - Failed");
- }
-
-
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java
index a584323cf3..f3287f338c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java
@@ -64,20 +64,24 @@ public class GregtechConduits {
}
private static void run1(){
+
if (LoadedMods.Big_Reactors){
wireFactory("Blutonium", 8196, BaseWireID, 8, 32, 2, new short[]{28, 28, 218, 0});
wireFactory("Cyanite", 512, BaseWireID+15, 2, 16, 4, new short[]{27, 130, 178, 0});
wireFactory("Yellorium", 2048, BaseWireID+30, 4, 16, 2, new short[]{150, 195, 54, 0});
}
+
if (LoadedMods.EnderIO){
wireFactory("RedstoneAlloy", 32, BaseWireID+45, 0, 2, 1, new short[]{178,34,34, 0});
}
if(!GTNH) {
- customWireFactory(ALLOY.LEAGRISIUM, 512, BaseWireID + 45 + 11, 1, 2, 2);
+ customWireFactory(ALLOY.LEAGRISIUM, 512, BaseWireID + 56, 1, 2, 2);
customWireFactory(ELEMENT.getInstance().ZIRCONIUM, 128, BaseWireID + 67, 1, 2, 2);
customWireFactory(ALLOY.HG1223, 32768, BaseWireID + 78, 2, 8, 4);
}
+
+ customWireFactory(ALLOY.TRINIUM_TITANIUM, 2048, BaseWireID + 89, 1, 2, 16);
//superConductorFactory(GT_Materials.Superconductor, 524288, 30660, 0, 0, 8);
if (LoadedMods.Thaumcraft){
@@ -106,6 +110,7 @@ public class GregtechConduits {
}
generateGTFluidPipes(Materials.Clay, BasePipeID+65, 100, 500, false);
generateGTFluidPipes(Materials.Lead, BasePipeID+70, 720, 1200, true);
+
}
private static void wireFactory(final String Material, final int Voltage, final int ID, final long insulatedLoss, final long uninsulatedLoss, final long Amps, final short[] rgb){
@@ -234,7 +239,7 @@ public class GregtechConduits {
}
private static void generateNonGTFluidPipes(final GT_Materials material, final Material myMaterial, final int startID, final int transferRatePerSec, final int heatResistance, final boolean isGasProof){
- final int transferRatePerTick = transferRatePerSec/20;
+ final int transferRatePerTick = transferRatePerSec/10;
long mass;
long voltage;
if (myMaterial != null){