Merge remote-tracking branch 'remotes/JohannesGaessler/SteamProductionImprovement' into unstable
This commit is contained in:
commit
19a5320f00
71 changed files with 547 additions and 526 deletions
|
@ -29,7 +29,7 @@ public class GT_MetaTileEntity_E_Furnace extends GT_MetaTileEntity_BasicMachine
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_E_Furnace(mName, mTier, mDescription, mTextures, mGUIName, mNEIName);
|
return new GT_MetaTileEntity_E_Furnace(mName, mTier, mDescriptionArray, mTextures, mGUIName, mNEIName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -43,9 +43,9 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getDescription() {
|
public String[] getDescription() {
|
||||||
String[] desc = new String[mDescription.length + 1];
|
String[] desc = new String[mDescriptionArray.length + 1];
|
||||||
System.arraycopy(mDescription, 0, desc, 0, mDescription.length);
|
System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length);
|
||||||
desc[mDescription.length] = mInventory.length + " Slots";
|
desc[mDescriptionArray.length] = mInventory.length + " Slots";
|
||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_BasicBatteryBuffer(mName, mTier, mDescription, mTextures, mInventory.length);
|
return new GT_MetaTileEntity_BasicBatteryBuffer(mName, mTier, mDescriptionArray, mTextures, mInventory.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -29,7 +29,7 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity
|
||||||
public GT_MetaTileEntity_BasicGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
|
public GT_MetaTileEntity_BasicGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
|
||||||
super(aName, aTier, 3, aDescription, aTextures);
|
super(aName, aTier, 3, aDescription, aTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_MetaTileEntity_BasicGenerator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
public GT_MetaTileEntity_BasicGenerator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||||
super(aName, aTier, 3, aDescription, aTextures);
|
super(aName, aTier, 3, aDescription, aTextures);
|
||||||
}
|
}
|
||||||
|
@ -59,9 +59,9 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getDescription() {
|
public String[] getDescription() {
|
||||||
String[] desc = new String[mDescription.length + 1];
|
String[] desc = new String[mDescriptionArray.length + 1];
|
||||||
System.arraycopy(mDescription, 0, desc, 0, mDescription.length);
|
System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length);
|
||||||
desc[mDescription.length] = "Fuel Efficiency: " + getEfficiency() + "%";
|
desc[mDescriptionArray.length] = "Fuel Efficiency: " + getEfficiency() + "%";
|
||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,8 +203,8 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity
|
||||||
if (tFuelValue > 0 && tConsumed > 0 && mFluid.amount > tConsumed) {
|
if (tFuelValue > 0 && tConsumed > 0 && mFluid.amount > tConsumed) {
|
||||||
long tFluidAmountToUse = Math.min(mFluid.amount / tConsumed, (maxEUStore() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue);
|
long tFluidAmountToUse = Math.min(mFluid.amount / tConsumed, (maxEUStore() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue);
|
||||||
if (tFluidAmountToUse > 0 && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)) {
|
if (tFluidAmountToUse > 0 && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)) {
|
||||||
GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()),
|
GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()),
|
||||||
10 * getPollution());
|
10 * getPollution());
|
||||||
mFluid.amount -= tFluidAmountToUse * tConsumed;
|
mFluid.amount -= tFluidAmountToUse * tConsumed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -216,8 +216,8 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity
|
||||||
if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), tEmptyContainer)) {
|
if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), tEmptyContainer)) {
|
||||||
aBaseMetaTileEntity.increaseStoredEnergyUnits(tFuelValue, true);
|
aBaseMetaTileEntity.increaseStoredEnergyUnits(tFuelValue, true);
|
||||||
aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1);
|
aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1);
|
||||||
GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()),
|
GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()),
|
||||||
10 * getPollution());
|
10 * getPollution());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -226,7 +226,7 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity
|
||||||
if (aBaseMetaTileEntity.isServerSide())
|
if (aBaseMetaTileEntity.isServerSide())
|
||||||
aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.getUniversalEnergyStored() >= maxEUOutput() + getMinimumStoredEU());
|
aBaseMetaTileEntity.setActive(aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.getUniversalEnergyStored() >= maxEUOutput() + getMinimumStoredEU());
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract int getPollution();
|
public abstract int getPollution();
|
||||||
|
|
||||||
public abstract GT_Recipe_Map getRecipes();
|
public abstract GT_Recipe_Map getRecipes();
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class GT_MetaTileEntity_BasicHull extends GT_MetaTileEntity_BasicTank {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_BasicHull(mName, mTier, mInventory.length, mDescription, mTextures);
|
return new GT_MetaTileEntity_BasicHull(mName, mTier, mInventory.length, mDescriptionArray, mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -35,6 +35,7 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_
|
||||||
private final String mSound;
|
private final String mSound;
|
||||||
private final boolean mSharedTank, mRequiresFluidForFiltering;
|
private final boolean mSharedTank, mRequiresFluidForFiltering;
|
||||||
private final byte mGUIParameterA, mGUIParameterB;
|
private final byte mGUIParameterA, mGUIParameterB;
|
||||||
|
|
||||||
public GT_MetaTileEntity_BasicMachine_GT_Recipe(int aID, String aName, String aNameRegional, int aTier, String aDescription, GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int aTankCapacity, int aGUIParameterA, int aGUIParameterB, String aGUIName, String aSound, boolean aSharedTank, boolean aRequiresFluidForFiltering, int aSpecialEffect, String aOverlays, Object[] aRecipe) {
|
public GT_MetaTileEntity_BasicMachine_GT_Recipe(int aID, String aName, String aNameRegional, int aTier, String aDescription, GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int aTankCapacity, int aGUIParameterA, int aGUIParameterB, String aGUIName, String aSound, boolean aSharedTank, boolean aRequiresFluidForFiltering, int aSpecialEffect, String aOverlays, Object[] aRecipe) {
|
||||||
super(aID, aName, aNameRegional, aTier, aRecipes.mAmperage, aDescription, aInputSlots, aOutputSlots, aGUIName, aRecipes.mNEIName, new ITexture[]{new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_SIDE_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_SIDE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_FRONT_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_FRONT")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_TOP_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_TOP")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_BOTTOM_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_BOTTOM"))});
|
super(aID, aName, aNameRegional, aTier, aRecipes.mAmperage, aDescription, aInputSlots, aOutputSlots, aGUIName, aRecipes.mNEIName, new ITexture[]{new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_SIDE_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_SIDE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_FRONT_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_FRONT")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_TOP_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_TOP")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_BOTTOM_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_BOTTOM"))});
|
||||||
mSharedTank = aSharedTank;
|
mSharedTank = aSharedTank;
|
||||||
|
@ -74,8 +75,8 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_
|
||||||
case 6:
|
case 6:
|
||||||
case 7:
|
case 7:
|
||||||
case 8:
|
case 8:
|
||||||
aRecipe[i] = Ic2Items.reinforcedGlass;
|
aRecipe[i] = Ic2Items.reinforcedGlass;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
aRecipe[i] = new ItemStack(Blocks.glass, 1, W);
|
aRecipe[i] = new ItemStack(Blocks.glass, 1, W);
|
||||||
break;
|
break;
|
||||||
|
@ -621,7 +622,7 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_BasicMachine_GT_Recipe(mName, mTier, mDescription, mRecipes, mInputSlotCount, mOutputItems == null ? 0 : mOutputItems.length, mTankCapacity, mAmperage, mGUIParameterA, mGUIParameterB, mTextures, mGUIName, mNEIName, mSound, mSharedTank, mRequiresFluidForFiltering, mSpecialEffect);
|
return new GT_MetaTileEntity_BasicMachine_GT_Recipe(mName, mTier, mDescriptionArray, mRecipes, mInputSlotCount, mOutputItems == null ? 0 : mOutputItems.length, mTankCapacity, mAmperage, mGUIParameterA, mGUIParameterB, mTextures, mGUIName, mNEIName, mSound, mSharedTank, mRequiresFluidForFiltering, mSpecialEffect);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -634,17 +635,21 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_
|
||||||
return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), mGUIName, GT_Utility.isStringValid(mNEIName) ? mNEIName : getRecipeList() != null ? getRecipeList().mUnlocalizedName : "", mGUIParameterA, mGUIParameterB);
|
return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), mGUIName, GT_Utility.isStringValid(mNEIName) ? mNEIName : getRecipeList() != null ? getRecipeList().mUnlocalizedName : "", mGUIParameterA, mGUIParameterB);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
||||||
if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) return false;
|
if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) return false;
|
||||||
if (mInventory[aIndex] != null) return true;
|
if (mInventory[aIndex] != null) return true;
|
||||||
switch (mInputSlotCount) {
|
switch (mInputSlotCount) {
|
||||||
case 0: return false;
|
case 0:
|
||||||
case 1: return getFillableStack() == null ? !mRequiresFluidForFiltering && getRecipeList().containsInput(aStack) : null!=getRecipeList().findRecipe(getBaseMetaTileEntity(), mLastRecipe, true, V[mTier], new FluidStack[] {getFillableStack()}, getSpecialSlot(), new ItemStack[] {aStack});
|
return false;
|
||||||
case 2: return (!mRequiresFluidForFiltering || getFillableStack() != null) && (((getInputAt(0)!=null&&getInputAt(1)!=null) || (getInputAt(0)==null&&getInputAt(1)==null?getRecipeList().containsInput(aStack):(getRecipeList().containsInput(aStack)&&null!=getRecipeList().findRecipe(getBaseMetaTileEntity(), mLastRecipe, true, V[mTier], new FluidStack[] {getFillableStack()}, getSpecialSlot(), aIndex == getInputSlot() ? new ItemStack[] {aStack, getInputAt(1)} : new ItemStack[] {getInputAt(0), aStack})))));
|
case 1:
|
||||||
default: return getRecipeList().containsInput(aStack);
|
return getFillableStack() == null ? !mRequiresFluidForFiltering && getRecipeList().containsInput(aStack) : null != getRecipeList().findRecipe(getBaseMetaTileEntity(), mLastRecipe, true, V[mTier], new FluidStack[]{getFillableStack()}, getSpecialSlot(), new ItemStack[]{aStack});
|
||||||
}
|
case 2:
|
||||||
}
|
return (!mRequiresFluidForFiltering || getFillableStack() != null) && (((getInputAt(0) != null && getInputAt(1) != null) || (getInputAt(0) == null && getInputAt(1) == null ? getRecipeList().containsInput(aStack) : (getRecipeList().containsInput(aStack) && null != getRecipeList().findRecipe(getBaseMetaTileEntity(), mLastRecipe, true, V[mTier], new FluidStack[]{getFillableStack()}, getSpecialSlot(), aIndex == getInputSlot() ? new ItemStack[]{aStack, getInputAt(1)} : new ItemStack[]{getInputAt(0), aStack})))));
|
||||||
|
default:
|
||||||
|
return getRecipeList().containsInput(aStack);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
||||||
|
|
|
@ -79,7 +79,7 @@ public class GT_MetaTileEntity_Hatch_Dynamo extends GT_MetaTileEntity_Hatch {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Hatch_Dynamo(mName, mTier, mDescription, mTextures);
|
return new GT_MetaTileEntity_Hatch_Dynamo(mName, mTier, mDescriptionArray, mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -84,7 +84,7 @@ public class GT_MetaTileEntity_Hatch_Energy extends GT_MetaTileEntity_Hatch {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Hatch_Energy(mName, mTier, mDescription, mTextures);
|
return new GT_MetaTileEntity_Hatch_Energy(mName, mTier, mDescriptionArray, mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class GT_MetaTileEntity_Hatch_Input extends GT_MetaTileEntity_Hatch {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Hatch_Input(mName, mTier, mDescription, mTextures);
|
return new GT_MetaTileEntity_Hatch_Input(mName, mTier, mDescriptionArray, mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Hatch_InputBus(mName, mTier, mDescription, mTextures);
|
return new GT_MetaTileEntity_Hatch_InputBus(mName, mTier, mDescriptionArray, mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
package gregtech.api.metatileentity.implementations;
|
package gregtech.api.metatileentity.implementations;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import gregtech.GT_Mod;
|
import gregtech.GT_Mod;
|
||||||
import gregtech.api.GregTech_API;
|
import gregtech.api.GregTech_API;
|
||||||
import gregtech.api.enums.ItemList;
|
import gregtech.api.enums.ItemList;
|
||||||
|
@ -28,6 +25,8 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import scala.actors.threadpool.Arrays;
|
import scala.actors.threadpool.Arrays;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch {
|
public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch {
|
||||||
public boolean mWrench = false, mScrewdriver = false, mSoftHammer = false, mHardHammer = false, mSolderingTool = false, mCrowbar = false, mAuto;
|
public boolean mWrench = false, mScrewdriver = false, mSoftHammer = false, mHardHammer = false, mSolderingTool = false, mCrowbar = false, mAuto;
|
||||||
|
|
||||||
|
@ -35,7 +34,7 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch
|
||||||
super(aID, aName, aNameRegional, aTier, 1, "For maintaining Multiblocks");
|
super(aID, aName, aNameRegional, aTier, 1, "For maintaining Multiblocks");
|
||||||
mAuto = false;
|
mAuto = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_MetaTileEntity_Hatch_Maintenance(int aID, String aName, String aNameRegional, int aTier, boolean aAuto) {
|
public GT_MetaTileEntity_Hatch_Maintenance(int aID, String aName, String aNameRegional, int aTier, boolean aAuto) {
|
||||||
super(aID, aName, aNameRegional, aTier, 4, "For automatically maintaining Multiblocks");
|
super(aID, aName, aNameRegional, aTier, 4, "For automatically maintaining Multiblocks");
|
||||||
mAuto = aAuto;
|
mAuto = aAuto;
|
||||||
|
@ -53,19 +52,19 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getDescription() {
|
public String[] getDescription() {
|
||||||
if (mAuto) {
|
if (mAuto) {
|
||||||
String[] desc = new String[mDescription.length + 3];
|
String[] desc = new String[mDescriptionArray.length + 3];
|
||||||
System.arraycopy(mDescription, 0, desc, 0, mDescription.length);
|
System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length);
|
||||||
desc[mDescription.length] = "4 Ducttape, 2 Lubricant Cells";
|
desc[mDescriptionArray.length] = "4 Ducttape, 2 Lubricant Cells";
|
||||||
desc[mDescription.length + 1] = "4 Steel Screws, 2 Adv Circuits";
|
desc[mDescriptionArray.length + 1] = "4 Steel Screws, 2 Adv Circuits";
|
||||||
desc[mDescription.length + 2] = "For each autorepair";
|
desc[mDescriptionArray.length + 2] = "For each autorepair";
|
||||||
return desc;
|
return desc;
|
||||||
} else {
|
} else {
|
||||||
String[] desc = new String[mDescription.length + 1];
|
String[] desc = new String[mDescriptionArray.length + 1];
|
||||||
System.arraycopy(mDescription, 0, desc, 0, mDescription.length);
|
System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length);
|
||||||
desc[mDescription.length] = "Cannot be shared between Multiblocks!";
|
desc[mDescriptionArray.length] = "Cannot be shared between Multiblocks!";
|
||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -105,8 +104,9 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
if(aTileEntity.getMetaTileID()==111) return new GT_MetaTileEntity_Hatch_Maintenance(mName, mTier, mDescription, mTextures, true);
|
if (aTileEntity.getMetaTileID() == 111)
|
||||||
return new GT_MetaTileEntity_Hatch_Maintenance(mName, mTier, mDescription, mTextures, false);
|
return new GT_MetaTileEntity_Hatch_Maintenance(mName, mTier, mDescriptionArray, mTextures, true);
|
||||||
|
return new GT_MetaTileEntity_Hatch_Maintenance(mName, mTier, mDescriptionArray, mTextures, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -118,65 +118,65 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||||
if(mAuto) return new GT_Container_2by2(aPlayerInventory, aBaseMetaTileEntity);
|
if (mAuto) return new GT_Container_2by2(aPlayerInventory, aBaseMetaTileEntity);
|
||||||
return new GT_Container_MaintenanceHatch(aPlayerInventory, aBaseMetaTileEntity);
|
return new GT_Container_MaintenanceHatch(aPlayerInventory, aBaseMetaTileEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||||
if(mAuto) return new GT_GUIContainer_2by2(aPlayerInventory, aBaseMetaTileEntity, getLocalName());
|
if (mAuto) return new GT_GUIContainer_2by2(aPlayerInventory, aBaseMetaTileEntity, getLocalName());
|
||||||
return new GT_GUIContainer_MaintenanceHatch(aPlayerInventory, aBaseMetaTileEntity);
|
return new GT_GUIContainer_MaintenanceHatch(aPlayerInventory, aBaseMetaTileEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean autoMaintainance() {
|
public boolean autoMaintainance() {
|
||||||
boolean tSuccess = true;
|
boolean tSuccess = true;
|
||||||
ItemStack[] mInputs = new ItemStack[]{ItemList.Duct_Tape.get(4, new Object[]{}),GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Lubricant, 2),GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 4),GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2)};
|
ItemStack[] mInputs = new ItemStack[]{ItemList.Duct_Tape.get(4, new Object[]{}), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Lubricant, 2), GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Steel, 4), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 2)};
|
||||||
List<ItemStack> aInputs = Arrays.asList(mInventory);
|
List<ItemStack> aInputs = Arrays.asList(mInventory);
|
||||||
if (mInputs.length > 0 && aInputs == null) tSuccess = false;
|
if (mInputs.length > 0 && aInputs == null) tSuccess = false;
|
||||||
int amt = 0;
|
int amt = 0;
|
||||||
for (ItemStack tStack : mInputs) {
|
for (ItemStack tStack : mInputs) {
|
||||||
if (tStack != null) {
|
if (tStack != null) {
|
||||||
amt = tStack.stackSize;
|
amt = tStack.stackSize;
|
||||||
boolean temp = true;
|
boolean temp = true;
|
||||||
for (ItemStack aStack : aInputs) {
|
for (ItemStack aStack : aInputs) {
|
||||||
if ((GT_Utility.areUnificationsEqual(aStack, tStack, true) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(false, aStack), tStack, true))) {
|
if ((GT_Utility.areUnificationsEqual(aStack, tStack, true) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(false, aStack), tStack, true))) {
|
||||||
|
amt -= aStack.stackSize;
|
||||||
|
if (amt < 1) {
|
||||||
|
temp = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (temp) tSuccess = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (tSuccess) {
|
||||||
|
for (ItemStack tStack : mInputs) {
|
||||||
|
if (tStack != null) {
|
||||||
|
amt = tStack.stackSize;
|
||||||
|
for (ItemStack aStack : aInputs) {
|
||||||
|
if ((GT_Utility.areUnificationsEqual(aStack, tStack, true) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(false, aStack), tStack, true))) {
|
||||||
|
if (aStack.stackSize < amt) {
|
||||||
amt -= aStack.stackSize;
|
amt -= aStack.stackSize;
|
||||||
if (amt < 1) {
|
aStack.stackSize = 0;
|
||||||
temp = false;
|
} else {
|
||||||
break;
|
aStack.stackSize -= amt;
|
||||||
}
|
amt = 0;
|
||||||
}
|
break;
|
||||||
}
|
|
||||||
if (temp) tSuccess = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(tSuccess){
|
|
||||||
for (ItemStack tStack : mInputs) {
|
|
||||||
if (tStack != null) {
|
|
||||||
amt = tStack.stackSize;
|
|
||||||
for (ItemStack aStack : aInputs) {
|
|
||||||
if ((GT_Utility.areUnificationsEqual(aStack, tStack, true) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(false, aStack), tStack, true))) {
|
|
||||||
if (aStack.stackSize < amt){
|
|
||||||
amt -= aStack.stackSize;
|
|
||||||
aStack.stackSize = 0;
|
|
||||||
}else{
|
|
||||||
aStack.stackSize -= amt;
|
|
||||||
amt = 0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.mCrowbar = true;
|
}
|
||||||
this.mHardHammer = true;
|
this.mCrowbar = true;
|
||||||
this.mScrewdriver = true;
|
this.mHardHammer = true;
|
||||||
this.mSoftHammer = true;
|
this.mScrewdriver = true;
|
||||||
this.mSolderingTool = true;
|
this.mSoftHammer = true;
|
||||||
this.mWrench = true;
|
this.mSolderingTool = true;
|
||||||
return true;
|
this.mWrench = true;
|
||||||
}
|
return true;
|
||||||
return false;
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onToolClick(ItemStack aStack, EntityLivingBase aPlayer) {
|
public void onToolClick(ItemStack aStack, EntityLivingBase aPlayer) {
|
||||||
|
@ -199,7 +199,10 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch
|
||||||
}
|
}
|
||||||
if (mSolderingTool && aPlayer instanceof EntityPlayerMP) {
|
if (mSolderingTool && aPlayer instanceof EntityPlayerMP) {
|
||||||
EntityPlayerMP tPlayer = (EntityPlayerMP) aPlayer;
|
EntityPlayerMP tPlayer = (EntityPlayerMP) aPlayer;
|
||||||
try{GT_Mod.instance.achievements.issueAchievement(tPlayer, "maintainance");}catch(Exception e){}
|
try {
|
||||||
|
GT_Mod.achievements.issueAchievement(tPlayer, "maintainance");
|
||||||
|
} catch (Exception ignored) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,11 +25,11 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getDescription() {
|
public String[] getDescription() {
|
||||||
String[] desc = new String[mDescription.length + 2];
|
String[] desc = new String[mDescriptionArray.length + 2];
|
||||||
System.arraycopy(mDescription, 0, desc, 0, mDescription.length);
|
System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length);
|
||||||
desc[mDescription.length] = "DO NOT OBSTRUCT THE OUTPUT!";
|
desc[mDescriptionArray.length] = "DO NOT OBSTRUCT THE OUTPUT!";
|
||||||
desc[mDescription.length + 1] = "Reduces Pollution to "+calculatePollutionReduction(100)+"%";
|
desc[mDescriptionArray.length + 1] = "Reduces Pollution to " + calculatePollutionReduction(100) + "%";
|
||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -64,19 +64,19 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Hatch_Muffler(mName, mTier, mDescription, mTextures);
|
return new GT_MetaTileEntity_Hatch_Muffler(mName, mTier, mDescriptionArray, mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean polluteEnvironment() {
|
public boolean polluteEnvironment() {
|
||||||
if(getBaseMetaTileEntity().getAirAtSide(getBaseMetaTileEntity().getFrontFacing())){
|
if (getBaseMetaTileEntity().getAirAtSide(getBaseMetaTileEntity().getFrontFacing())) {
|
||||||
GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), calculatePollutionReduction(10000));
|
GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), calculatePollutionReduction(10000));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int calculatePollutionReduction(int aPollution){
|
public int calculatePollutionReduction(int aPollution) {
|
||||||
return (int) (aPollution *(Math.pow(0.7, mTier-1)));
|
return (int) (aPollution * (Math.pow(0.7, mTier - 1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Hatch_Output(mName, mTier, mDescription, mTextures);
|
return new GT_MetaTileEntity_Hatch_Output(mName, mTier, mDescriptionArray, mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Hatch_OutputBus(mName, mTier, mDescription, mTextures);
|
return new GT_MetaTileEntity_Hatch_OutputBus(mName, mTier, mDescriptionArray, mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -117,8 +117,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
|
||||||
aNBT.setInteger("mRuntime", mRuntime);
|
aNBT.setInteger("mRuntime", mRuntime);
|
||||||
|
|
||||||
if (mOutputItems != null) {
|
if (mOutputItems != null) {
|
||||||
aNBT.setInteger("mOutputItemsLength", mOutputItems.length);
|
aNBT.setInteger("mOutputItemsLength", mOutputItems.length);
|
||||||
for (int i = 0; i < mOutputItems.length; i++)
|
for (int i = 0; i < mOutputItems.length; i++)
|
||||||
if (mOutputItems[i] != null) {
|
if (mOutputItems[i] != null) {
|
||||||
NBTTagCompound tNBT = new NBTTagCompound();
|
NBTTagCompound tNBT = new NBTTagCompound();
|
||||||
mOutputItems[i].writeToNBT(tNBT);
|
mOutputItems[i].writeToNBT(tNBT);
|
||||||
|
@ -126,8 +126,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mOutputFluids != null) {
|
if (mOutputFluids != null) {
|
||||||
aNBT.setInteger("mOutputFluidsLength", mOutputFluids.length);
|
aNBT.setInteger("mOutputFluidsLength", mOutputFluids.length);
|
||||||
for (int i = 0; i < mOutputFluids.length; i++)
|
for (int i = 0; i < mOutputFluids.length; i++)
|
||||||
if (mOutputFluids[i] != null) {
|
if (mOutputFluids[i] != null) {
|
||||||
NBTTagCompound tNBT = new NBTTagCompound();
|
NBTTagCompound tNBT = new NBTTagCompound();
|
||||||
mOutputFluids[i].writeToNBT(tNBT);
|
mOutputFluids[i].writeToNBT(tNBT);
|
||||||
|
@ -152,12 +152,12 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
|
||||||
mEfficiency = aNBT.getInteger("mEfficiency");
|
mEfficiency = aNBT.getInteger("mEfficiency");
|
||||||
mPollution = aNBT.getInteger("mPollution");
|
mPollution = aNBT.getInteger("mPollution");
|
||||||
mRuntime = aNBT.getInteger("mRuntime");
|
mRuntime = aNBT.getInteger("mRuntime");
|
||||||
|
|
||||||
int aOutputItemsLength = aNBT.getInteger("mOutputItemsLength");
|
int aOutputItemsLength = aNBT.getInteger("mOutputItemsLength");
|
||||||
if (aOutputItemsLength > 0) {
|
if (aOutputItemsLength > 0) {
|
||||||
mOutputItems = new ItemStack[aOutputItemsLength];
|
mOutputItems = new ItemStack[aOutputItemsLength];
|
||||||
for (int i = 0; i < mOutputItems.length; i++)
|
for (int i = 0; i < mOutputItems.length; i++)
|
||||||
mOutputItems[i] = GT_Utility.loadItem(aNBT, "mOutputItem" + i);
|
mOutputItems[i] = GT_Utility.loadItem(aNBT, "mOutputItem" + i);
|
||||||
}
|
}
|
||||||
|
|
||||||
int aOutputFluidsLength = aNBT.getInteger("mOutputFluidsLength");
|
int aOutputFluidsLength = aNBT.getInteger("mOutputFluidsLength");
|
||||||
|
@ -166,7 +166,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
|
||||||
for (int i = 0; i < mOutputFluids.length; i++)
|
for (int i = 0; i < mOutputFluids.length; i++)
|
||||||
mOutputFluids[i] = GT_Utility.loadFluid(aNBT, "mOutputFluids" + i);
|
mOutputFluids[i] = GT_Utility.loadFluid(aNBT, "mOutputFluids" + i);
|
||||||
}
|
}
|
||||||
|
|
||||||
mWrench = aNBT.getBoolean("mWrench");
|
mWrench = aNBT.getBoolean("mWrench");
|
||||||
mScrewdriver = aNBT.getBoolean("mScrewdriver");
|
mScrewdriver = aNBT.getBoolean("mScrewdriver");
|
||||||
mSoftHammer = aNBT.getBoolean("mSoftHammer");
|
mSoftHammer = aNBT.getBoolean("mSoftHammer");
|
||||||
|
@ -222,7 +222,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
|
||||||
for (GT_MetaTileEntity_Hatch_Maintenance tHatch : mMaintenanceHatches) {
|
for (GT_MetaTileEntity_Hatch_Maintenance tHatch : mMaintenanceHatches) {
|
||||||
if (isValidMetaTileEntity(tHatch)) {
|
if (isValidMetaTileEntity(tHatch)) {
|
||||||
if (!GT_MetaTileEntity_MultiBlockBase.disableMaintenance) {
|
if (!GT_MetaTileEntity_MultiBlockBase.disableMaintenance) {
|
||||||
if(tHatch.mAuto && (!mWrench||!mScrewdriver||!mSoftHammer||!mHardHammer||!mSolderingTool||!mCrowbar))tHatch.autoMaintainance();
|
if (tHatch.mAuto && (!mWrench || !mScrewdriver || !mSoftHammer || !mHardHammer || !mSolderingTool || !mCrowbar))
|
||||||
|
tHatch.autoMaintainance();
|
||||||
if (tHatch.mWrench) mWrench = true;
|
if (tHatch.mWrench) mWrench = true;
|
||||||
if (tHatch.mScrewdriver) mScrewdriver = true;
|
if (tHatch.mScrewdriver) mScrewdriver = true;
|
||||||
if (tHatch.mSoftHammer) mSoftHammer = true;
|
if (tHatch.mSoftHammer) mSoftHammer = true;
|
||||||
|
@ -255,7 +256,10 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
|
||||||
if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) {
|
if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) {
|
||||||
if (mOutputItems != null) for (ItemStack tStack : mOutputItems)
|
if (mOutputItems != null) for (ItemStack tStack : mOutputItems)
|
||||||
if (tStack != null) {
|
if (tStack != null) {
|
||||||
try{GT_Mod.achievements.issueAchivementHatch(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), tStack);}catch(Exception e){}
|
try {
|
||||||
|
GT_Mod.achievements.issueAchivementHatch(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), tStack);
|
||||||
|
} catch (Exception ignored) {
|
||||||
|
}
|
||||||
addOutput(tStack);
|
addOutput(tStack);
|
||||||
}
|
}
|
||||||
if (mOutputFluids != null && mOutputFluids.length == 1) {
|
if (mOutputFluids != null && mOutputFluids.length == 1) {
|
||||||
|
@ -276,7 +280,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
|
||||||
if (mOutputFluids.length > 1) {
|
if (mOutputFluids.length > 1) {
|
||||||
try {
|
try {
|
||||||
GT_Mod.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "oilplant");
|
GT_Mod.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "oilplant");
|
||||||
} catch (Exception e) {
|
} catch (Exception ignored) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -724,7 +728,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
|
||||||
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
|
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
|
||||||
if (aMetaTileEntity == null) return false;
|
if (aMetaTileEntity == null) return false;
|
||||||
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) {
|
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) {
|
||||||
((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
|
((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
|
||||||
return mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity);
|
return mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -11,10 +11,13 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit
|
||||||
*/
|
*/
|
||||||
public final byte mTier;
|
public final byte mTier;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public final String mDescription;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple Description.
|
* A simple Description.
|
||||||
*/
|
*/
|
||||||
public final String[] mDescription;
|
public final String[] mDescriptionArray;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contains all Textures used by this Block.
|
* Contains all Textures used by this Block.
|
||||||
|
@ -24,8 +27,8 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit
|
||||||
public GT_MetaTileEntity_TieredMachineBlock(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription, ITexture... aTextures) {
|
public GT_MetaTileEntity_TieredMachineBlock(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String aDescription, ITexture... aTextures) {
|
||||||
super(aID, aName, aNameRegional, aInvSlotCount);
|
super(aID, aName, aNameRegional, aInvSlotCount);
|
||||||
mTier = (byte) Math.max(0, Math.min(aTier, 9));
|
mTier = (byte) Math.max(0, Math.min(aTier, 9));
|
||||||
mDescription = aDescription == null ? new String[0] : new String[]{aDescription};
|
mDescriptionArray = aDescription == null ? new String[0] : new String[]{aDescription};
|
||||||
|
mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : "";
|
||||||
// must always be the last call!
|
// must always be the last call!
|
||||||
if (GT.isClientSide()) mTextures = getTextureSet(aTextures);
|
if (GT.isClientSide()) mTextures = getTextureSet(aTextures);
|
||||||
else mTextures = null;
|
else mTextures = null;
|
||||||
|
@ -34,7 +37,8 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit
|
||||||
public GT_MetaTileEntity_TieredMachineBlock(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String[] aDescription, ITexture... aTextures) {
|
public GT_MetaTileEntity_TieredMachineBlock(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String[] aDescription, ITexture... aTextures) {
|
||||||
super(aID, aName, aNameRegional, aInvSlotCount);
|
super(aID, aName, aNameRegional, aInvSlotCount);
|
||||||
mTier = (byte) Math.max(0, Math.min(aTier, 9));
|
mTier = (byte) Math.max(0, Math.min(aTier, 9));
|
||||||
mDescription = aDescription == null ? new String[0] : aDescription;
|
mDescriptionArray = aDescription == null ? new String[0] : aDescription;
|
||||||
|
mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : "";
|
||||||
|
|
||||||
// must always be the last call!
|
// must always be the last call!
|
||||||
if (GT.isClientSide()) mTextures = getTextureSet(aTextures);
|
if (GT.isClientSide()) mTextures = getTextureSet(aTextures);
|
||||||
|
@ -44,14 +48,16 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit
|
||||||
public GT_MetaTileEntity_TieredMachineBlock(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
|
public GT_MetaTileEntity_TieredMachineBlock(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
|
||||||
super(aName, aInvSlotCount);
|
super(aName, aInvSlotCount);
|
||||||
mTier = (byte) aTier;
|
mTier = (byte) aTier;
|
||||||
mDescription = aDescription == null ? new String[0] : new String[]{aDescription};
|
mDescriptionArray = aDescription == null ? new String[0] : new String[]{aDescription};
|
||||||
|
mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : "";
|
||||||
mTextures = aTextures;
|
mTextures = aTextures;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_MetaTileEntity_TieredMachineBlock(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) {
|
public GT_MetaTileEntity_TieredMachineBlock(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) {
|
||||||
super(aName, aInvSlotCount);
|
super(aName, aInvSlotCount);
|
||||||
mTier = (byte) aTier;
|
mTier = (byte) aTier;
|
||||||
mDescription = aDescription == null ? new String[0] : aDescription;
|
mDescriptionArray = aDescription == null ? new String[0] : aDescription;
|
||||||
|
mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : "";
|
||||||
mTextures = aTextures;
|
mTextures = aTextures;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +78,7 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getDescription() {
|
public String[] getDescription() {
|
||||||
return mDescription;
|
return mDescriptionArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -67,7 +67,7 @@ public class GT_MetaTileEntity_Transformer extends GT_MetaTileEntity_TieredMachi
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Transformer(mName, mTier, mDescription, mTextures);
|
return new GT_MetaTileEntity_Transformer(mName, mTier, mDescriptionArray, mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -76,7 +76,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
|
||||||
* Used for describing recipes that do not fit the default recipe pattern (for example Large Boiler Fuels)
|
* Used for describing recipes that do not fit the default recipe pattern (for example Large Boiler Fuels)
|
||||||
*/
|
*/
|
||||||
private String[] neiDesc = null;
|
private String[] neiDesc = null;
|
||||||
|
|
||||||
private GT_Recipe(GT_Recipe aRecipe) {
|
private GT_Recipe(GT_Recipe aRecipe) {
|
||||||
mInputs = GT_Utility.copyStackArray((Object[]) aRecipe.mInputs);
|
mInputs = GT_Utility.copyStackArray((Object[]) aRecipe.mInputs);
|
||||||
mOutputs = GT_Utility.copyStackArray((Object[]) aRecipe.mOutputs);
|
mOutputs = GT_Utility.copyStackArray((Object[]) aRecipe.mOutputs);
|
||||||
|
@ -93,6 +93,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
|
||||||
mEnabled = aRecipe.mEnabled;
|
mEnabled = aRecipe.mEnabled;
|
||||||
mHidden = aRecipe.mHidden;
|
mHidden = aRecipe.mHidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected GT_Recipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecialItems, int[] aChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
|
protected GT_Recipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecialItems, int[] aChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
|
||||||
if (aInputs == null) aInputs = new ItemStack[0];
|
if (aInputs == null) aInputs = new ItemStack[0];
|
||||||
if (aOutputs == null) aOutputs = new ItemStack[0];
|
if (aOutputs == null) aOutputs = new ItemStack[0];
|
||||||
|
@ -330,13 +331,13 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
|
||||||
boolean temp = true;
|
boolean temp = true;
|
||||||
amt = tFluid.amount;
|
amt = tFluid.amount;
|
||||||
for (FluidStack aFluid : aFluidInputs)
|
for (FluidStack aFluid : aFluidInputs)
|
||||||
if (aFluid != null && aFluid.isFluidEqual(tFluid)){
|
if (aFluid != null && aFluid.isFluidEqual(tFluid)) {
|
||||||
if (aDontCheckStackSizes ){
|
if (aDontCheckStackSizes) {
|
||||||
temp = false;
|
temp = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
amt -= aFluid.amount;
|
amt -= aFluid.amount;
|
||||||
if (amt<1){
|
if (amt < 1) {
|
||||||
temp = false;
|
temp = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -397,14 +398,14 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
|
||||||
amt = tStack.stackSize;
|
amt = tStack.stackSize;
|
||||||
for (ItemStack aStack : aInputs) {
|
for (ItemStack aStack : aInputs) {
|
||||||
if ((GT_Utility.areUnificationsEqual(aStack, tStack, true) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(false, aStack), tStack, true))) {
|
if ((GT_Utility.areUnificationsEqual(aStack, tStack, true) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(false, aStack), tStack, true))) {
|
||||||
if (aDontCheckStackSizes){
|
if (aDontCheckStackSizes) {
|
||||||
aStack.stackSize -= amt;
|
aStack.stackSize -= amt;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (aStack.stackSize < amt){
|
if (aStack.stackSize < amt) {
|
||||||
amt -= aStack.stackSize;
|
amt -= aStack.stackSize;
|
||||||
aStack.stackSize = 0;
|
aStack.stackSize = 0;
|
||||||
}else{
|
} else {
|
||||||
aStack.stackSize -= amt;
|
aStack.stackSize -= amt;
|
||||||
amt = 0;
|
amt = 0;
|
||||||
break;
|
break;
|
||||||
|
@ -441,15 +442,16 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] getNeiDesc() {
|
public String[] getNeiDesc() {
|
||||||
return neiDesc;
|
return neiDesc;
|
||||||
}
|
}
|
||||||
protected void setNeiDesc(String... neiDesc) {
|
|
||||||
this.neiDesc = neiDesc;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class GT_Recipe_AssemblyLine{
|
protected void setNeiDesc(String... neiDesc) {
|
||||||
|
this.neiDesc = neiDesc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class GT_Recipe_AssemblyLine {
|
||||||
public static final ArrayList<GT_Recipe_AssemblyLine> sAssemblylineRecipes = new ArrayList<GT_Recipe_AssemblyLine>();
|
public static final ArrayList<GT_Recipe_AssemblyLine> sAssemblylineRecipes = new ArrayList<GT_Recipe_AssemblyLine>();
|
||||||
|
|
||||||
public ItemStack mResearchItem;
|
public ItemStack mResearchItem;
|
||||||
public int mResearchTime;
|
public int mResearchTime;
|
||||||
public ItemStack[] mInputs;
|
public ItemStack[] mInputs;
|
||||||
|
@ -457,17 +459,17 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
|
||||||
public ItemStack mOutput;
|
public ItemStack mOutput;
|
||||||
public int mDuration;
|
public int mDuration;
|
||||||
public int mEUt;
|
public int mEUt;
|
||||||
|
|
||||||
public GT_Recipe_AssemblyLine(ItemStack aResearchItem, int aResearchTime, ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt) {
|
public GT_Recipe_AssemblyLine(ItemStack aResearchItem, int aResearchTime, ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt) {
|
||||||
mResearchItem = aResearchItem;
|
mResearchItem = aResearchItem;
|
||||||
mResearchTime = aResearchTime;
|
mResearchTime = aResearchTime;
|
||||||
mInputs = aInputs;
|
mInputs = aInputs;
|
||||||
mFluidInputs = aFluidInputs;
|
mFluidInputs = aFluidInputs;
|
||||||
mOutput = aOutput;
|
mOutput = aOutput;
|
||||||
mDuration = aDuration;
|
mDuration = aDuration;
|
||||||
mEUt = aEUt;
|
mEUt = aEUt;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class GT_Recipe_Map {
|
public static class GT_Recipe_Map {
|
||||||
|
@ -489,7 +491,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
|
||||||
public static final GT_Recipe_Map sByProductList = new GT_Recipe_Map(new HashSet<GT_Recipe>(1000), "gt.recipe.byproductlist", "Ore Byproduct List", null, RES_PATH_GUI + "basicmachines/Default", 1, 6, 1, 0, 1, E, 1, E, true, true);
|
public static final GT_Recipe_Map sByProductList = new GT_Recipe_Map(new HashSet<GT_Recipe>(1000), "gt.recipe.byproductlist", "Ore Byproduct List", null, RES_PATH_GUI + "basicmachines/Default", 1, 6, 1, 0, 1, E, 1, E, true, true);
|
||||||
public static final GT_Recipe_Map sReplicatorFakeRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(100), "gt.recipe.replicator", "Replicator", null, RES_PATH_GUI + "basicmachines/Replicator", 0, 1, 0, 1, 1, E, 1, E, true, true);
|
public static final GT_Recipe_Map sReplicatorFakeRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(100), "gt.recipe.replicator", "Replicator", null, RES_PATH_GUI + "basicmachines/Replicator", 0, 1, 0, 1, 1, E, 1, E, true, true);
|
||||||
public static final GT_Recipe_Map sAssemblylineFakeRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(30), "gt.recipe.scanner", "Scanner", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 1, 0, 1, E, 1, E, true, true);
|
public static final GT_Recipe_Map sAssemblylineFakeRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(30), "gt.recipe.scanner", "Scanner", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 1, 0, 1, E, 1, E, true, true);
|
||||||
|
|
||||||
public static final GT_Recipe_Map sPlasmaArcFurnaceRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(10000), "gt.recipe.plasmaarcfurnace", "Plasma Arc Furnace", null, RES_PATH_GUI + "basicmachines/PlasmaArcFurnace", 1, 4, 1, 1, 1, E, 1, E, true, true);
|
public static final GT_Recipe_Map sPlasmaArcFurnaceRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(10000), "gt.recipe.plasmaarcfurnace", "Plasma Arc Furnace", null, RES_PATH_GUI + "basicmachines/PlasmaArcFurnace", 1, 4, 1, 1, 1, E, 1, E, true, true);
|
||||||
public static final GT_Recipe_Map sArcFurnaceRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(10000), "gt.recipe.arcfurnace", "Arc Furnace", null, RES_PATH_GUI + "basicmachines/ArcFurnace", 1, 4, 1, 1, 3, E, 1, E, true, true);
|
public static final GT_Recipe_Map sArcFurnaceRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(10000), "gt.recipe.arcfurnace", "Arc Furnace", null, RES_PATH_GUI + "basicmachines/ArcFurnace", 1, 4, 1, 1, 3, E, 1, E, true, true);
|
||||||
public static final GT_Recipe_Map sPrinterRecipes = new GT_Recipe_Map_Printer(new HashSet<GT_Recipe>(100), "gt.recipe.printer", "Printer", null, RES_PATH_GUI + "basicmachines/Printer", 1, 1, 1, 1, 1, E, 1, E, true, true);
|
public static final GT_Recipe_Map sPrinterRecipes = new GT_Recipe_Map_Printer(new HashSet<GT_Recipe>(100), "gt.recipe.printer", "Printer", null, RES_PATH_GUI + "basicmachines/Printer", 1, 1, 1, 1, 1, E, 1, E, true, true);
|
||||||
|
@ -545,7 +547,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
|
||||||
public static final GT_Recipe_Map_Fuel sLargeNaquadahReactorFuels = new GT_Recipe_Map_Fuel(new HashSet<GT_Recipe>(10), "gt.recipe.largenaquadahreactor", "Large Naquadah Reactor", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true);
|
public static final GT_Recipe_Map_Fuel sLargeNaquadahReactorFuels = new GT_Recipe_Map_Fuel(new HashSet<GT_Recipe>(10), "gt.recipe.largenaquadahreactor", "Large Naquadah Reactor", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true);
|
||||||
public static final GT_Recipe_Map_Fuel sFluidNaquadahReactorFuels = new GT_Recipe_Map_Fuel(new HashSet<GT_Recipe>(10), "gt.recipe.fluidnaquadahreactor", "Fluid Naquadah Reactor", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true);
|
public static final GT_Recipe_Map_Fuel sFluidNaquadahReactorFuels = new GT_Recipe_Map_Fuel(new HashSet<GT_Recipe>(10), "gt.recipe.fluidnaquadahreactor", "Fluid Naquadah Reactor", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true);
|
||||||
public static final GT_Recipe_Map_Large_Boiler_Fake_Fuels sLargeBoilerFakeFuels = new GT_Recipe_Map_Large_Boiler_Fake_Fuels();
|
public static final GT_Recipe_Map_Large_Boiler_Fake_Fuels sLargeBoilerFakeFuels = new GT_Recipe_Map_Large_Boiler_Fake_Fuels();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HashMap of Recipes based on their Items
|
* HashMap of Recipes based on their Items
|
||||||
*/
|
*/
|
||||||
|
@ -1378,53 +1380,46 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class GT_Recipe_Map_Large_Boiler_Fake_Fuels extends GT_Recipe_Map {
|
public static class GT_Recipe_Map_Large_Boiler_Fake_Fuels extends GT_Recipe_Map {
|
||||||
|
|
||||||
public GT_Recipe_Map_Large_Boiler_Fake_Fuels(){
|
|
||||||
super(new HashSet<GT_Recipe>(30), "gt.recipe.largeboilerfakefuels", "Large Boiler", null, RES_PATH_GUI + "basicmachines/Default", 1, 0, 1, 0, 1, E, 1, E, true , true);
|
|
||||||
GT_Recipe explanatoryRecipe = new GT_Recipe(true, new ItemStack[]{}, new ItemStack[]{}, null, null, null, null, 1, 1, 1);
|
|
||||||
explanatoryRecipe.setNeiDesc("Not all solid fuels are listed.", "Any item that burns in a", "vanilla furnace will burn in", "a Large Boiler.");
|
|
||||||
addRecipe(explanatoryRecipe);
|
|
||||||
}
|
|
||||||
|
|
||||||
public GT_Recipe addDenseLiquidRecipe(GT_Recipe recipe) {
|
|
||||||
return addRecipe(recipe, ((double)recipe.mSpecialValue) / 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
public GT_Recipe addDieselRecipe(GT_Recipe recipe) {
|
public GT_Recipe_Map_Large_Boiler_Fake_Fuels() {
|
||||||
return addRecipe(recipe,((double)recipe.mSpecialValue) / 40);
|
super(new HashSet<GT_Recipe>(30), "gt.recipe.largeboilerfakefuels", "Large Boiler", null, RES_PATH_GUI + "basicmachines/Default", 1, 0, 1, 0, 1, E, 1, E, true, true);
|
||||||
}
|
GT_Recipe explanatoryRecipe = new GT_Recipe(true, new ItemStack[]{}, new ItemStack[]{}, null, null, null, null, 1, 1, 1);
|
||||||
|
explanatoryRecipe.setNeiDesc("Not all solid fuels are listed.", "Any item that burns in a", "vanilla furnace will burn in", "a Large Boiler.");
|
||||||
|
addRecipe(explanatoryRecipe);
|
||||||
|
}
|
||||||
|
|
||||||
public void addSolidRecipes(ItemStack ... itemStacks) {
|
public GT_Recipe addDenseLiquidRecipe(GT_Recipe recipe) {
|
||||||
for(ItemStack itemStack : itemStacks){
|
return addRecipe(recipe, ((double) recipe.mSpecialValue) / 10);
|
||||||
addSolidRecipe(itemStack);
|
}
|
||||||
}
|
|
||||||
}
|
public GT_Recipe addDieselRecipe(GT_Recipe recipe) {
|
||||||
|
return addRecipe(recipe, ((double) recipe.mSpecialValue) / 40);
|
||||||
public GT_Recipe addSolidRecipe(ItemStack fuelItemStack){
|
}
|
||||||
return addRecipe(new GT_Recipe(true, new ItemStack[]{fuelItemStack}, new ItemStack[]{}, null, null, null, null, 1, 0, GT_ModHandler.getFuelValue(fuelItemStack) / 1600), ((double)GT_ModHandler.getFuelValue(fuelItemStack)) / 1600);
|
|
||||||
}
|
public void addSolidRecipes(ItemStack... itemStacks) {
|
||||||
|
for (ItemStack itemStack : itemStacks) {
|
||||||
private GT_Recipe addRecipe(GT_Recipe recipe, double baseBurnTime){
|
addSolidRecipe(itemStack);
|
||||||
recipe = new GT_Recipe(recipe);
|
}
|
||||||
//Some recipes will have a burn time like 15.9999999 and % always rounds down
|
}
|
||||||
double floatErrorCorrection = 0.0001;
|
|
||||||
|
public GT_Recipe addSolidRecipe(ItemStack fuelItemStack) {
|
||||||
double bronzeBurnTime = baseBurnTime * 2 + floatErrorCorrection;
|
return addRecipe(new GT_Recipe(true, new ItemStack[]{fuelItemStack}, new ItemStack[]{}, null, null, null, null, 1, 0, GT_ModHandler.getFuelValue(fuelItemStack) / 1600), ((double) GT_ModHandler.getFuelValue(fuelItemStack)) / 1600);
|
||||||
bronzeBurnTime -= bronzeBurnTime % 0.05;
|
}
|
||||||
double steelBurnTime = baseBurnTime * 1.5 + floatErrorCorrection;
|
|
||||||
steelBurnTime -= steelBurnTime % 0.05;
|
private GT_Recipe addRecipe(GT_Recipe recipe, double baseBurnTime) {
|
||||||
double titaniumBurnTime = baseBurnTime * 1.3 + floatErrorCorrection;
|
recipe = new GT_Recipe(recipe);
|
||||||
titaniumBurnTime -= titaniumBurnTime % 0.05;
|
|
||||||
double tungstensteelBurnTime = baseBurnTime * 1.2 + floatErrorCorrection;
|
double bronzeBurnTime = baseBurnTime * 2;
|
||||||
tungstensteelBurnTime -= tungstensteelBurnTime % 0.05;
|
double steelBurnTime = baseBurnTime * 1.5;
|
||||||
|
double titaniumBurnTime = baseBurnTime * 1.3;
|
||||||
recipe.setNeiDesc("Burn time in seconds:",
|
double tungstensteelBurnTime = baseBurnTime * 1.2;
|
||||||
String.format("Bronze Boiler: %.2f", bronzeBurnTime),
|
|
||||||
String.format("Steel Boiler: %.2f", steelBurnTime),
|
recipe.setNeiDesc("Burn time in seconds:",
|
||||||
String.format("Titanium Boiler: %.2f", titaniumBurnTime),
|
String.format("Bronze Boiler: %.4f", bronzeBurnTime),
|
||||||
String.format("Tungstensteel Boiler: %.2f", tungstensteelBurnTime));
|
String.format("Steel Boiler: %.4f", steelBurnTime),
|
||||||
return super.addRecipe(recipe);
|
String.format("Titanium Boiler: %.4f", titaniumBurnTime),
|
||||||
}
|
String.format("Tungstensteel Boiler: %.4f", tungstensteelBurnTime));
|
||||||
|
return super.addRecipe(recipe);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class GT_MetaTileEntity_ChestBuffer
|
||||||
}
|
}
|
||||||
|
|
||||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_ChestBuffer(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_ChestBuffer(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITexture getOverlayIcon() {
|
public ITexture getOverlayIcon() {
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class GT_MetaTileEntity_Filter
|
||||||
}
|
}
|
||||||
|
|
||||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Filter(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_Filter(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITexture getOverlayIcon() {
|
public ITexture getOverlayIcon() {
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class GT_MetaTileEntity_Regulator
|
||||||
}
|
}
|
||||||
|
|
||||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Regulator(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_Regulator(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITexture getOverlayIcon() {
|
public ITexture getOverlayIcon() {
|
||||||
|
|
|
@ -24,7 +24,7 @@ public class GT_MetaTileEntity_SuperBuffer
|
||||||
}
|
}
|
||||||
|
|
||||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_SuperBuffer(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_SuperBuffer(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITexture getOverlayIcon() {
|
public ITexture getOverlayIcon() {
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class GT_MetaTileEntity_TypeFilter
|
||||||
}
|
}
|
||||||
|
|
||||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_TypeFilter(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_TypeFilter(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITexture getOverlayIcon() {
|
public ITexture getOverlayIcon() {
|
||||||
|
|
|
@ -23,14 +23,15 @@ public class GT_MetaTileEntity_Boiler_Bronze
|
||||||
extends GT_MetaTileEntity_Boiler {
|
extends GT_MetaTileEntity_Boiler {
|
||||||
public GT_MetaTileEntity_Boiler_Bronze(int aID, String aName, String aNameRegional) {
|
public GT_MetaTileEntity_Boiler_Bronze(int aID, String aName, String aNameRegional) {
|
||||||
super(aID, aName, aNameRegional, new String[]{
|
super(aID, aName, aNameRegional, new String[]{
|
||||||
"An early way to get Steam Power",
|
"An early way to get Steam Power",
|
||||||
"Produces 120L of Steam per second",
|
"Produces 120L of Steam per second",
|
||||||
"Causes 20 Pollution per second"}, new ITexture[0]);
|
"Causes 20 Pollution per second"});
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_MetaTileEntity_Boiler_Bronze(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
|
public GT_MetaTileEntity_Boiler_Bronze(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
|
||||||
super(aName, aTier, aDescription, aTextures);
|
super(aName, aTier, aDescription, aTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_MetaTileEntity_Boiler_Bronze(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
public GT_MetaTileEntity_Boiler_Bronze(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||||
super(aName, aTier, aDescription, aTextures);
|
super(aName, aTier, aDescription, aTextures);
|
||||||
}
|
}
|
||||||
|
@ -60,7 +61,7 @@ public class GT_MetaTileEntity_Boiler_Bronze
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Boiler_Bronze(this.mName, this.mTier, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_Boiler_Bronze(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
||||||
|
@ -146,8 +147,8 @@ public class GT_MetaTileEntity_Boiler_Bronze
|
||||||
this.mProcessingEnergy -= 1;
|
this.mProcessingEnergy -= 1;
|
||||||
this.mTemperature += 1;
|
this.mTemperature += 1;
|
||||||
}
|
}
|
||||||
if(this.mProcessingEnergy>0 && (aTick % 20L == 0L)){
|
if (this.mProcessingEnergy > 0 && (aTick % 20L == 0L)) {
|
||||||
GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20);
|
GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20);
|
||||||
}
|
}
|
||||||
aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
|
aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,9 +23,9 @@ public class GT_MetaTileEntity_Boiler_Lava
|
||||||
extends GT_MetaTileEntity_Boiler {
|
extends GT_MetaTileEntity_Boiler {
|
||||||
public GT_MetaTileEntity_Boiler_Lava(int aID, String aName, String aNameRegional) {
|
public GT_MetaTileEntity_Boiler_Lava(int aID, String aName, String aNameRegional) {
|
||||||
super(aID, aName, aNameRegional, new String[]{
|
super(aID, aName, aNameRegional, new String[]{
|
||||||
"A Boiler running off Lava",
|
"A Boiler running off Lava",
|
||||||
"Produces 600L of Steam per second",
|
"Produces 600L of Steam per second",
|
||||||
"Causes 20 Pollution per second"}, new ITexture[0]);
|
"Causes 20 Pollution per second"});
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_MetaTileEntity_Boiler_Lava(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
|
public GT_MetaTileEntity_Boiler_Lava(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
|
||||||
|
@ -61,7 +61,7 @@ public class GT_MetaTileEntity_Boiler_Lava
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Boiler_Lava(this.mName, this.mTier, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_Boiler_Lava(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
||||||
|
@ -126,8 +126,8 @@ public class GT_MetaTileEntity_Boiler_Lava
|
||||||
this.mTemperature += 1;
|
this.mTemperature += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.mProcessingEnergy>0 && (aTick % 20L == 0L)){
|
if (this.mProcessingEnergy > 0 && (aTick % 20L == 0L)) {
|
||||||
GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20);
|
GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20);
|
||||||
}
|
}
|
||||||
aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
|
aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,17 +19,16 @@ public class GT_MetaTileEntity_Boiler_Solar
|
||||||
extends GT_MetaTileEntity_Boiler {
|
extends GT_MetaTileEntity_Boiler {
|
||||||
public GT_MetaTileEntity_Boiler_Solar(int aID, String aName, String aNameRegional) {
|
public GT_MetaTileEntity_Boiler_Solar(int aID, String aName, String aNameRegional) {
|
||||||
super(aID, aName, aNameRegional, new String[]{
|
super(aID, aName, aNameRegional, new String[]{
|
||||||
"Steam Power by the Sun",
|
"Steam Power by the Sun",
|
||||||
"Produces 120L of Steam per second",
|
"Produces 120L of Steam per second",
|
||||||
"Calcifies over time, reducing Steam output to 40L/s",
|
"Calcifies over time, reducing Steam output to 40L/s",
|
||||||
"Break and replace to decalcify"},
|
"Break and replace to decalcify"});
|
||||||
new ITexture[0]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_MetaTileEntity_Boiler_Solar(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
|
public GT_MetaTileEntity_Boiler_Solar(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
|
||||||
super(aName, aTier, aDescription, aTextures);
|
super(aName, aTier, aDescription, aTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_MetaTileEntity_Boiler_Solar(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
public GT_MetaTileEntity_Boiler_Solar(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||||
super(aName, aTier, aDescription, aTextures);
|
super(aName, aTier, aDescription, aTextures);
|
||||||
}
|
}
|
||||||
|
@ -66,11 +65,11 @@ public class GT_MetaTileEntity_Boiler_Solar
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Boiler_Solar(this.mName, this.mTier, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_Boiler_Solar(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int mRunTime = 0;
|
private int mRunTime = 0;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void saveNBTData(NBTTagCompound aNBT) {
|
public void saveNBTData(NBTTagCompound aNBT) {
|
||||||
super.saveNBTData(aNBT);
|
super.saveNBTData(aNBT);
|
||||||
|
@ -118,8 +117,8 @@ public class GT_MetaTileEntity_Boiler_Solar
|
||||||
this.mFluid.amount -= 1;
|
this.mFluid.amount -= 1;
|
||||||
mRunTime += 1;
|
mRunTime += 1;
|
||||||
int tOutput = 150;
|
int tOutput = 150;
|
||||||
if(mRunTime > 10000){
|
if (mRunTime > 10000) {
|
||||||
tOutput = Math.max(50, 150 - ((mRunTime-10000)/100));
|
tOutput = Math.max(50, 150 - ((mRunTime - 10000) / 100));
|
||||||
}
|
}
|
||||||
if (this.mSteam == null) {
|
if (this.mSteam == null) {
|
||||||
this.mSteam = GT_ModHandler.getSteam(tOutput);
|
this.mSteam = GT_ModHandler.getSteam(tOutput);
|
||||||
|
|
|
@ -23,9 +23,9 @@ public class GT_MetaTileEntity_Boiler_Steel
|
||||||
extends GT_MetaTileEntity_Boiler {
|
extends GT_MetaTileEntity_Boiler {
|
||||||
public GT_MetaTileEntity_Boiler_Steel(int aID, String aName, String aNameRegional) {
|
public GT_MetaTileEntity_Boiler_Steel(int aID, String aName, String aNameRegional) {
|
||||||
super(aID, aName, aNameRegional, new String[]{
|
super(aID, aName, aNameRegional, new String[]{
|
||||||
"Faster than the Bronze Boiler",
|
"Faster than the Bronze Boiler",
|
||||||
"Produces 300L of Steam per second",
|
"Produces 300L of Steam per second",
|
||||||
"Causes 20 Pollution per second"}, new ITexture[0]);
|
"Causes 20 Pollution per second"});
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_MetaTileEntity_Boiler_Steel(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
|
public GT_MetaTileEntity_Boiler_Steel(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
|
||||||
|
@ -66,7 +66,7 @@ public class GT_MetaTileEntity_Boiler_Steel
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Boiler_Steel(this.mName, this.mTier, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_Boiler_Steel(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
||||||
|
@ -152,8 +152,8 @@ public class GT_MetaTileEntity_Boiler_Steel
|
||||||
this.mProcessingEnergy -= 2;
|
this.mProcessingEnergy -= 2;
|
||||||
this.mTemperature += 1;
|
this.mTemperature += 1;
|
||||||
}
|
}
|
||||||
if(this.mProcessingEnergy>0 && (aTick % 20L == 0L)){
|
if (this.mProcessingEnergy > 0 && (aTick % 20L == 0L)) {
|
||||||
GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20);
|
GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 20);
|
||||||
}
|
}
|
||||||
aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
|
aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,15 +18,14 @@ import net.minecraft.item.ItemStack;
|
||||||
public class GT_MetaTileEntity_DieselGenerator
|
public class GT_MetaTileEntity_DieselGenerator
|
||||||
extends GT_MetaTileEntity_BasicGenerator {
|
extends GT_MetaTileEntity_BasicGenerator {
|
||||||
|
|
||||||
public static final int BASE_POLLUTION = 2;
|
public static final int BASE_POLLUTION = 2;
|
||||||
|
|
||||||
public int mEfficiency;
|
public int mEfficiency;
|
||||||
|
|
||||||
public GT_MetaTileEntity_DieselGenerator(int aID, String aName, String aNameRegional, int aTier) {
|
public GT_MetaTileEntity_DieselGenerator(int aID, String aName, String aNameRegional, int aTier) {
|
||||||
super(aID, aName, aNameRegional, aTier, new String[]{
|
super(aID, aName, aNameRegional, aTier, new String[]{
|
||||||
"Requires liquid Fuel",
|
"Requires liquid Fuel",
|
||||||
"Causes " + (int) (20 * BASE_POLLUTION * Math.pow(2, aTier - 1)) + " Pollution per second"},
|
"Causes " + (int) (20 * BASE_POLLUTION * Math.pow(2, aTier - 1)) + " Pollution per second"});
|
||||||
new ITexture[0]);
|
|
||||||
onConfigLoad();
|
onConfigLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +33,7 @@ public class GT_MetaTileEntity_DieselGenerator
|
||||||
super(aName, aTier, aDescription, aTextures);
|
super(aName, aTier, aDescription, aTextures);
|
||||||
onConfigLoad();
|
onConfigLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_MetaTileEntity_DieselGenerator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
public GT_MetaTileEntity_DieselGenerator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||||
super(aName, aTier, aDescription, aTextures);
|
super(aName, aTier, aDescription, aTextures);
|
||||||
onConfigLoad();
|
onConfigLoad();
|
||||||
|
@ -45,7 +44,7 @@ public class GT_MetaTileEntity_DieselGenerator
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_DieselGenerator(this.mName, this.mTier, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_DieselGenerator(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_Recipe.GT_Recipe_Map getRecipes() {
|
public GT_Recipe.GT_Recipe_Map getRecipes() {
|
||||||
|
@ -65,7 +64,7 @@ public class GT_MetaTileEntity_DieselGenerator
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getFuelValue(ItemStack aStack) {
|
public int getFuelValue(ItemStack aStack) {
|
||||||
if (GT_Utility.isStackInvalid(aStack) || getRecipes() == null) return 0;
|
if (GT_Utility.isStackInvalid(aStack) || getRecipes() == null) return 0;
|
||||||
int rValue = Math.max(GT_ModHandler.getFuelCanValue(aStack) * 6 / 5, super.getFuelValue(aStack));
|
int rValue = Math.max(GT_ModHandler.getFuelCanValue(aStack) * 6 / 5, super.getFuelValue(aStack));
|
||||||
if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) {
|
if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) {
|
||||||
rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3);
|
rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3);
|
||||||
|
@ -113,8 +112,8 @@ public class GT_MetaTileEntity_DieselGenerator
|
||||||
return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE)};
|
return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE)};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getPollution() {
|
public int getPollution() {
|
||||||
return (int) (GT_MetaTileEntity_DieselGenerator.BASE_POLLUTION * Math.pow(2, mTier - 1));
|
return (int) (GT_MetaTileEntity_DieselGenerator.BASE_POLLUTION * Math.pow(2, mTier - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class GT_MetaTileEntity_FluidNaquadahReactor
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_FluidNaquadahReactor(this.mName, this.mTier, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_FluidNaquadahReactor(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_Recipe.GT_Recipe_Map getRecipes() {
|
public GT_Recipe.GT_Recipe_Map getRecipes() {
|
||||||
|
|
|
@ -13,15 +13,15 @@ import gregtech.api.util.GT_Recipe;
|
||||||
public class GT_MetaTileEntity_GasTurbine
|
public class GT_MetaTileEntity_GasTurbine
|
||||||
extends GT_MetaTileEntity_BasicGenerator {
|
extends GT_MetaTileEntity_BasicGenerator {
|
||||||
|
|
||||||
public static final int BASE_POLLUTION = 1;
|
public static final int BASE_POLLUTION = 1;
|
||||||
|
|
||||||
public int mEfficiency;
|
public int mEfficiency;
|
||||||
|
|
||||||
|
|
||||||
public GT_MetaTileEntity_GasTurbine(int aID, String aName, String aNameRegional, int aTier) {
|
public GT_MetaTileEntity_GasTurbine(int aID, String aName, String aNameRegional, int aTier) {
|
||||||
super(aID, aName, aNameRegional, aTier, new String[]{
|
super(aID, aName, aNameRegional, aTier, new String[]{
|
||||||
"Requires flammable Gasses",
|
"Requires flammable Gasses",
|
||||||
"Causes " + (int) (20 * BASE_POLLUTION * Math.pow(2, aTier - 1)) + " Pollution per second"});
|
"Causes " + (int) (20 * BASE_POLLUTION * Math.pow(2, aTier - 1)) + " Pollution per second"});
|
||||||
onConfigLoad();
|
onConfigLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ public class GT_MetaTileEntity_GasTurbine
|
||||||
super(aName, aTier, aDescription, aTextures);
|
super(aName, aTier, aDescription, aTextures);
|
||||||
onConfigLoad();
|
onConfigLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_MetaTileEntity_GasTurbine(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
public GT_MetaTileEntity_GasTurbine(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||||
super(aName, aTier, aDescription, aTextures);
|
super(aName, aTier, aDescription, aTextures);
|
||||||
onConfigLoad();
|
onConfigLoad();
|
||||||
|
@ -40,7 +40,7 @@ public class GT_MetaTileEntity_GasTurbine
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_GasTurbine(this.mName, this.mTier, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_GasTurbine(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_Recipe.GT_Recipe_Map getRecipes() {
|
public GT_Recipe.GT_Recipe_Map getRecipes() {
|
||||||
|
@ -100,8 +100,8 @@ public class GT_MetaTileEntity_GasTurbine
|
||||||
return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_SIDE_ACTIVE)};
|
return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_SIDE_ACTIVE)};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getPollution() {
|
public int getPollution() {
|
||||||
return (int) (GT_MetaTileEntity_GasTurbine.BASE_POLLUTION * Math.pow(2, mTier - 1));
|
return (int) (GT_MetaTileEntity_GasTurbine.BASE_POLLUTION * Math.pow(2, mTier - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach
|
||||||
}
|
}
|
||||||
|
|
||||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_LightningRod(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_LightningRod(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class GT_MetaTileEntity_MagicEnergyConverter
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_MagicEnergyConverter(this.mName, this.mTier, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_MagicEnergyConverter(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_Recipe.GT_Recipe_Map getRecipes() {
|
public GT_Recipe.GT_Recipe_Map getRecipes() {
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_MagicalEnergyAbsorber(this.mName, this.mTier, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_MagicalEnergyAbsorber(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_Recipe.GT_Recipe_Map getRecipes() {
|
public GT_Recipe.GT_Recipe_Map getRecipes() {
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class GT_MetaTileEntity_PlasmaGenerator
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_PlasmaGenerator(this.mName, this.mTier, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_PlasmaGenerator(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_Recipe.GT_Recipe_Map getRecipes() {
|
public GT_Recipe.GT_Recipe_Map getRecipes() {
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class GT_MetaTileEntity_SolidNaquadahReactor
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_SolidNaquadahReactor(this.mName, this.mTier, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_SolidNaquadahReactor(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_Recipe.GT_Recipe_Map getRecipes() {
|
public GT_Recipe.GT_Recipe_Map getRecipes() {
|
||||||
|
|
|
@ -18,8 +18,8 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
|
||||||
|
|
||||||
public GT_MetaTileEntity_SteamTurbine(int aID, String aName, String aNameRegional, int aTier) {
|
public GT_MetaTileEntity_SteamTurbine(int aID, String aName, String aNameRegional, int aTier) {
|
||||||
super(aID, aName, aNameRegional, aTier, new String[]{
|
super(aID, aName, aNameRegional, aTier, new String[]{
|
||||||
"Converts Steam into EU",
|
"Converts Steam into EU",
|
||||||
"Base rate: 2L of Steam -> 1 EU"}, new ITexture[0]);
|
"Base rate: 2L of Steam -> 1 EU"});
|
||||||
onConfigLoad();
|
onConfigLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_SteamTurbine(this.mName, this.mTier, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_SteamTurbine(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_Recipe.GT_Recipe_Map getRecipes() {
|
public GT_Recipe.GT_Recipe_Map getRecipes() {
|
||||||
|
@ -47,12 +47,12 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getDescription() {
|
public String[] getDescription() {
|
||||||
String[] desc = new String[mDescription.length + 2];
|
String[] desc = new String[mDescriptionArray.length + 2];
|
||||||
System.arraycopy(mDescription, 0, desc, 0, mDescription.length);
|
System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length);
|
||||||
desc[mDescription.length] = "Fuel Efficiency: " + (600 / getEfficiency()) + "%";
|
desc[mDescriptionArray.length] = "Fuel Efficiency: " + (600 / getEfficiency()) + "%";
|
||||||
desc[mDescription.length + 1] = String.format("Consumes up to %sL of Steam per second",
|
desc[mDescriptionArray.length + 1] = String.format("Consumes up to %sL of Steam per second",
|
||||||
(int) (4000 * (8 * Math.pow(4, mTier) + Math.pow(2, mTier)) / (600 / getEfficiency())));
|
(int) (4000 * (8 * Math.pow(4, mTier) + Math.pow(2, mTier)) / (600 / getEfficiency())));
|
||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getCapacity() {
|
public int getCapacity() {
|
||||||
|
@ -68,8 +68,8 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getFuelValue(FluidStack aLiquid) {
|
public int getFuelValue(FluidStack aLiquid) {
|
||||||
if(aLiquid==null)return 0;
|
if (aLiquid == null) return 0;
|
||||||
String fluidName = aLiquid.getFluid().getUnlocalizedName(aLiquid);
|
String fluidName = aLiquid.getFluid().getUnlocalizedName(aLiquid);
|
||||||
return GT_ModHandler.isSteam(aLiquid) || fluidName.equals("fluid.steam") || fluidName.equals("ic2.fluidSteam") || fluidName.equals("fluid.mfr.steam.still.name") ? 3 : 0;
|
return GT_ModHandler.isSteam(aLiquid) || fluidName.equals("fluid.steam") || fluidName.equals("ic2.fluidSteam") || fluidName.equals("fluid.mfr.steam.still.name") ? 3 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,18 +119,18 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
|
||||||
return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_SIDE_ACTIVE)};
|
return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_SIDE_ACTIVE)};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getPollution() {
|
public int getPollution() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isFluidInputAllowed(FluidStack aFluid) {
|
public boolean isFluidInputAllowed(FluidStack aFluid) {
|
||||||
if(aFluid.getFluid().getUnlocalizedName(aFluid).equals("ic2.fluidSuperheatedSteam")){
|
if (aFluid.getFluid().getUnlocalizedName(aFluid).equals("ic2.fluidSuperheatedSteam")) {
|
||||||
aFluid.amount=0;
|
aFluid.amount = 0;
|
||||||
aFluid = null;
|
aFluid = null;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return super.isFluidInputAllowed(aFluid);
|
return super.isFluidInputAllowed(aFluid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ public class GT_MetaTileEntity_BasicHull_Bronze
|
||||||
}
|
}
|
||||||
|
|
||||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_BasicHull_Bronze(this.mName, this.mTier, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_BasicHull_Bronze(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
|
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
|
||||||
|
|
|
@ -23,7 +23,7 @@ public class GT_MetaTileEntity_BasicHull_BronzeBricks
|
||||||
}
|
}
|
||||||
|
|
||||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_BasicHull_BronzeBricks(this.mName, this.mTier, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_BasicHull_BronzeBricks(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
|
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
|
||||||
|
|
|
@ -23,7 +23,7 @@ public class GT_MetaTileEntity_BasicHull_Steel
|
||||||
}
|
}
|
||||||
|
|
||||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_BasicHull_Steel(this.mName, this.mTier, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_BasicHull_Steel(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
|
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
|
||||||
|
|
|
@ -23,7 +23,7 @@ public class GT_MetaTileEntity_BasicHull_SteelBricks
|
||||||
}
|
}
|
||||||
|
|
||||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_BasicHull_SteelBricks(this.mName, this.mTier, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_BasicHull_SteelBricks(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
|
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
|
||||||
|
|
|
@ -85,7 +85,7 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_AdvSeismicProspector(this.mName, this.mTier, this.mDescription, this.mTextures,
|
return new GT_MetaTileEntity_AdvSeismicProspector(this.mName, this.mTier, this.mDescriptionArray, this.mTextures,
|
||||||
this.mGUIName, this.mNEIName, this.near, this.middle, this.radius, this.step);
|
this.mGUIName, this.mNEIName, this.near, this.middle, this.radius, this.step);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ public class GT_MetaTileEntity_Boxinator
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Boxinator(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
|
return new GT_MetaTileEntity_Boxinator(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_Recipe.GT_Recipe_Map getRecipeList() {
|
public GT_Recipe.GT_Recipe_Map getRecipeList() {
|
||||||
|
|
|
@ -26,7 +26,7 @@ public class GT_MetaTileEntity_Charger extends GT_MetaTileEntity_BasicBatteryBuf
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Charger(mName, mTier, mDescription, mTextures, mInventory.length);
|
return new GT_MetaTileEntity_Charger(mName, mTier, mDescriptionArray, mTextures, mInventory.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class GT_MetaTileEntity_CuringOven
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_CuringOven(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
|
return new GT_MetaTileEntity_CuringOven(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
||||||
|
|
|
@ -27,7 +27,7 @@ public class GT_MetaTileEntity_Disassembler
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Disassembler(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
|
return new GT_MetaTileEntity_Disassembler(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int checkRecipe() {
|
public int checkRecipe() {
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class GT_MetaTileEntity_Massfabricator
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Massfabricator(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
|
return new GT_MetaTileEntity_Massfabricator(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onConfigLoad(GT_Config aConfig) {
|
public void onConfigLoad(GT_Config aConfig) {
|
||||||
|
|
|
@ -74,7 +74,7 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_MicrowaveEnergyTransmitter(this.mName, this.mTier, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_MicrowaveEnergyTransmitter(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] getInfoData() {
|
public String[] getInfoData() {
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class GT_MetaTileEntity_MonsterRepellent extends GT_MetaTileEntity_Tiered
|
||||||
}
|
}
|
||||||
|
|
||||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_MonsterRepellent(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_MonsterRepellent(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class GT_MetaTileEntity_PotionBrewer
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_PotionBrewer(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
|
return new GT_MetaTileEntity_PotionBrewer(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_Recipe.GT_Recipe_Map getRecipeList() {
|
public GT_Recipe.GT_Recipe_Map getRecipeList() {
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Pump(this.mName, this.mTier, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_Pump(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveNBTData(NBTTagCompound aNBT) {
|
public void saveNBTData(NBTTagCompound aNBT) {
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class GT_MetaTileEntity_Replicator
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Replicator(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
|
return new GT_MetaTileEntity_Replicator(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int checkRecipe() {
|
public int checkRecipe() {
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class GT_MetaTileEntity_RockBreaker
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_RockBreaker(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
|
return new GT_MetaTileEntity_RockBreaker(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_Recipe.GT_Recipe_Map getRecipeList() {
|
public GT_Recipe.GT_Recipe_Map getRecipeList() {
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class GT_MetaTileEntity_Scanner
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Scanner(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
|
return new GT_MetaTileEntity_Scanner(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int checkRecipe() {
|
public int checkRecipe() {
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_SeismicProspector(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
|
return new GT_MetaTileEntity_SeismicProspector(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -162,7 +162,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Teleporter(this.mName, this.mTier, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_Teleporter(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -16,188 +16,184 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBase {
|
public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBase {
|
||||||
private int mHeatingCapacity = 0;
|
private int mHeatingCapacity = 0;
|
||||||
|
|
||||||
public GT_MetaTileEntity_Cleanroom(int aID, String aName, String aNameRegional) {
|
public GT_MetaTileEntity_Cleanroom(int aID, String aName, String aNameRegional) {
|
||||||
super(aID, aName, aNameRegional);
|
super(aID, aName, aNameRegional);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_MetaTileEntity_Cleanroom(String aName) {
|
public GT_MetaTileEntity_Cleanroom(String aName) {
|
||||||
super(aName);
|
super(aName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Cleanroom(this.mName);
|
return new GT_MetaTileEntity_Cleanroom(this.mName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] getDescription() {
|
public String[] getDescription() {
|
||||||
return new String[] {
|
return new String[]{
|
||||||
"Controller Block for the Cleanroom",
|
"Controller Block for the Cleanroom",
|
||||||
"Min(WxHxD): 3x3x3 (Hollow), Max(WxHxD): 15x15x15 (Hollow)",
|
"Min(WxHxD): 3x3x3 (Hollow), Max(WxHxD): 15x15x15 (Hollow)",
|
||||||
"Controller (Top center), Walls Plascrete",
|
"Controller (Top center), Walls Plascrete",
|
||||||
"Top besides contoller and corners filter casings",
|
"Top besides contoller and corners filter casings",
|
||||||
"1 Reinforced Door",
|
"1 Reinforced Door",
|
||||||
"1x Energy Hatch, 1x Maintainance Hatch",
|
"1x Energy Hatch, 1x Maintainance Hatch",
|
||||||
"up to 10 Machine Hull to transfer Items & Energy inside"};
|
"up to 10 Machine Hull to transfer Items & Energy inside"};
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean checkRecipe(ItemStack aStack) {
|
public boolean checkRecipe(ItemStack aStack) {
|
||||||
this.mEfficiencyIncrease = 100;
|
this.mEfficiencyIncrease = 100;
|
||||||
this.mMaxProgresstime = 100;
|
this.mMaxProgresstime = 100;
|
||||||
this.mEUt = -4;
|
this.mEUt = -4;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
|
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
|
||||||
int x = 1;
|
int x = 1;
|
||||||
int z = 1;
|
int z = 1;
|
||||||
int y = 1;
|
int y = 1;
|
||||||
int mDoorCount = 0;
|
int mDoorCount = 0;
|
||||||
int mHullCount = 0;
|
int mHullCount = 0;
|
||||||
int mPlascreteCount = 0;
|
int mPlascreteCount = 0;
|
||||||
boolean doorState = false;
|
boolean doorState = false;
|
||||||
mUpdate = 100;
|
mUpdate = 100;
|
||||||
for (int i = 1; i < 8; i++) {
|
for (int i = 1; i < 8; i++) {
|
||||||
Block tBlock = aBaseMetaTileEntity.getBlockOffset(i, 0, 0);
|
Block tBlock = aBaseMetaTileEntity.getBlockOffset(i, 0, 0);
|
||||||
int tMeta = aBaseMetaTileEntity.getMetaIDOffset(i, 0, 0);
|
int tMeta = aBaseMetaTileEntity.getMetaIDOffset(i, 0, 0);
|
||||||
if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) {
|
if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) {
|
||||||
if (tBlock == GregTech_API.sBlockReinforced || tMeta == 2) {
|
if (tBlock == GregTech_API.sBlockReinforced || tMeta == 2) {
|
||||||
x = i;
|
x = i;
|
||||||
z = i;
|
z = i;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i = -1; i > -16; i--) {
|
for (int i = -1; i > -16; i--) {
|
||||||
Block tBlock = aBaseMetaTileEntity.getBlockOffset(x, i, z);
|
Block tBlock = aBaseMetaTileEntity.getBlockOffset(x, i, z);
|
||||||
int tMeta = aBaseMetaTileEntity.getMetaIDOffset(x, i, z);
|
int tMeta = aBaseMetaTileEntity.getMetaIDOffset(x, i, z);
|
||||||
if (tBlock != GregTech_API.sBlockReinforced || tMeta != 2) {
|
if (tBlock != GregTech_API.sBlockReinforced || tMeta != 2) {
|
||||||
y = i + 1;
|
y = i + 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (y > -2) {
|
if (y > -2) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (int dX = -x; dX <= x; dX++) {
|
for (int dX = -x; dX <= x; dX++) {
|
||||||
for (int dZ = -z; dZ <= z; dZ++) {
|
for (int dZ = -z; dZ <= z; dZ++) {
|
||||||
for (int dY = 0; dY >= y; dY--) {
|
for (int dY = 0; dY >= y; dY--) {
|
||||||
if (dX == -x || dX == x || dY == -y || dY == y || dZ == -z || dZ == z) {
|
if (dX == -x || dX == x || dY == -y || dY == y || dZ == -z || dZ == z) {
|
||||||
Block tBlock = aBaseMetaTileEntity.getBlockOffset(dX, dY, dZ);
|
Block tBlock = aBaseMetaTileEntity.getBlockOffset(dX, dY, dZ);
|
||||||
int tMeta = aBaseMetaTileEntity.getMetaIDOffset(dX, dY, dZ);
|
int tMeta = aBaseMetaTileEntity.getMetaIDOffset(dX, dY, dZ);
|
||||||
if (y == 0) {
|
if (y == 0) {
|
||||||
if (dX == -x || dX == x || dZ == -z || dZ == z) {
|
if (dX == -x || dX == x || dZ == -z || dZ == z) {
|
||||||
if (tBlock != GregTech_API.sBlockReinforced || tMeta != 2) {
|
if (tBlock != GregTech_API.sBlockReinforced || tMeta != 2) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else if (dX == 0 && dZ == 0) {
|
} else if (dX == 0 && dZ == 0) {
|
||||||
} else {
|
} else {
|
||||||
if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) {
|
if (tBlock != GregTech_API.sBlockCasings3 || tMeta != 11) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (tBlock == GregTech_API.sBlockReinforced && tMeta == 2) {
|
} else if (tBlock == GregTech_API.sBlockReinforced && tMeta == 2) {
|
||||||
mPlascreteCount++;
|
mPlascreteCount++;
|
||||||
} else {
|
} else {
|
||||||
IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ);
|
IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ);
|
||||||
if ((!addMaintenanceToMachineList(tTileEntity, 82)) && (!addEnergyInputToMachineList(tTileEntity, 82))) {
|
if ((!addMaintenanceToMachineList(tTileEntity, 82)) && (!addEnergyInputToMachineList(tTileEntity, 82))) {
|
||||||
if (tBlock instanceof ic2.core.block.BlockIC2Door) {
|
if (tBlock instanceof ic2.core.block.BlockIC2Door) {
|
||||||
if ((tMeta & 8) == 0) {
|
if ((tMeta & 8) == 0) {
|
||||||
doorState = (Math.abs(dX) > Math.abs(dZ) == ((tMeta & 1) != 0)) != ((tMeta & 4) != 0);
|
doorState = (Math.abs(dX) > Math.abs(dZ) == ((tMeta & 1) != 0)) != ((tMeta & 4) != 0);
|
||||||
}
|
}
|
||||||
mDoorCount++;
|
mDoorCount++;
|
||||||
} else {
|
} else {
|
||||||
if (tTileEntity == null) {
|
if (tTileEntity == null) {
|
||||||
{
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity();
|
||||||
}
|
if (aMetaTileEntity == null) {
|
||||||
IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity();
|
return false;
|
||||||
if (aMetaTileEntity == null) {
|
}
|
||||||
return false;
|
if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicHull) {
|
||||||
}
|
mHullCount++;
|
||||||
if (aMetaTileEntity instanceof GT_MetaTileEntity_BasicHull) {
|
} else {
|
||||||
mHullCount++;
|
return false;
|
||||||
} else {
|
}
|
||||||
return false;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
}
|
||||||
|
if (mMaintenanceHatches.size() != 1 || mEnergyHatches.size() != 1 || mDoorCount != 2 || mHullCount > 10) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
for (int dX = -x + 1; dX <= x - 1; dX++) {
|
||||||
|
for (int dZ = -z + 1; dZ <= z - 1; dZ++) {
|
||||||
|
for (int dY = -1; dY >= y + 1; dY--) {
|
||||||
|
IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ);
|
||||||
|
if (tTileEntity != null) {
|
||||||
|
IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity();
|
||||||
|
if (aMetaTileEntity != null && aMetaTileEntity instanceof GT_MetaTileEntity_BasicMachine_GT_Recipe) {
|
||||||
|
((GT_MetaTileEntity_BasicMachine_GT_Recipe) aMetaTileEntity).mCleanroom = this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
if (doorState) {
|
||||||
}
|
mEfficiency = Math.max(0, mEfficiency - 200);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (mMaintenanceHatches.size() != 1 || mEnergyHatches.size() != 1 || mDoorCount != 2 || mHullCount > 10) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
for (int dX = -x + 1; dX <= x - 1; dX++) {
|
|
||||||
for (int dZ = -z + 1; dZ <= z - 1; dZ++) {
|
|
||||||
for (int dY = -1; dY >= y + 1; dY--) {
|
|
||||||
IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(dX, dY, dZ);
|
|
||||||
if (tTileEntity != null) {
|
|
||||||
IMetaTileEntity aMetaTileEntity = tTileEntity.getMetaTileEntity();
|
|
||||||
if (aMetaTileEntity != null && aMetaTileEntity instanceof GT_MetaTileEntity_BasicMachine_GT_Recipe) {
|
|
||||||
((GT_MetaTileEntity_BasicMachine_GT_Recipe) aMetaTileEntity).mCleanroom = this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (doorState) {
|
return true;
|
||||||
mEfficiency = Math.max(0, mEfficiency - 200);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
|
||||||
}
|
if (aSide == 0 || aSide == 1) {
|
||||||
|
return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE),
|
||||||
|
new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_TOP_CLEANROOM_ACTIVE : Textures.BlockIcons.OVERLAY_TOP_CLEANROOM)};
|
||||||
|
|
||||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
|
}
|
||||||
if (aSide == 0 || aSide == 1) {
|
return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE)};
|
||||||
return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE),
|
}
|
||||||
new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_TOP_CLEANROOM_ACTIVE : Textures.BlockIcons.OVERLAY_TOP_CLEANROOM) };
|
|
||||||
|
|
||||||
}
|
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||||
return new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE) };
|
return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MultiblockDisplay.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
public GT_Recipe.GT_Recipe_Map getRecipeMap() {
|
||||||
return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MultiblockDisplay.png");
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GT_Recipe.GT_Recipe_Map getRecipeMap() {
|
public boolean isCorrectMachinePart(ItemStack aStack) {
|
||||||
return null;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isCorrectMachinePart(ItemStack aStack) {
|
public boolean isFacingValid(byte aFacing) {
|
||||||
return true;
|
return aFacing > 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isFacingValid(byte aFacing) {
|
public int getMaxEfficiency(ItemStack aStack) {
|
||||||
return aFacing > 1;
|
return 10000;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMaxEfficiency(ItemStack aStack) {
|
public int getPollutionPerTick(ItemStack aStack) {
|
||||||
return 10000;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getPollutionPerTick(ItemStack aStack) {
|
public int getDamageToComponent(ItemStack aStack) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getDamageToComponent(ItemStack aStack) {
|
public int getAmountOfOutputs() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getAmountOfOutputs() {
|
public boolean explodesOnComponentBreak(ItemStack aStack) {
|
||||||
return 0;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
public boolean explodesOnComponentBreak(ItemStack aStack) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -24,6 +24,8 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
||||||
private boolean firstRun = true;
|
private boolean firstRun = true;
|
||||||
private int mSuperEfficencyIncrease = 0;
|
private int mSuperEfficencyIncrease = 0;
|
||||||
private int integratedCircuitConfig = 0; //Steam output is reduced by 1000L per config
|
private int integratedCircuitConfig = 0; //Steam output is reduced by 1000L per config
|
||||||
|
private int excessFuel = 0; //Eliminate rounding errors for fuels that burn half items
|
||||||
|
private int excessProjectedEU = 0; //Eliminate rounding errors from throttling the boiler
|
||||||
|
|
||||||
public GT_MetaTileEntity_LargeBoiler(int aID, String aName, String aNameRegional) {
|
public GT_MetaTileEntity_LargeBoiler(int aID, String aName, String aNameRegional) {
|
||||||
super(aID, aName, aNameRegional);
|
super(aID, aName, aNameRegional);
|
||||||
|
@ -36,7 +38,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
||||||
public String[] getDescription() {
|
public String[] getDescription() {
|
||||||
return new String[]{
|
return new String[]{
|
||||||
"Controller Block for the Large Boiler",
|
"Controller Block for the Large Boiler",
|
||||||
"Produces "+(getEUt()*40)*(runtimeBoost(20)/20f)+"L of Steam with 1 Coal at "+getEUt()* 40+"L/s",
|
"Produces " + (getEUt() * 40) * (runtimeBoost(20) / 20f) + "L of Steam with 1 Coal at " + getEUt() * 40 + "L/s",
|
||||||
"A programmed circuit in the main block throttles the boiler (-1000L/s per config)",
|
"A programmed circuit in the main block throttles the boiler (-1000L/s per config)",
|
||||||
"Size(WxHxD): 3x5x3, Controller (Front middle in Fireboxes)",
|
"Size(WxHxD): 3x5x3, Controller (Front middle in Fireboxes)",
|
||||||
"3x1x3 of Fire Boxes (Bottom layer, Min 3)",
|
"3x1x3 of Fire Boxes (Bottom layer, Min 3)",
|
||||||
|
@ -92,27 +94,27 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean checkRecipe(ItemStack aStack) {
|
public boolean checkRecipe(ItemStack aStack) {
|
||||||
//Do we have an integrated circuit with a valid configuration?
|
//Do we have an integrated circuit with a valid configuration?
|
||||||
if (mInventory[1] != null && mInventory[1].getUnlocalizedName().startsWith("gt.integrated_circuit")) {
|
if (mInventory[1] != null && mInventory[1].getUnlocalizedName().startsWith("gt.integrated_circuit")) {
|
||||||
int circuit_config = mInventory[1].getItemDamage();
|
int circuit_config = mInventory[1].getItemDamage();
|
||||||
if (circuit_config >= 1 && circuit_config <= 25) {
|
if (circuit_config >= 1 && circuit_config <= 25) {
|
||||||
// If so, overwrite the current config
|
// If so, overwrite the current config
|
||||||
this.integratedCircuitConfig = circuit_config;
|
this.integratedCircuitConfig = circuit_config;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//If not, set the config to zero
|
//If not, set the config to zero
|
||||||
this.integratedCircuitConfig = 0;
|
this.integratedCircuitConfig = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mSuperEfficencyIncrease=0;
|
this.mSuperEfficencyIncrease = 0;
|
||||||
for (GT_Recipe tRecipe : GT_Recipe.GT_Recipe_Map.sDieselFuels.mRecipeList) {
|
for (GT_Recipe tRecipe : GT_Recipe.GT_Recipe_Map.sDieselFuels.mRecipeList) {
|
||||||
FluidStack tFluid = GT_Utility.getFluidForFilledItem(tRecipe.getRepresentativeInput(0), true);
|
FluidStack tFluid = GT_Utility.getFluidForFilledItem(tRecipe.getRepresentativeInput(0), true);
|
||||||
if ((tFluid != null) && (tRecipe.mSpecialValue > 1)) {
|
if (tFluid != null && tRecipe.mSpecialValue > 1) {
|
||||||
tFluid.amount = 1000;
|
tFluid.amount = 1000;
|
||||||
if (depleteInput(tFluid)) {
|
if (depleteInput(tFluid)) {
|
||||||
this.mMaxProgresstime = adjustBurnTimeForConfig(runtimeBoost(tRecipe.mSpecialValue / 2));
|
this.mMaxProgresstime = adjustBurnTimeForConfig(runtimeBoost(tRecipe.mSpecialValue / 2));
|
||||||
this.mEUt = adjustEUtForConfig(getEUt());
|
this.mEUt = adjustEUtForConfig(getEUt());
|
||||||
this.mEfficiencyIncrease = (this.mMaxProgresstime * getEfficiencyIncrease() * 4);
|
this.mEfficiencyIncrease = this.mMaxProgresstime * getEfficiencyIncrease() * 4;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -124,7 +126,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
||||||
if (depleteInput(tFluid)) {
|
if (depleteInput(tFluid)) {
|
||||||
this.mMaxProgresstime = adjustBurnTimeForConfig(Math.max(1, runtimeBoost(tRecipe.mSpecialValue * 2)));
|
this.mMaxProgresstime = adjustBurnTimeForConfig(Math.max(1, runtimeBoost(tRecipe.mSpecialValue * 2)));
|
||||||
this.mEUt = adjustEUtForConfig(getEUt());
|
this.mEUt = adjustEUtForConfig(getEUt());
|
||||||
this.mEfficiencyIncrease = (this.mMaxProgresstime * getEfficiencyIncrease());
|
this.mEfficiencyIncrease = this.mMaxProgresstime * getEfficiencyIncrease();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -132,14 +134,20 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
||||||
ArrayList<ItemStack> tInputList = getStoredInputs();
|
ArrayList<ItemStack> tInputList = getStoredInputs();
|
||||||
if (!tInputList.isEmpty()) {
|
if (!tInputList.isEmpty()) {
|
||||||
for (ItemStack tInput : tInputList) {
|
for (ItemStack tInput : tInputList) {
|
||||||
if ((GT_Utility.getFluidForFilledItem(tInput, true) == null) && ((this.mMaxProgresstime = runtimeBoost(GT_ModHandler.getFuelValue(tInput) / 80)) > 0)) {
|
if (GT_Utility.getFluidForFilledItem(tInput, true) == null && (this.mMaxProgresstime = GT_ModHandler.getFuelValue(tInput) / 80) > 0) {
|
||||||
this.mMaxProgresstime = adjustBurnTimeForConfig(this.mMaxProgresstime);
|
this.excessFuel += GT_ModHandler.getFuelValue(tInput) % 80;
|
||||||
this.mEUt = adjustEUtForConfig(getEUt());
|
this.mMaxProgresstime += this.excessFuel / 80;
|
||||||
this.mEfficiencyIncrease = (this.mMaxProgresstime * getEfficiencyIncrease());
|
this.excessFuel %= 80;
|
||||||
|
this.mMaxProgresstime = adjustBurnTimeForConfig(runtimeBoost(this.mMaxProgresstime));
|
||||||
|
this.mEUt = adjustEUtForConfig(getEUt());
|
||||||
|
this.mEfficiencyIncrease = this.mMaxProgresstime * getEfficiencyIncrease();
|
||||||
this.mOutputItems = new ItemStack[]{GT_Utility.getContainerItem(tInput, true)};
|
this.mOutputItems = new ItemStack[]{GT_Utility.getContainerItem(tInput, true)};
|
||||||
tInput.stackSize -= 1;
|
tInput.stackSize -= 1;
|
||||||
updateSlots();
|
updateSlots();
|
||||||
if(this.mEfficiencyIncrease>5000){ this.mEfficiencyIncrease=0;this.mSuperEfficencyIncrease=20;}
|
if (this.mEfficiencyIncrease > 5000) {
|
||||||
|
this.mEfficiencyIncrease = 0;
|
||||||
|
this.mSuperEfficencyIncrease = 20;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -153,7 +161,8 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
||||||
|
|
||||||
public boolean onRunningTick(ItemStack aStack) {
|
public boolean onRunningTick(ItemStack aStack) {
|
||||||
if (this.mEUt > 0) {
|
if (this.mEUt > 0) {
|
||||||
if(this.mSuperEfficencyIncrease>0)this.mEfficiency = Math.min(10000, this.mEfficiency + this.mSuperEfficencyIncrease);
|
if (this.mSuperEfficencyIncrease > 0)
|
||||||
|
this.mEfficiency = Math.min(10000, this.mEfficiency + this.mSuperEfficencyIncrease);
|
||||||
int tGeneratedEU = (int) (this.mEUt * 2L * this.mEfficiency / 10000L);
|
int tGeneratedEU = (int) (this.mEUt * 2L * this.mEfficiency / 10000L);
|
||||||
if (tGeneratedEU > 0) {
|
if (tGeneratedEU > 0) {
|
||||||
long amount = (tGeneratedEU + 160) / 160;
|
long amount = (tGeneratedEU + 160) / 160;
|
||||||
|
@ -185,7 +194,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
||||||
int tFireboxAmount = 0;
|
int tFireboxAmount = 0;
|
||||||
for (int i = -1; i < 2; i++) {
|
for (int i = -1; i < 2; i++) {
|
||||||
for (int j = -1; j < 2; j++) {
|
for (int j = -1; j < 2; j++) {
|
||||||
if ((i != 0) || (j != 0)) {
|
if (i != 0 || j != 0) {
|
||||||
for (int k = 1; k <= 4; k++) {
|
for (int k = 1; k <= 4; k++) {
|
||||||
if (!addOutputToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, k, zDir + j), getCasingTextureIndex())) {
|
if (!addOutputToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, k, zDir + j), getCasingTextureIndex())) {
|
||||||
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, k, zDir + j) != getCasingBlock()) {
|
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, k, zDir + j) != getCasingBlock()) {
|
||||||
|
@ -220,9 +229,9 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
||||||
}
|
}
|
||||||
for (int i = -1; i < 2; i++) {
|
for (int i = -1; i < 2; i++) {
|
||||||
for (int j = -1; j < 2; j++) {
|
for (int j = -1; j < 2; j++) {
|
||||||
if ((xDir + i != 0) || (zDir + j != 0)) {
|
if (xDir + i != 0 || zDir + j != 0) {
|
||||||
IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 0, zDir + j);
|
IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 0, zDir + j);
|
||||||
if ((!addMaintenanceToMachineList(tTileEntity, getFireboxTextureIndex())) && (!addInputToMachineList(tTileEntity, getFireboxTextureIndex())) && (!addMufflerToMachineList(tTileEntity, getFireboxTextureIndex()))) {
|
if (!addMaintenanceToMachineList(tTileEntity, getFireboxTextureIndex()) && !addInputToMachineList(tTileEntity, getFireboxTextureIndex()) && !addMufflerToMachineList(tTileEntity, getFireboxTextureIndex())) {
|
||||||
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j) != getFireboxBlock()) {
|
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j) != getFireboxBlock()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -234,7 +243,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (tCasingAmount >= 24) && (tFireboxAmount >= 3);
|
return tCasingAmount >= 24 && tFireboxAmount >= 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMaxEfficiency(ItemStack aStack) {
|
public int getMaxEfficiency(ItemStack aStack) {
|
||||||
|
@ -242,7 +251,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getPollutionPerTick(ItemStack aStack) {
|
public int getPollutionPerTick(ItemStack aStack) {
|
||||||
int adjustedEUOutput = Math.max(25, getEUt() - 25 * integratedCircuitConfig);
|
int adjustedEUOutput = Math.max(25, getEUt() - 25 * integratedCircuitConfig);
|
||||||
return Math.max(1, 12 * adjustedEUOutput / getEUt());
|
return Math.max(1, 12 * adjustedEUOutput / getEUt());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,17 +262,21 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
||||||
public boolean explodesOnComponentBreak(ItemStack aStack) {
|
public boolean explodesOnComponentBreak(ItemStack aStack) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int adjustEUtForConfig(int rawEUt){
|
private int adjustEUtForConfig(int rawEUt) {
|
||||||
int adjustedSteamOutput = rawEUt - 25 * integratedCircuitConfig;
|
int adjustedSteamOutput = rawEUt - 25 * integratedCircuitConfig;
|
||||||
return Math.max(adjustedSteamOutput, 25);
|
return Math.max(adjustedSteamOutput, 25);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int adjustBurnTimeForConfig(int rawBurnTime){
|
private int adjustBurnTimeForConfig(int rawBurnTime) {
|
||||||
if(mEfficiency < 10000){
|
if (mEfficiency < 10000) {
|
||||||
return rawBurnTime;
|
return rawBurnTime;
|
||||||
}
|
}
|
||||||
int adjustedEUt = Math.max(25, getEUt() - 25 * integratedCircuitConfig);
|
int adjustedEUt = Math.max(25, getEUt() - 25 * integratedCircuitConfig);
|
||||||
return rawBurnTime * getEUt() / adjustedEUt;
|
int adjustedBurnTime = rawBurnTime * getEUt() / adjustedEUt;
|
||||||
|
this.excessProjectedEU += getEUt() * rawBurnTime - adjustedEUt * adjustedBurnTime;
|
||||||
|
adjustedBurnTime += this.excessProjectedEU / adjustedEUt;
|
||||||
|
this.excessProjectedEU %= adjustedEUt;
|
||||||
|
return adjustedBurnTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -27,7 +27,7 @@ public class GT_MetaTileEntity_AlloySmelter_Bronze
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_AlloySmelter_Bronze(this.mName, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_AlloySmelter_Bronze(this.mName, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||||
|
|
|
@ -27,7 +27,7 @@ public class GT_MetaTileEntity_AlloySmelter_Steel
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_AlloySmelter_Steel(this.mName, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_AlloySmelter_Steel(this.mName, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class GT_MetaTileEntity_Compressor_Bronze
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Compressor_Bronze(this.mName, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_Compressor_Bronze(this.mName, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int checkRecipe() {
|
public int checkRecipe() {
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class GT_MetaTileEntity_Compressor_Steel
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Compressor_Steel(this.mName, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_Compressor_Steel(this.mName, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int checkRecipe() {
|
public int checkRecipe() {
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class GT_MetaTileEntity_Extractor_Bronze
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Extractor_Bronze(this.mName, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_Extractor_Bronze(this.mName, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int checkRecipe() {
|
public int checkRecipe() {
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class GT_MetaTileEntity_Extractor_Steel
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Extractor_Steel(this.mName, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_Extractor_Steel(this.mName, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int checkRecipe() {
|
public int checkRecipe() {
|
||||||
|
|
|
@ -27,7 +27,7 @@ public class GT_MetaTileEntity_ForgeHammer_Bronze
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_ForgeHammer_Bronze(this.mName, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_ForgeHammer_Bronze(this.mName, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||||
|
|
|
@ -27,7 +27,7 @@ public class GT_MetaTileEntity_ForgeHammer_Steel
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_ForgeHammer_Steel(this.mName, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_ForgeHammer_Steel(this.mName, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class GT_MetaTileEntity_Furnace_Bronze
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Furnace_Bronze(this.mName, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_Furnace_Bronze(this.mName, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int checkRecipe() {
|
public int checkRecipe() {
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class GT_MetaTileEntity_Furnace_Steel
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Furnace_Steel(this.mName, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_Furnace_Steel(this.mName, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int checkRecipe() {
|
public int checkRecipe() {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class GT_MetaTileEntity_Macerator_Bronze
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Macerator_Bronze(this.mName, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_Macerator_Bronze(this.mName, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class GT_MetaTileEntity_Macerator_Steel
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Macerator_Steel(this.mName, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_Macerator_Steel(this.mName, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
||||||
|
|
|
@ -30,10 +30,10 @@ public class GT_MetaTileEntity_Locker
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] getDescription() {
|
public String[] getDescription() {
|
||||||
String[] desc = new String[mDescription.length + 1];
|
String[] desc = new String[mDescriptionArray.length + 1];
|
||||||
System.arraycopy(mDescription, 0, desc, 0, mDescription.length);
|
System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length);
|
||||||
desc[mDescription.length] = "Click with Screwdriver to change Style";
|
desc[mDescriptionArray.length] = "Click with Screwdriver to change Style";
|
||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
|
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
|
||||||
|
@ -57,7 +57,7 @@ public class GT_MetaTileEntity_Locker
|
||||||
}
|
}
|
||||||
|
|
||||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_Locker(this.mName, this.mTier, this.mDescription, this.mTextures);
|
return new GT_MetaTileEntity_Locker(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSimpleMachine() {
|
public boolean isSimpleMachine() {
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class GT_MetaTileEntity_QuantumChest extends GT_MetaTileEntity_TieredMach
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_QuantumChest(mName, mTier, mDescription, mTextures);
|
return new GT_MetaTileEntity_QuantumChest(mName, mTier, mDescriptionArray, mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -126,7 +126,7 @@ public class GT_MetaTileEntity_QuantumTank
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||||
return new GT_MetaTileEntity_QuantumTank(mName, mTier, mDescription, mTextures);
|
return new GT_MetaTileEntity_QuantumTank(mName, mTier, mDescriptionArray, mTextures);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue