Merge branch 'unstable' into mergeGTNH
# Conflicts: # src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java # src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java # src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java # src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java # src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java # src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_TieredMachineBlock.java # src/main/java/gregtech/api/util/GT_Recipe.java # src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ChestBuffer.java # src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Filter.java # src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_SuperBuffer.java # src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java # src/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Steel.java # src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_GasTurbine.java # src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Bronze.java # src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_BronzeBricks.java # src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_Steel.java # src/main/java/gregtech/common/tileentities/machines/GT_MetaTileEntity_BasicHull_SteelBricks.java # src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java # src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java # src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java # src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java # src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java # src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java # src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java # src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java # src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java # src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java # src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java # src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java # src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Bronze.java # src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Furnace_Steel.java # src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_Locker.java
This commit is contained in:
commit
00abad266c
88 changed files with 782 additions and 256 deletions
|
@ -23,9 +23,13 @@ public class GT_MetaTileEntity_E_Furnace extends GT_MetaTileEntity_BasicMachine
|
|||
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_E_Furnace(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
|
||||
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
|
||||
}
|
||||
|
||||
@Override
|
||||
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
|
||||
|
|
|
@ -38,9 +38,16 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier
|
|||
super(aName, aTier, aSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_BasicBatteryBuffer(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, int aSlotCount) {
|
||||
super(aName, aTier, aSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getDescription() {
|
||||
return new String[]{mDescription, mInventory.length + " Slots"};
|
||||
String[] desc = new String[mDescriptionArray.length + 1];
|
||||
System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length);
|
||||
desc[mDescriptionArray.length] = mInventory.length + " Slots";
|
||||
return desc;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -60,7 +67,7 @@ public class GT_MetaTileEntity_BasicBatteryBuffer extends GT_MetaTileEntity_Tier
|
|||
|
||||
@Override
|
||||
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
|
||||
|
|
|
@ -23,10 +23,18 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity
|
|||
super(aID, aName, aNameRegional, aTier, 3, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_BasicGenerator(int aID, String aName, String aNameRegional, int aTier, String[] aDescription, ITexture... aTextures) {
|
||||
super(aID, aName, aNameRegional, aTier, 3, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_BasicGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, 3, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_BasicGenerator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, 3, aDescription, aTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
|
||||
ITexture[][][] rTextures = new ITexture[10][17][];
|
||||
|
@ -52,7 +60,10 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity
|
|||
|
||||
@Override
|
||||
public String[] getDescription() {
|
||||
return new String[]{mDescription, "Fuel Efficiency: " + getEfficiency() + "%"};
|
||||
String[] desc = new String[mDescriptionArray.length + 1];
|
||||
System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length);
|
||||
desc[mDescriptionArray.length] = "Fuel Efficiency: " + getEfficiency() + "%";
|
||||
return desc;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -187,7 +198,6 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity
|
|||
@Override
|
||||
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
||||
if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && aTick % 10 == 0) {
|
||||
long tProducedEU = 0;
|
||||
if (mFluid == null) {
|
||||
if (aBaseMetaTileEntity.getUniversalEnergyStored() < maxEUOutput() + getMinimumStoredEU()) {
|
||||
mInventory[getStackDisplaySlot()] = null;
|
||||
|
@ -199,10 +209,11 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity
|
|||
} else {
|
||||
int tFuelValue = getFuelValue(mFluid), tConsumed = consumedFluidPerOperation(mFluid);
|
||||
if (tFuelValue > 0 && tConsumed > 0 && mFluid.amount > tConsumed) {
|
||||
//long tFluidAmountToUse = Math.min(mFluid.amount / tConsumed, (maxEUStore() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue);//TODO CHECK?
|
||||
long tFluidAmountToUse = Math.min(mFluid.amount / tConsumed, (maxEUOutput() * 20 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue);
|
||||
long tFluidAmountToUse = Math.min(mFluid.amount / tConsumed, (maxEUStore() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue);
|
||||
//long tFluidAmountToUse = Math.min(mFluid.amount / tConsumed, (maxEUOutput() * 20 + getMinimumStoredEU() - aBaseMetaTileEntity.getUniversalEnergyStored()) / tFuelValue);//TODO CHECK
|
||||
if (tFluidAmountToUse > 0 && aBaseMetaTileEntity.increaseStoredEnergyUnits(tFluidAmountToUse * tFuelValue, true)) {
|
||||
tProducedEU = tFluidAmountToUse * tFuelValue;
|
||||
GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()),
|
||||
10 * getPollution());
|
||||
mFluid.amount -= tFluidAmountToUse * tConsumed;
|
||||
}
|
||||
}
|
||||
|
@ -214,14 +225,11 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity
|
|||
if (aBaseMetaTileEntity.addStackToSlot(getOutputSlot(), tEmptyContainer)) {
|
||||
aBaseMetaTileEntity.increaseStoredEnergyUnits(tFuelValue, true);
|
||||
aBaseMetaTileEntity.decrStackSize(getInputSlot(), 1);
|
||||
tProducedEU = tFuelValue;
|
||||
GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()),
|
||||
10 * getPollution());
|
||||
}
|
||||
}
|
||||
}
|
||||
if(tProducedEU>0&&getPollution()>0){
|
||||
GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()),
|
||||
(int) ((tProducedEU * getPollution()/(250*(mTier+1)))));
|
||||
}
|
||||
}
|
||||
|
||||
if (aBaseMetaTileEntity.isServerSide())
|
||||
|
|
|
@ -21,10 +21,14 @@ public class GT_MetaTileEntity_BasicHull extends GT_MetaTileEntity_BasicTank {
|
|||
public GT_MetaTileEntity_BasicHull(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_BasicHull(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
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
|
||||
|
|
|
@ -12,6 +12,10 @@ public abstract class GT_MetaTileEntity_BasicHull_NonElectric extends GT_MetaTil
|
|||
super(aName, aTier, 1, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_BasicHull_NonElectric(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, 1, aDescription, aTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) {
|
||||
return mTextures[Math.min(2, aSide)][aColorIndex + 1];
|
||||
|
|
|
@ -93,6 +93,15 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
|
|||
mNEIName = aNEIName;
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_BasicMachine(String aName, int aTier, int aAmperage, String[] aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, String aGUIName, String aNEIName) {
|
||||
super(aName, aTier, OTHER_SLOT_COUNT + aInputSlotCount + aOutputSlotCount + 1, aDescription, aTextures);
|
||||
mInputSlotCount = Math.max(0, aInputSlotCount);
|
||||
mOutputItems = new ItemStack[Math.max(0, aOutputSlotCount)];
|
||||
mAmperage = aAmperage;
|
||||
mGUIName = aGUIName;
|
||||
mNEIName = aNEIName;
|
||||
}
|
||||
|
||||
public boolean setMainFacing(byte aDirection){
|
||||
mMainFacing = aDirection;
|
||||
if(getBaseMetaTileEntity().getFrontFacing() == mMainFacing){
|
||||
|
|
|
@ -41,6 +41,10 @@ public abstract class GT_MetaTileEntity_BasicMachine_Bronze extends GT_MetaTileE
|
|||
super(aName, aBricked ? 1 : 0, 0, aDescription, aTextures, aInputSlotCount, aOutputSlotCount, "", "");
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_BasicMachine_Bronze(String aName, String[] aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, boolean aBricked) {
|
||||
super(aName, aBricked ? 1 : 0, 0, aDescription, aTextures, aInputSlotCount, aOutputSlotCount, "", "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveNBTData(NBTTagCompound aNBT) {
|
||||
super.saveNBTData(aNBT);
|
||||
|
|
|
@ -616,9 +616,21 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_
|
|||
mGUIParameterB = (byte) aGUIParameterB;
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_BasicMachine_GT_Recipe(String aName, int aTier, String[] aDescription, GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int aTankCapacity, int aAmperage, int aGUIParameterA, int aGUIParameterB, ITexture[][][] aTextures, String aGUIName, String aNEIName, String aSound, boolean aSharedTank, boolean aRequiresFluidForFiltering, int aSpecialEffect) {
|
||||
super(aName, aTier, aAmperage, aDescription, aTextures, aInputSlots, aOutputSlots, aGUIName, aNEIName);
|
||||
mSharedTank = aSharedTank;
|
||||
mTankCapacity = aTankCapacity;
|
||||
mSpecialEffect = aSpecialEffect;
|
||||
mRequiresFluidForFiltering = aRequiresFluidForFiltering;
|
||||
mRecipes = aRecipes;
|
||||
mSound = aSound;
|
||||
mGUIParameterA = (byte) aGUIParameterA;
|
||||
mGUIParameterB = (byte) aGUIParameterB;
|
||||
}
|
||||
|
||||
@Override
|
||||
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
|
||||
|
@ -631,17 +643,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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
||||
if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) return false;
|
||||
if (mInventory[aIndex] != null) return true;
|
||||
switch (mInputSlotCount) {
|
||||
case 0: return false;
|
||||
case 1: 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
|
||||
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
|
||||
if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) return false;
|
||||
if (mInventory[aIndex] != null) return true;
|
||||
switch (mInputSlotCount) {
|
||||
case 0:
|
||||
return false;
|
||||
case 1:
|
||||
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
|
||||
public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
||||
|
|
|
@ -20,6 +20,10 @@ public abstract class GT_MetaTileEntity_BasicMachine_Steel extends GT_MetaTileEn
|
|||
public GT_MetaTileEntity_BasicMachine_Steel(String aName, String aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, boolean aBricked) {
|
||||
super(aName, aDescription, aTextures, aInputSlotCount, aOutputSlotCount, aBricked);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_BasicMachine_Steel(String aName, String[] aDescription, ITexture[][][] aTextures, int aInputSlotCount, int aOutputSlotCount, boolean aBricked) {
|
||||
super(aName, aDescription, aTextures, aInputSlotCount, aOutputSlotCount, aBricked);
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
|
|
|
@ -27,9 +27,17 @@ public abstract class GT_MetaTileEntity_BasicTank extends GT_MetaTileEntity_Tier
|
|||
super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_BasicTank(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String[] aDescription, ITexture... aTextures) {
|
||||
super(aID, aName, aNameRegional, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_BasicTank(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_BasicTank(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSimpleMachine() {
|
||||
|
|
|
@ -23,6 +23,10 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM
|
|||
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Buffer(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
|
||||
ITexture[][][] rTextures = new ITexture[6][17][];
|
||||
|
|
|
@ -17,6 +17,10 @@ public abstract class GT_MetaTileEntity_Hatch extends GT_MetaTileEntity_BasicTan
|
|||
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Hatch(String aName, int aTier, int aInvSlotCount, String []aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public static int getSlots(int aTier) {
|
||||
return aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16;
|
||||
}
|
||||
|
|
|
@ -18,6 +18,10 @@ public class GT_MetaTileEntity_Hatch_Dynamo extends GT_MetaTileEntity_Hatch {
|
|||
super(aName, aTier, 0, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Hatch_Dynamo(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, 0, aDescription, aTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[] getTexturesActive(ITexture aBaseTexture) {
|
||||
return new ITexture[]{aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[mTier]};
|
||||
|
@ -75,7 +79,7 @@ public class GT_MetaTileEntity_Hatch_Dynamo extends GT_MetaTileEntity_Hatch {
|
|||
|
||||
@Override
|
||||
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
|
||||
|
|
|
@ -18,6 +18,10 @@ public class GT_MetaTileEntity_Hatch_Energy extends GT_MetaTileEntity_Hatch {
|
|||
super(aName, aTier, 0, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Hatch_Energy(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, 0, aDescription, aTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[] getTexturesActive(ITexture aBaseTexture) {
|
||||
return new ITexture[]{aBaseTexture, Textures.BlockIcons.OVERLAYS_ENERGY_IN_MULTI[mTier]};
|
||||
|
@ -80,7 +84,7 @@ public class GT_MetaTileEntity_Hatch_Energy extends GT_MetaTileEntity_Hatch {
|
|||
|
||||
@Override
|
||||
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
|
||||
|
|
|
@ -22,6 +22,10 @@ public class GT_MetaTileEntity_Hatch_Input extends GT_MetaTileEntity_Hatch {
|
|||
super(aName, aTier, 3, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Hatch_Input(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, 3, aDescription, aTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[] getTexturesActive(ITexture aBaseTexture) {
|
||||
return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_IN)};
|
||||
|
@ -49,7 +53,7 @@ public class GT_MetaTileEntity_Hatch_Input extends GT_MetaTileEntity_Hatch {
|
|||
|
||||
@Override
|
||||
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
|
||||
|
|
|
@ -22,6 +22,10 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch {
|
|||
public GT_MetaTileEntity_Hatch_InputBus(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Hatch_InputBus(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16, aDescription, aTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[] getTexturesActive(ITexture aBaseTexture) {
|
||||
|
@ -55,7 +59,7 @@ public class GT_MetaTileEntity_Hatch_InputBus extends GT_MetaTileEntity_Hatch {
|
|||
|
||||
@Override
|
||||
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
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package gregtech.api.metatileentity.implementations;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import gregtech.GT_Mod;
|
||||
import gregtech.api.GregTech_API;
|
||||
import gregtech.api.enums.ItemList;
|
||||
|
@ -28,6 +25,8 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import scala.actors.threadpool.Arrays;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
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;
|
||||
|
||||
|
@ -46,10 +45,26 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch
|
|||
mAuto = aAuto;
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Hatch_Maintenance(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, boolean aAuto) {
|
||||
super(aName, aTier, aAuto ? 4 : 1, aDescription, aTextures);
|
||||
mAuto = aAuto;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getDescription() {
|
||||
if(mAuto)return new String[]{mDescription, "4 Duct tape, 2 Lubricant Cells","4 Steel Screws, 2 Adv. Circuits","For each auto-repair"};
|
||||
return new String[]{mDescription, "Cannot be shared between Multiblocks!"};
|
||||
if (mAuto) {
|
||||
String[] desc = new String[mDescriptionArray.length + 3];
|
||||
System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length);
|
||||
desc[mDescriptionArray.length] = "4 Ducttape, 2 Lubricant Cells";
|
||||
desc[mDescriptionArray.length + 1] = "4 Steel Screws, 2 Adv Circuits";
|
||||
desc[mDescriptionArray.length + 2] = "For each autorepair";
|
||||
return desc;
|
||||
} else {
|
||||
String[] desc = new String[mDescriptionArray.length + 1];
|
||||
System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length);
|
||||
desc[mDescriptionArray.length] = "Cannot be shared between Multiblocks!";
|
||||
return desc;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -91,8 +106,9 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch
|
|||
|
||||
@Override
|
||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
if(aTileEntity.getMetaTileID()==111) return new GT_MetaTileEntity_Hatch_Maintenance(mName, mTier, mDescription, mTextures, true);
|
||||
return new GT_MetaTileEntity_Hatch_Maintenance(mName, mTier, mDescription, mTextures, false);
|
||||
if (aTileEntity.getMetaTileID() == 111)//TODO CHECK
|
||||
return new GT_MetaTileEntity_Hatch_Maintenance(mName, mTier, mDescriptionArray, mTextures, true);
|
||||
return new GT_MetaTileEntity_Hatch_Maintenance(mName, mTier, mDescriptionArray, mTextures, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -104,13 +120,13 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch
|
|||
|
||||
@Override
|
||||
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);
|
||||
}
|
||||
|
||||
@Override
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -195,7 +211,10 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch
|
|||
}
|
||||
if (mSolderingTool && aPlayer instanceof EntityPlayerMP) {
|
||||
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) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,9 +23,17 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch {
|
|||
super(aName, aTier, 0, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Hatch_Muffler(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, 0, aDescription, aTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getDescription() {
|
||||
return new String[]{mDescription, "DO NOT OBSTRUCT THE OUTPUT!","Reduces Pollution to "+calculatePollutionReduction(100)+"%"};
|
||||
String[] desc = new String[mDescriptionArray.length + 2];
|
||||
System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length);
|
||||
desc[mDescriptionArray.length] = "DO NOT OBSTRUCT THE OUTPUT!";
|
||||
desc[mDescriptionArray.length + 1] = "Reduces Pollution to " + calculatePollutionReduction(100) + "%";
|
||||
return desc;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -60,19 +68,19 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch {
|
|||
|
||||
@Override
|
||||
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() {
|
||||
if(getBaseMetaTileEntity().getAirAtSide(getBaseMetaTileEntity().getFrontFacing())){
|
||||
GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), calculatePollutionReduction(10000));
|
||||
return true;
|
||||
}
|
||||
if (getBaseMetaTileEntity().getAirAtSide(getBaseMetaTileEntity().getFrontFacing())) {
|
||||
GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), calculatePollutionReduction(10000));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int calculatePollutionReduction(int aPollution){
|
||||
return (int) (aPollution *(Math.pow(0.85F, mTier-1)));
|
||||
return (int) (aPollution *(Math.pow(0.85F, mTier - 1)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,6 +24,10 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch {
|
|||
super(aName, aTier, 3, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Hatch_Output(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, 3, aDescription, aTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[] getTexturesActive(ITexture aBaseTexture) {
|
||||
return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
|
||||
|
@ -56,7 +60,7 @@ public class GT_MetaTileEntity_Hatch_Output extends GT_MetaTileEntity_Hatch {
|
|||
|
||||
@Override
|
||||
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
|
||||
|
|
|
@ -19,6 +19,10 @@ public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch {
|
|||
super(aName, aTier, aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Hatch_OutputBus(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16, aDescription, aTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[] getTexturesActive(ITexture aBaseTexture) {
|
||||
return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PIPE_OUT)};
|
||||
|
@ -51,7 +55,7 @@ public class GT_MetaTileEntity_Hatch_OutputBus extends GT_MetaTileEntity_Hatch {
|
|||
|
||||
@Override
|
||||
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
|
||||
|
|
|
@ -52,7 +52,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
|
|||
|
||||
public GT_MetaTileEntity_MultiBlockBase(int aID, String aName, String aNameRegional) {
|
||||
super(aID, aName, aNameRegional, 2);
|
||||
this.disableMaintenance = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false);
|
||||
GT_MetaTileEntity_MultiBlockBase.disableMaintenance = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false);
|
||||
this.damageFactorLow = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorLow", 5);
|
||||
this.damageFactorHigh = (float) GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorHigh", 0.6f);
|
||||
this.mNEI = "";
|
||||
|
@ -60,7 +60,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
|
|||
|
||||
public GT_MetaTileEntity_MultiBlockBase(String aName) {
|
||||
super(aName, 2);
|
||||
this.disableMaintenance = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false);
|
||||
GT_MetaTileEntity_MultiBlockBase.disableMaintenance = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false);
|
||||
this.damageFactorLow = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorLow", 5);
|
||||
this.damageFactorHigh = (float) GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorHigh", 0.6f);
|
||||
}
|
||||
|
@ -258,7 +258,10 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
|
|||
if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) {
|
||||
if (mOutputItems != null) for (ItemStack tStack : mOutputItems)
|
||||
if (tStack != null) {
|
||||
try{GT_Mod.instance.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);
|
||||
}
|
||||
if (mOutputFluids != null && mOutputFluids.length == 1) {
|
||||
|
@ -278,8 +281,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
|
|||
if (mOutputFluids != null && mOutputFluids.length > 0) {
|
||||
if (mOutputFluids.length > 1) {
|
||||
try {
|
||||
GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "oilplant");
|
||||
} catch (Exception e) {
|
||||
GT_Mod.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "oilplant");
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,10 +12,13 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit
|
|||
*/
|
||||
public final byte mTier;
|
||||
|
||||
@Deprecated
|
||||
public final String mDescription;
|
||||
|
||||
/**
|
||||
* A simple Description.
|
||||
*/
|
||||
public final String mDescription;
|
||||
public final String[] mDescriptionArray;
|
||||
|
||||
/**
|
||||
* Contains all Textures used by this Block.
|
||||
|
@ -25,7 +28,18 @@ 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) {
|
||||
super(aID, aName, aNameRegional, aInvSlotCount);
|
||||
mTier = (byte) Math.max(0, Math.min(aTier, 15));
|
||||
mDescription = aDescription;
|
||||
mDescriptionArray = aDescription == null ? new String[0] : new String[]{aDescription};
|
||||
mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : "";
|
||||
// must always be the last call!
|
||||
if (GT.isClientSide()) mTextures = getTextureSet(aTextures);
|
||||
else mTextures = null;
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_TieredMachineBlock(int aID, String aName, String aNameRegional, int aTier, int aInvSlotCount, String[] aDescription, ITexture... aTextures) {
|
||||
super(aID, aName, aNameRegional, aInvSlotCount);
|
||||
mTier = (byte) Math.max(0, Math.min(aTier, 15));
|
||||
mDescriptionArray = aDescription == null ? new String[0] : aDescription;
|
||||
mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : "";
|
||||
|
||||
// must always be the last call!
|
||||
if (GT.isClientSide()) mTextures = getTextureSet(aTextures);
|
||||
|
@ -35,7 +49,16 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit
|
|||
public GT_MetaTileEntity_TieredMachineBlock(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aInvSlotCount);
|
||||
mTier = (byte) aTier;
|
||||
mDescription = aDescription;
|
||||
mDescriptionArray = aDescription == null ? new String[0] : new String[]{aDescription};
|
||||
mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : "";
|
||||
mTextures = aTextures;
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_TieredMachineBlock(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aInvSlotCount);
|
||||
mTier = (byte) aTier;
|
||||
mDescriptionArray = aDescription == null ? new String[0] : aDescription;
|
||||
mDescription = mDescriptionArray.length > 0 ? mDescriptionArray[0] : "";
|
||||
mTextures = aTextures;
|
||||
}
|
||||
|
||||
|
@ -56,7 +79,7 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit
|
|||
|
||||
@Override
|
||||
public String[] getDescription() {
|
||||
return new String[]{mDescription};
|
||||
return mDescriptionArray;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -66,4 +89,4 @@ public abstract class GT_MetaTileEntity_TieredMachineBlock extends MetaTileEntit
|
|||
* @param aTextures is the optional Array you can give to the Constructor.
|
||||
*/
|
||||
public abstract ITexture[][][] getTextureSet(ITexture[] aTextures);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,6 +36,10 @@ public class GT_MetaTileEntity_Transformer extends GT_MetaTileEntity_TieredMachi
|
|||
super(aName, aTier, 0, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Transformer(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, 0, aDescription, aTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
|
||||
ITexture[][][] rTextures = new ITexture[12][17][];
|
||||
|
@ -63,7 +67,7 @@ public class GT_MetaTileEntity_Transformer extends GT_MetaTileEntity_TieredMachi
|
|||
|
||||
@Override
|
||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
return new GT_MetaTileEntity_Transformer(mName, mTier, mDescription, mTextures);
|
||||
return new GT_MetaTileEntity_Transformer(mName, mTier, mDescriptionArray, mTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -342,13 +342,13 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
|
|||
boolean temp = true;
|
||||
amt = tFluid.amount;
|
||||
for (FluidStack aFluid : aFluidInputs)
|
||||
if (aFluid != null && aFluid.isFluidEqual(tFluid)){
|
||||
if (aDontCheckStackSizes ){
|
||||
if (aFluid != null && aFluid.isFluidEqual(tFluid)) {
|
||||
if (aDontCheckStackSizes) {
|
||||
temp = false;
|
||||
break;
|
||||
}
|
||||
amt -= aFluid.amount;
|
||||
if (amt<1){
|
||||
if (amt < 1) {
|
||||
temp = false;
|
||||
break;
|
||||
}
|
||||
|
@ -453,11 +453,12 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
|
|||
}
|
||||
|
||||
public String[] getNeiDesc() {
|
||||
return neiDesc;
|
||||
}
|
||||
protected void setNeiDesc(String... neiDesc) {
|
||||
this.neiDesc = neiDesc;
|
||||
}
|
||||
return neiDesc;
|
||||
}
|
||||
|
||||
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>();
|
||||
|
@ -559,7 +560,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
|
|||
public static final GT_Recipe_Map_Fuel sHugeNaquadahReactorFuels = new GT_Recipe_Map_Fuel(new HashSet<GT_Recipe>(10), "gt.recipe.hugenaquadahreactor", "Naquadah Reactor MkIV", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true);
|
||||
public static final GT_Recipe_Map_Fuel sExtraHugeNaquadahReactorFuels = new GT_Recipe_Map_Fuel(new HashSet<GT_Recipe>(10), "gt.recipe.extrahugenaquadahreactor", "Naquadah Reactor MkV", 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();
|
||||
|
||||
|
||||
/**
|
||||
* HashMap of Recipes based on their Items
|
||||
*/
|
||||
|
@ -1420,7 +1421,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
|
|||
}
|
||||
|
||||
public void addSolidRecipes(ItemStack ... itemStacks) {
|
||||
for(ItemStack itemStack : itemStacks){
|
||||
for (ItemStack itemStack : itemStacks){
|
||||
addSolidRecipe(itemStack);
|
||||
}
|
||||
}
|
||||
|
@ -1444,10 +1445,10 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
|
|||
tungstensteelBurnTime -= tungstensteelBurnTime % 0.05;
|
||||
|
||||
recipe.setNeiDesc("Burn time in seconds:",
|
||||
String.format("Bronze Boiler: %.2f", bronzeBurnTime),
|
||||
String.format("Steel Boiler: %.2f", steelBurnTime),
|
||||
String.format("Titanium Boiler: %.2f", titaniumBurnTime),
|
||||
String.format("Tungstensteel Boiler: %.2f", tungstensteelBurnTime));
|
||||
String.format("Bronze Boiler: %.4f", bronzeBurnTime),
|
||||
String.format("Steel Boiler: %.4f", steelBurnTime),
|
||||
String.format("Titanium Boiler: %.4f", titaniumBurnTime),
|
||||
String.format("Tungstensteel Boiler: %.4f", tungstensteelBurnTime));
|
||||
return super.addRecipe(recipe);
|
||||
}
|
||||
|
||||
|
|
|
@ -35,11 +35,11 @@ public class GT_Pollution {//TODO REWORK
|
|||
* Lava Boiler(20)
|
||||
* High Pressure Boiler(20)
|
||||
* Bronze Blast Furnace(50)
|
||||
* Diesel Generator(14/28/75)
|
||||
* Gas Turbine(7/14/37)
|
||||
* Diesel Generator(40/80/160)
|
||||
* Gas Turbine(20/40/80)
|
||||
* Charcoal Pile(100)
|
||||
*
|
||||
* Large Diesel Generator(300)
|
||||
* Large Diesel Engine(320)
|
||||
* Electric Blast Furnace(100)
|
||||
* Implosion Compressor(2000)
|
||||
* Large Boiler(240)
|
||||
|
|
|
@ -24,9 +24,13 @@ public class GT_MetaTileEntity_ChestBuffer
|
|||
public GT_MetaTileEntity_ChestBuffer(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_ChestBuffer(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
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() {
|
||||
|
|
|
@ -25,9 +25,13 @@ public class GT_MetaTileEntity_Filter
|
|||
public GT_MetaTileEntity_Filter(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Filter(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
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() {
|
||||
|
|
|
@ -27,9 +27,13 @@ public class GT_MetaTileEntity_Regulator
|
|||
public GT_MetaTileEntity_Regulator(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Regulator(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
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() {
|
||||
|
|
|
@ -18,9 +18,13 @@ public class GT_MetaTileEntity_SuperBuffer
|
|||
public GT_MetaTileEntity_SuperBuffer(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_SuperBuffer(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
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() {
|
||||
|
|
|
@ -31,8 +31,12 @@ public class GT_MetaTileEntity_TypeFilter
|
|||
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_TypeFilter(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
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() {
|
||||
|
|
|
@ -31,9 +31,17 @@ public abstract class GT_MetaTileEntity_Boiler
|
|||
super(aID, aName, aNameRegional, 0, 4, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Boiler(int aID, String aName, String aNameRegional, String[] aDescription, ITexture... aTextures) {
|
||||
super(aID, aName, aNameRegional, 0, 4, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Boiler(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, 4, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Boiler(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, 4, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
|
||||
ITexture[] tmp = mTextures[aSide >= 2 ? aSide != aFacing ? 2 : ((byte) (aActive ? 4 : 3)) : aSide][aColorIndex + 1];
|
||||
|
|
|
@ -22,13 +22,20 @@ import net.minecraftforge.fluids.IFluidHandler;
|
|||
public class GT_MetaTileEntity_Boiler_Bronze
|
||||
extends GT_MetaTileEntity_Boiler {
|
||||
public GT_MetaTileEntity_Boiler_Bronze(int aID, String aName, String aNameRegional) {
|
||||
super(aID, aName, aNameRegional, "An early way to get Steam Power", new ITexture[0]);
|
||||
super(aID, aName, aNameRegional, new String[]{
|
||||
"An early way to get Steam Power",
|
||||
"Produces 120L of Steam per second",
|
||||
"Causes 20 Pollution per second"});
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Boiler_Bronze(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Boiler_Bronze(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
|
||||
ITexture[][][] rTextures = new ITexture[5][17][];
|
||||
for (byte i = -1; i < 16; i++) {
|
||||
|
@ -54,7 +61,7 @@ public class GT_MetaTileEntity_Boiler_Bronze
|
|||
}
|
||||
|
||||
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) {
|
||||
|
@ -140,8 +147,8 @@ public class GT_MetaTileEntity_Boiler_Bronze
|
|||
this.mProcessingEnergy -= 1;
|
||||
this.mTemperature += 1;
|
||||
}
|
||||
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);
|
||||
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);
|
||||
}
|
||||
aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
|
||||
}
|
||||
|
|
|
@ -22,13 +22,20 @@ import net.minecraftforge.fluids.IFluidHandler;
|
|||
public class GT_MetaTileEntity_Boiler_Lava
|
||||
extends GT_MetaTileEntity_Boiler {
|
||||
public GT_MetaTileEntity_Boiler_Lava(int aID, String aName, String aNameRegional) {
|
||||
super(aID, aName, aNameRegional, "A Boiler running off Lava", new ITexture[0]);
|
||||
super(aID, aName, aNameRegional, new String[]{
|
||||
"A Boiler running off Lava",
|
||||
"Produces 600L of Steam per second",
|
||||
"Causes 20 Pollution per second"});
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Boiler_Lava(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Boiler_Lava(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
|
||||
ITexture[][][] rTextures = new ITexture[5][17][];
|
||||
for (byte i = -1; i < 16; i++) {
|
||||
|
@ -54,7 +61,7 @@ public class GT_MetaTileEntity_Boiler_Lava
|
|||
}
|
||||
|
||||
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) {
|
||||
|
@ -119,8 +126,8 @@ public class GT_MetaTileEntity_Boiler_Lava
|
|||
this.mTemperature += 1;
|
||||
}
|
||||
|
||||
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);
|
||||
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);
|
||||
}
|
||||
aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import gregtech.api.util.GT_ModHandler;
|
|||
import gregtech.common.gui.GT_Container_Boiler;
|
||||
import gregtech.common.gui.GT_GUIContainer_Boiler;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
|
@ -17,13 +18,21 @@ import net.minecraftforge.fluids.IFluidHandler;
|
|||
public class GT_MetaTileEntity_Boiler_Solar
|
||||
extends GT_MetaTileEntity_Boiler {
|
||||
public GT_MetaTileEntity_Boiler_Solar(int aID, String aName, String aNameRegional) {
|
||||
super(aID, aName, aNameRegional, "Steam Power by the Sun", new ITexture[0]);
|
||||
super(aID, aName, aNameRegional, new String[]{
|
||||
"Steam Power by the Sun",
|
||||
"Produces 120L of Steam per second",
|
||||
"Calcifies over time, reducing Steam output to 40L/s",
|
||||
"Break and replace to decalcify"});
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Boiler_Solar(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Boiler_Solar(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
|
||||
ITexture[][][] rTextures = new ITexture[4][17][];
|
||||
for (byte i = -1; i < 16; i = (byte) (i + 1)) {
|
||||
|
@ -56,7 +65,21 @@ public class GT_MetaTileEntity_Boiler_Solar
|
|||
}
|
||||
|
||||
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;
|
||||
|
||||
@Override
|
||||
public void saveNBTData(NBTTagCompound aNBT) {
|
||||
super.saveNBTData(aNBT);
|
||||
aNBT.setInteger("mRunTime", this.mRunTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadNBTData(NBTTagCompound aNBT) {
|
||||
super.loadNBTData(aNBT);
|
||||
this.mRunTime = aNBT.getInteger("mRunTime");
|
||||
}
|
||||
|
||||
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
||||
|
@ -92,12 +115,17 @@ public class GT_MetaTileEntity_Boiler_Solar
|
|||
return;
|
||||
}
|
||||
this.mFluid.amount -= 1;
|
||||
mRunTime += 1;
|
||||
int tOutput = 150;
|
||||
if (mRunTime > 10000) {
|
||||
tOutput = Math.max(50, 150 - ((mRunTime - 10000) / 100));
|
||||
}
|
||||
if (this.mSteam == null) {
|
||||
this.mSteam = GT_ModHandler.getSteam(150L);
|
||||
this.mSteam = GT_ModHandler.getSteam(tOutput);
|
||||
} else if (GT_ModHandler.isSteam(this.mSteam)) {
|
||||
this.mSteam.amount += 150;
|
||||
this.mSteam.amount += tOutput;
|
||||
} else {
|
||||
this.mSteam = GT_ModHandler.getSteam(150L);
|
||||
this.mSteam = GT_ModHandler.getSteam(tOutput);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -121,5 +149,3 @@ public class GT_MetaTileEntity_Boiler_Solar
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -20,15 +20,21 @@ import net.minecraftforge.fluids.FluidStack;
|
|||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
|
||||
public class GT_MetaTileEntity_Boiler_Steel
|
||||
extends GT_MetaTileEntity_Boiler {
|
||||
extends GT_MetaTileEntity_Boiler {//TODO CHECK POLLUTION VALUES AND DESCRIPTIONS FOR POLLUTION SPOILERS
|
||||
public GT_MetaTileEntity_Boiler_Steel(int aID, String aName, String aNameRegional) {
|
||||
super(aID, aName, aNameRegional, "Faster than the Bronze Boiler", new ITexture[0]);
|
||||
super(aID, aName, aNameRegional, new String[]{
|
||||
"Faster than the Bronze Boiler",
|
||||
"Produces 300L of Steam per second"});
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Boiler_Steel(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Boiler_Steel(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
|
||||
ITexture[][][] rTextures = new ITexture[5][17][];
|
||||
for (byte i = -1; i < 16; i = (byte) (i + 1)) {
|
||||
|
@ -59,7 +65,7 @@ public class GT_MetaTileEntity_Boiler_Steel
|
|||
}
|
||||
|
||||
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) {
|
||||
|
@ -145,8 +151,8 @@ public class GT_MetaTileEntity_Boiler_Steel
|
|||
this.mProcessingEnergy -= 2;
|
||||
this.mTemperature += 1;
|
||||
}
|
||||
if(this.mProcessingEnergy>0 && (aTick % 20L == 0L)){
|
||||
GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 40);
|
||||
if (this.mProcessingEnergy > 0 && (aTick % 20L == 0L)) {
|
||||
GT_Pollution.addPollution(this.getBaseMetaTileEntity().getWorld(), new ChunkPosition(this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord()), 30);
|
||||
}
|
||||
aBaseMetaTileEntity.setActive(this.mProcessingEnergy > 0);
|
||||
}
|
||||
|
|
|
@ -19,10 +19,14 @@ import net.minecraft.item.ItemStack;
|
|||
public class GT_MetaTileEntity_DieselGenerator
|
||||
extends GT_MetaTileEntity_BasicGenerator {
|
||||
|
||||
public static final int BASE_POLLUTION = 2;
|
||||
|
||||
public int mEfficiency;
|
||||
|
||||
public GT_MetaTileEntity_DieselGenerator(int aID, String aName, String aNameRegional, int aTier) {
|
||||
super(aID, aName, aNameRegional, aTier, "Requires liquid Fuel", new ITexture[0]);
|
||||
super(aID, aName, aNameRegional, aTier, new String[]{
|
||||
"Requires liquid Fuel",
|
||||
"Causes " + (int) (20 * BASE_POLLUTION * Math.pow(2, aTier - 1)) + " Pollution per second"});
|
||||
onConfigLoad();
|
||||
}
|
||||
|
||||
|
@ -31,12 +35,17 @@ public class GT_MetaTileEntity_DieselGenerator
|
|||
onConfigLoad();
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_DieselGenerator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aDescription, aTextures);
|
||||
onConfigLoad();
|
||||
}
|
||||
|
||||
public boolean isOutputFacing(byte aSide) {
|
||||
return aSide == getBaseMetaTileEntity().getFrontFacing();
|
||||
}
|
||||
|
||||
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() {
|
||||
|
@ -56,7 +65,7 @@ public class GT_MetaTileEntity_DieselGenerator
|
|||
}
|
||||
|
||||
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));
|
||||
if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) {
|
||||
rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3);
|
||||
|
@ -113,8 +122,8 @@ public class GT_MetaTileEntity_DieselGenerator
|
|||
return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.DIESEL_GENERATOR_SIDE_ACTIVE)};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPollution() {
|
||||
return 10;
|
||||
}
|
||||
@Override
|
||||
public int getPollution() {
|
||||
return (int) (GT_MetaTileEntity_DieselGenerator.BASE_POLLUTION * Math.pow(2, mTier - 1));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,12 +25,17 @@ public class GT_MetaTileEntity_FluidNaquadahReactor
|
|||
onConfigLoad();
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_FluidNaquadahReactor(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aDescription, aTextures);
|
||||
onConfigLoad();
|
||||
}
|
||||
|
||||
public boolean isOutputFacing(byte aSide) {
|
||||
return (aSide > 1) && (aSide != getBaseMetaTileEntity().getFrontFacing()) && (aSide != getBaseMetaTileEntity().getBackFacing());
|
||||
}
|
||||
|
||||
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() {
|
||||
|
|
|
@ -13,10 +13,13 @@ import gregtech.api.util.GT_Recipe;
|
|||
public class GT_MetaTileEntity_GasTurbine
|
||||
extends GT_MetaTileEntity_BasicGenerator {
|
||||
|
||||
public static final int BASE_POLLUTION = 1;
|
||||
|
||||
public int mEfficiency;
|
||||
|
||||
public GT_MetaTileEntity_GasTurbine(int aID, String aName, String aNameRegional, int aTier) {
|
||||
super(aID, aName, aNameRegional, aTier, "Requires flammable Gasses", new ITexture[0]);
|
||||
super(aID, aName, aNameRegional, aTier, new String[]{
|
||||
"Requires flammable Gasses"});
|
||||
onConfigLoad();
|
||||
}
|
||||
|
||||
|
@ -25,12 +28,17 @@ public class GT_MetaTileEntity_GasTurbine
|
|||
onConfigLoad();
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_GasTurbine(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aDescription, aTextures);
|
||||
onConfigLoad();
|
||||
}
|
||||
|
||||
public boolean isOutputFacing(byte aSide) {
|
||||
return aSide == getBaseMetaTileEntity().getFrontFacing();
|
||||
}
|
||||
|
||||
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() {
|
||||
|
@ -90,8 +98,8 @@ public class GT_MetaTileEntity_GasTurbine
|
|||
return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.GAS_TURBINE_SIDE_ACTIVE)};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPollution() {
|
||||
return 5;
|
||||
}
|
||||
@Override
|
||||
public int getPollution() {
|
||||
return (int) (GT_MetaTileEntity_GasTurbine.BASE_POLLUTION * Math.pow(2, mTier - 1));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,10 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach
|
|||
public GT_MetaTileEntity_LightningRod(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_LightningRod(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
|
||||
|
@ -34,7 +38,7 @@ public class GT_MetaTileEntity_LightningRod extends GT_MetaTileEntity_TieredMach
|
|||
}
|
||||
|
||||
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
|
||||
|
|
|
@ -25,12 +25,17 @@ public class GT_MetaTileEntity_MagicEnergyConverter
|
|||
onConfigLoad();
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_MagicEnergyConverter(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aDescription, aTextures);
|
||||
onConfigLoad();
|
||||
}
|
||||
|
||||
public boolean isOutputFacing(byte aSide) {
|
||||
return aSide == getBaseMetaTileEntity().getFrontFacing();
|
||||
}
|
||||
|
||||
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() {
|
||||
|
|
|
@ -34,7 +34,7 @@ import static gregtech.api.enums.GT_Values.V;
|
|||
|
||||
public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_BasicGenerator {
|
||||
|
||||
public static final ArrayList<EntityEnderCrystal> sUsedDragonCrystalList = new ArrayList();
|
||||
public static final ArrayList<EntityEnderCrystal> sUsedDragonCrystalList = new ArrayList<EntityEnderCrystal>();
|
||||
public static boolean sAllowMultipleEggs = true;
|
||||
public static GT_MetaTileEntity_MagicalEnergyAbsorber mActiveSiphon = null;
|
||||
public static int sEnergyPerEnderCrystal = 32;
|
||||
|
@ -53,13 +53,18 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
|
|||
super(aName, aTier, aDescription, aTextures);
|
||||
onConfigLoad();
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_MagicalEnergyAbsorber(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aDescription, aTextures);
|
||||
onConfigLoad();
|
||||
}
|
||||
|
||||
public boolean isOutputFacing(byte aSide) {
|
||||
return aSide == getBaseMetaTileEntity().getFrontFacing();
|
||||
}
|
||||
|
||||
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() {
|
||||
|
|
|
@ -25,12 +25,17 @@ public class GT_MetaTileEntity_PlasmaGenerator
|
|||
onConfigLoad();
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_PlasmaGenerator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aDescription, aTextures);
|
||||
onConfigLoad();
|
||||
}
|
||||
|
||||
public boolean isOutputFacing(byte aSide) {
|
||||
return aSide == getBaseMetaTileEntity().getFrontFacing();
|
||||
}
|
||||
|
||||
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() {
|
||||
|
|
|
@ -24,12 +24,17 @@ public class GT_MetaTileEntity_SolidNaquadahReactor
|
|||
onConfigLoad();
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_SolidNaquadahReactor(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aDescription, aTextures);
|
||||
onConfigLoad();
|
||||
}
|
||||
|
||||
public boolean isOutputFacing(byte aSide) {
|
||||
return (aSide > 1) && (aSide != getBaseMetaTileEntity().getFrontFacing()) && (aSide != getBaseMetaTileEntity().getBackFacing());
|
||||
}
|
||||
|
||||
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() {
|
||||
|
|
|
@ -17,7 +17,9 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
|
|||
public int mEfficiency;
|
||||
|
||||
public GT_MetaTileEntity_SteamTurbine(int aID, String aName, String aNameRegional, int aTier) {
|
||||
super(aID, aName, aNameRegional, aTier, "Requires Steam to run", new ITexture[0]);
|
||||
super(aID, aName, aNameRegional, aTier, new String[]{
|
||||
"Converts Steam into EU",
|
||||
"Base rate: 2L of Steam -> 1 EU"});
|
||||
onConfigLoad();
|
||||
}
|
||||
|
||||
|
@ -26,12 +28,17 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
|
|||
onConfigLoad();
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_SteamTurbine(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aDescription, aTextures);
|
||||
onConfigLoad();
|
||||
}
|
||||
|
||||
public boolean isOutputFacing(byte aSide) {
|
||||
return aSide == getBaseMetaTileEntity().getFrontFacing();
|
||||
}
|
||||
|
||||
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() {
|
||||
|
@ -40,7 +47,12 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
|
|||
|
||||
@Override
|
||||
public String[] getDescription() {
|
||||
return new String[]{mDescription, "Fuel Efficiency: " + (600 / getEfficiency()) + "%"};
|
||||
String[] desc = new String[mDescriptionArray.length + 2];
|
||||
System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length);
|
||||
desc[mDescriptionArray.length] = "Fuel Efficiency: " + (600 / getEfficiency()) + "%";
|
||||
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())));
|
||||
return desc;
|
||||
}
|
||||
|
||||
public int getCapacity() {
|
||||
|
@ -56,8 +68,8 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener
|
|||
}
|
||||
|
||||
public int getFuelValue(FluidStack aLiquid) {
|
||||
if(aLiquid==null)return 0;
|
||||
String fluidName = aLiquid.getFluid().getUnlocalizedName(aLiquid);
|
||||
if (aLiquid == null) return 0;
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -107,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)};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPollution() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPollution() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFluidInputAllowed(FluidStack aFluid) {
|
||||
if(aFluid.getFluid().getUnlocalizedName(aFluid).equals("ic2.fluidSuperheatedSteam")){
|
||||
aFluid.amount=0;
|
||||
aFluid = null;
|
||||
return false;
|
||||
}
|
||||
if (aFluid.getFluid().getUnlocalizedName(aFluid).equals("ic2.fluidSuperheatedSteam")) {
|
||||
aFluid.amount = 0;
|
||||
aFluid = null;
|
||||
return false;
|
||||
}
|
||||
return super.isFluidInputAllowed(aFluid);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,8 +18,12 @@ public class GT_MetaTileEntity_BasicHull_Bronze
|
|||
super(aName, aTier, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_BasicHull_Bronze(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aDescription, aTextures);
|
||||
}
|
||||
|
||||
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) {
|
||||
|
|
|
@ -18,8 +18,12 @@ public class GT_MetaTileEntity_BasicHull_BronzeBricks
|
|||
super(aName, aTier, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_BasicHull_BronzeBricks(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aDescription, aTextures);
|
||||
}
|
||||
|
||||
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) {
|
||||
|
|
|
@ -18,8 +18,12 @@ public class GT_MetaTileEntity_BasicHull_Steel
|
|||
super(aName, aTier, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_BasicHull_Steel(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aDescription, aTextures);
|
||||
}
|
||||
|
||||
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) {
|
||||
|
|
|
@ -18,8 +18,12 @@ public class GT_MetaTileEntity_BasicHull_SteelBricks
|
|||
super(aName, aTier, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_BasicHull_SteelBricks(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aDescription, aTextures);
|
||||
}
|
||||
|
||||
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) {
|
||||
|
|
|
@ -80,8 +80,17 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba
|
|||
step = aStep;
|
||||
}
|
||||
|
||||
protected GT_MetaTileEntity_AdvSeismicProspector(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures,
|
||||
String aGUIName, String aNEIName, int aNear, int aMiddle, int aRadius, int aStep) {
|
||||
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
|
||||
radius = aRadius;
|
||||
near = aNear;
|
||||
middle = aMiddle;
|
||||
step = aStep;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,8 +22,12 @@ public class GT_MetaTileEntity_Boxinator
|
|||
super(aName, aTier, 1, aDescription, aTextures, 2, 1, aGUIName, aNEIName);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Boxinator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
|
||||
super(aName, aTier, 1, aDescription, aTextures, 2, 1, aGUIName, aNEIName);
|
||||
}
|
||||
|
||||
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() {
|
||||
|
|
|
@ -21,9 +21,13 @@ public class GT_MetaTileEntity_Charger extends GT_MetaTileEntity_BasicBatteryBuf
|
|||
super(aName, aTier, aDescription, aTextures, aSlotCount);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Charger(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, int aSlotCount) {
|
||||
super(aName, aTier, aDescription, aTextures, aSlotCount);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
return new GT_MetaTileEntity_Charger(mName, mTier, mDescription, mTextures, mInventory.length);
|
||||
return new GT_MetaTileEntity_Charger(mName, mTier, mDescriptionArray, mTextures, mInventory.length);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -27,8 +27,12 @@ public class GT_MetaTileEntity_CuringOven
|
|||
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_CuringOven(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
|
||||
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
|
||||
}
|
||||
|
||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
return new GT_MetaTileEntity_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) {
|
||||
|
|
|
@ -23,8 +23,12 @@ public class GT_MetaTileEntity_Disassembler
|
|||
super(aName, aTier, 1, aDescription, aTextures, 1, 9, aGUIName, aNEIName);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Disassembler(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
|
||||
super(aName, aTier, 1, aDescription, aTextures, 1, 9, aGUIName, aNEIName);
|
||||
}
|
||||
|
||||
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() {
|
||||
|
|
|
@ -27,8 +27,12 @@ public class GT_MetaTileEntity_Massfabricator
|
|||
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Massfabricator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
|
||||
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
|
||||
}
|
||||
|
||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
return new GT_MetaTileEntity_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) {
|
||||
|
|
|
@ -51,6 +51,10 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt
|
|||
super(aName, aTier, 3, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_MicrowaveEnergyTransmitter(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, 3, aDescription, aTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
|
||||
if (aBaseMetaTileEntity.isClientSide()) return true;
|
||||
|
@ -71,7 +75,7 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt
|
|||
|
||||
@Override
|
||||
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() {
|
||||
|
|
|
@ -24,8 +24,12 @@ public class GT_MetaTileEntity_MonsterRepellent extends GT_MetaTileEntity_Tiered
|
|||
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_MonsterRepellent(String aName, int aTier, int aInvSlotCount, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
|
||||
}
|
||||
|
||||
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
|
||||
|
|
|
@ -26,8 +26,12 @@ public class GT_MetaTileEntity_PotionBrewer
|
|||
super(aName, aTier, 1, aDescription, aTextures, 1, 0, aGUIName, aNEIName);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_PotionBrewer(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
|
||||
super(aName, aTier, 1, aDescription, aTextures, 1, 0, aGUIName, aNEIName);
|
||||
}
|
||||
|
||||
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() {
|
||||
|
|
|
@ -29,7 +29,7 @@ import static gregtech.api.enums.GT_Values.V;
|
|||
|
||||
public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
|
||||
|
||||
public ArrayList<ChunkPosition> mPumpList = new ArrayList();
|
||||
public ArrayList<ChunkPosition> mPumpList = new ArrayList<ChunkPosition>();
|
||||
public int mPumpTimer = 0;
|
||||
public int mPumpCountBelow = 0;
|
||||
public Block mPumpedBlock1 = null;
|
||||
|
@ -43,9 +43,13 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
|
|||
super(aName, aTier, 3, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Pump(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, 3, aDescription, aTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
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) {
|
||||
|
|
|
@ -29,8 +29,12 @@ public class GT_MetaTileEntity_Replicator
|
|||
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Replicator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
|
||||
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
|
||||
}
|
||||
|
||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
return new GT_MetaTileEntity_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() {
|
||||
|
|
|
@ -24,8 +24,12 @@ public class GT_MetaTileEntity_RockBreaker
|
|||
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_RockBreaker(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
|
||||
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
|
||||
}
|
||||
|
||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
return new GT_MetaTileEntity_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() {
|
||||
|
|
|
@ -30,8 +30,12 @@ public class GT_MetaTileEntity_Scanner
|
|||
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Scanner(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
|
||||
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
|
||||
}
|
||||
|
||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
return new GT_MetaTileEntity_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() {
|
||||
|
|
|
@ -38,8 +38,12 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic
|
|||
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_SeismicProspector(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
|
||||
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
|
||||
}
|
||||
|
||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
return new GT_MetaTileEntity_SeismicProspector(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
|
||||
return new GT_MetaTileEntity_SeismicProspector(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -59,6 +59,10 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank {
|
|||
super(aName, aTier, 3, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Teleporter(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, 3, aDescription, aTextures);
|
||||
}
|
||||
|
||||
private static float weightCalculation(Entity aEntity) {
|
||||
try {
|
||||
if ((aEntity instanceof EntityFX)) {
|
||||
|
@ -157,7 +161,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank {
|
|||
|
||||
@Override
|
||||
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
|
||||
|
|
|
@ -140,11 +140,15 @@ public class GT_MetaTileEntity_AssemblyLine
|
|||
int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
|
||||
int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
|
||||
if (xDir != 0) {
|
||||
for(int r = 0; r <= 16; r++){
|
||||
int i = r*xDir;
|
||||
for (int r = 0; r <= 16; r++) {
|
||||
int i = r * xDir;
|
||||
|
||||
if(i!=0&& !(aBaseMetaTileEntity.getBlockOffset(0, 0, i)==GregTech_API.sBlockCasings3&&aBaseMetaTileEntity.getMetaIDOffset(0, 0, i)==10)){return false;}
|
||||
if(!aBaseMetaTileEntity.getBlockOffset(0, -1, i).getUnlocalizedName().equals("blockAlloyGlass")){return false;}
|
||||
if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(0, 0, i) == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(0, 0, i) == 10)) {
|
||||
return false;
|
||||
}
|
||||
if (!aBaseMetaTileEntity.getBlockOffset(0, -1, i).getUnlocalizedName().equals("blockAlloyGlass")) {
|
||||
return false;
|
||||
}
|
||||
IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(0, -2, i);
|
||||
if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))){
|
||||
if (aBaseMetaTileEntity.getBlockOffset(0, -2, i) != GregTech_API.sBlockCasings2) {return false;}
|
||||
|
@ -152,33 +156,52 @@ public class GT_MetaTileEntity_AssemblyLine
|
|||
}
|
||||
|
||||
tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 1, i);
|
||||
if (!addEnergyInputToMachineList(tTileEntity, 16)){
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir, 1, i) != GregTech_API.sBlockCasings2) {return false;}
|
||||
if (aBaseMetaTileEntity.getMetaIDOffset(xDir, 1, i) != 0) {return false;}
|
||||
if (!addEnergyInputToMachineList(tTileEntity, 16)) {
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir, 1, i) != GregTech_API.sBlockCasings2) {
|
||||
return false;
|
||||
}
|
||||
if (aBaseMetaTileEntity.getMetaIDOffset(xDir, 1, i) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(xDir, 0, i) == GregTech_API.sBlockCasings2 && aBaseMetaTileEntity.getMetaIDOffset(xDir, 0, i) == 9)) {
|
||||
return false;
|
||||
}
|
||||
if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(xDir, -1, i) == GregTech_API.sBlockCasings2 && aBaseMetaTileEntity.getMetaIDOffset(xDir, -1, i) == 5)) {
|
||||
return false;
|
||||
}
|
||||
if(i!=0&& !(aBaseMetaTileEntity.getBlockOffset(xDir, 0, i)==GregTech_API.sBlockCasings2&&aBaseMetaTileEntity.getMetaIDOffset(xDir, 0, i)==9)){return false;}
|
||||
if(i!=0&& !(aBaseMetaTileEntity.getBlockOffset(xDir,-1, i)==GregTech_API.sBlockCasings2&&aBaseMetaTileEntity.getMetaIDOffset(xDir,-1, i)==5)){return false;}
|
||||
|
||||
|
||||
if(!(aBaseMetaTileEntity.getBlockOffset(xDir*2, 0, i)==GregTech_API.sBlockCasings3&&aBaseMetaTileEntity.getMetaIDOffset(xDir*2, 0, i)==10)){return false;}
|
||||
if(!aBaseMetaTileEntity.getBlockOffset(xDir*2, -1, i).getUnlocalizedName().equals("blockAlloyGlass")){return false;}
|
||||
tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir*2, -2, i);
|
||||
if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))){
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir*2, -2, i) != GregTech_API.sBlockCasings2) {return false;}
|
||||
if (aBaseMetaTileEntity.getMetaIDOffset(xDir*2, -2, i) != 0) {return false;}
|
||||
if (!(aBaseMetaTileEntity.getBlockOffset(xDir * 2, 0, i) == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(xDir * 2, 0, i) == 10)) {
|
||||
return false;
|
||||
}
|
||||
if (!aBaseMetaTileEntity.getBlockOffset(xDir * 2, -1, i).getUnlocalizedName().equals("blockAlloyGlass")) {
|
||||
return false;
|
||||
}
|
||||
tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir * 2, -2, i);
|
||||
if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))) {
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir * 2, -2, i) != GregTech_API.sBlockCasings2) {
|
||||
return false;
|
||||
}
|
||||
if (aBaseMetaTileEntity.getMetaIDOffset(xDir * 2, -2, i) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, -2, i);
|
||||
if (!addInputToMachineList(tTileEntity, 16)){
|
||||
if (!addOutputToMachineList(tTileEntity, 16)){
|
||||
}else{if(r>0){return mEnergyHatches.size()>0;}else{return false;}}
|
||||
if (!addInputToMachineList(tTileEntity, 16) && addOutputToMachineList(tTileEntity, 16)) {
|
||||
return r > 0 && mEnergyHatches.size() > 0;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
for(int r = 0; r <= 16; r++){
|
||||
int i = r*-zDir;
|
||||
} else {
|
||||
for (int r = 0; r <= 16; r++) {
|
||||
int i = r * -zDir;
|
||||
|
||||
if(i!=0 && !(aBaseMetaTileEntity.getBlockOffset(i, 0, 0)==GregTech_API.sBlockCasings3&&aBaseMetaTileEntity.getMetaIDOffset(i, 0, 0)==10)){return false;}
|
||||
if(!aBaseMetaTileEntity.getBlockOffset(i, -1, 0).getUnlocalizedName().equals("blockAlloyGlass")){return false;}
|
||||
if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(i, 0, 0) == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(i, 0, 0) == 10)) {
|
||||
return false;
|
||||
}
|
||||
if (!aBaseMetaTileEntity.getBlockOffset(i, -1, 0).getUnlocalizedName().equals("blockAlloyGlass")) {
|
||||
return false;
|
||||
}
|
||||
IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, 0);
|
||||
if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))){
|
||||
if (aBaseMetaTileEntity.getBlockOffset(i, -2, 0) != GregTech_API.sBlockCasings2) {return false;}
|
||||
|
@ -186,25 +209,40 @@ public class GT_MetaTileEntity_AssemblyLine
|
|||
}
|
||||
|
||||
tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, 1, zDir);
|
||||
if (!addEnergyInputToMachineList(tTileEntity, 16)){
|
||||
if (aBaseMetaTileEntity.getBlockOffset(i, 1, zDir) != GregTech_API.sBlockCasings2) {return false;}
|
||||
if (aBaseMetaTileEntity.getMetaIDOffset(i, 1, zDir) != 0) {return false;}
|
||||
if (!addEnergyInputToMachineList(tTileEntity, 16)) {
|
||||
if (aBaseMetaTileEntity.getBlockOffset(i, 1, zDir) != GregTech_API.sBlockCasings2) {
|
||||
return false;
|
||||
}
|
||||
if (aBaseMetaTileEntity.getMetaIDOffset(i, 1, zDir) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(i, 0, zDir) == GregTech_API.sBlockCasings2 && aBaseMetaTileEntity.getMetaIDOffset(i, 0, zDir) == 9)) {
|
||||
return false;
|
||||
}
|
||||
if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(i, -1, zDir) == GregTech_API.sBlockCasings2 && aBaseMetaTileEntity.getMetaIDOffset(i, -1, zDir) == 5)) {
|
||||
return false;
|
||||
}
|
||||
if(i!=0&& !(aBaseMetaTileEntity.getBlockOffset(i, 0, zDir)==GregTech_API.sBlockCasings2&&aBaseMetaTileEntity.getMetaIDOffset(i, 0, zDir)==9)){return false;}
|
||||
if(i!=0&& !(aBaseMetaTileEntity.getBlockOffset(i,-1, zDir)==GregTech_API.sBlockCasings2&&aBaseMetaTileEntity.getMetaIDOffset(i,-1, zDir)==5)){return false;}
|
||||
|
||||
|
||||
if(!(aBaseMetaTileEntity.getBlockOffset(i, 0, zDir*2)==GregTech_API.sBlockCasings3&&aBaseMetaTileEntity.getMetaIDOffset(i, 0, zDir*2)==10)){return false;}
|
||||
if(!aBaseMetaTileEntity.getBlockOffset(i, -1, zDir*2).getUnlocalizedName().equals("blockAlloyGlass")){return false;}
|
||||
tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, zDir*2);
|
||||
if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))){
|
||||
if (aBaseMetaTileEntity.getBlockOffset(i, -2, zDir*2) != GregTech_API.sBlockCasings2) {return false;}
|
||||
if (aBaseMetaTileEntity.getMetaIDOffset(i, -2, zDir*2) != 0) {return false;}
|
||||
if (!(aBaseMetaTileEntity.getBlockOffset(i, 0, zDir * 2) == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(i, 0, zDir * 2) == 10)) {
|
||||
return false;
|
||||
}
|
||||
if (!aBaseMetaTileEntity.getBlockOffset(i, -1, zDir * 2).getUnlocalizedName().equals("blockAlloyGlass")) {
|
||||
return false;
|
||||
}
|
||||
tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, zDir * 2);
|
||||
if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))) {
|
||||
if (aBaseMetaTileEntity.getBlockOffset(i, -2, zDir * 2) != GregTech_API.sBlockCasings2) {
|
||||
return false;
|
||||
}
|
||||
if (aBaseMetaTileEntity.getMetaIDOffset(i, -2, zDir * 2) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, zDir);
|
||||
if (!addInputToMachineList(tTileEntity, 16)){
|
||||
if (!addOutputToMachineList(tTileEntity, 16)){
|
||||
}else{if(r>0){return mEnergyHatches.size()>0;}else{return false;}}
|
||||
if (!addInputToMachineList(tTileEntity, 16) && addOutputToMachineList(tTileEntity, 16)) {
|
||||
return r > 0 && mEnergyHatches.size() > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,8 @@ public class GT_MetaTileEntity_BronzeBlastFurnace
|
|||
"Controller Block for the Bronze Blast Furnace",
|
||||
"How to get your first Steel",
|
||||
"Size(WxHxD): 3x4x3 (Hollow, with opening on top)",
|
||||
"Bronze Plated Bricks for the rest (32 at least!)"};
|
||||
"Bronze Plated Bricks for the rest (32 at least!)",
|
||||
"Causes 50 Pollution per second"};
|
||||
}
|
||||
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
|
||||
|
|
|
@ -44,7 +44,8 @@ public class GT_MetaTileEntity_Charcoal_Pit extends GT_MetaTileEntity_MultiBlock
|
|||
"11x1x11 of Bricks (Bottom layer only)",
|
||||
"11x5x11 of Logs (Above bottom Brick layer)",
|
||||
"Only grass/dirt can touch Log blocks",
|
||||
"No air between logs allowed"};
|
||||
"No air between logs allowed",
|
||||
"Causes 100 Pollution per second"};
|
||||
}
|
||||
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
|
||||
|
|
|
@ -16,15 +16,15 @@ import net.minecraft.entity.player.InventoryPlayer;
|
|||
import net.minecraft.item.ItemStack;
|
||||
|
||||
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) {
|
||||
super(aID, aName, aNameRegional);
|
||||
}
|
||||
public GT_MetaTileEntity_Cleanroom(int aID, String aName, String aNameRegional) {
|
||||
super(aID, aName, aNameRegional);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Cleanroom(String aName) {
|
||||
super(aName);
|
||||
}
|
||||
public GT_MetaTileEntity_Cleanroom(String aName) {
|
||||
super(aName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
|
@ -40,8 +40,7 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas
|
|||
"Top besides contoller and corners filter casings",
|
||||
"1 Reinforced Door",
|
||||
"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"};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -158,17 +157,17 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas
|
|||
mEfficiency = Math.max(0, mEfficiency - 200);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
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)};
|
||||
|
||||
}
|
||||
return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE)};
|
||||
}
|
||||
}
|
||||
return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.BLOCK_PLASCRETE)};
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
|
@ -209,4 +208,4 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas
|
|||
public boolean explodesOnComponentBreak(ItemStack aStack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock
|
|||
public GT_MetaTileEntity_DieselEngine(int aID, String aName, String aNameRegional) {
|
||||
super(aID, aName, aNameRegional);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_DieselEngine(String aName) {
|
||||
super(aName);
|
||||
}
|
||||
|
@ -49,8 +50,11 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock
|
|||
"1x Muffler Hatch (top middle back, next to the rear Gear Box)",
|
||||
"1x Dynamo Hatch (back centered)",
|
||||
"Engine Intake Casings not obstructed in front (only air blocks)",
|
||||
"Supply Diesel Fuel and Lubricant to run. Supply Oxygen to boost output (optional).",
|
||||
"2048EU/t default output, 6144EU/t boosted output"};
|
||||
"Supply Diesel Fuel and 1000L of Lubricant per hour to run.",
|
||||
"Supply 40L of Oxygen per second to boost output (optional).",
|
||||
"Default: Produces 2048EU/t at 100% efficiency",
|
||||
"Boosted: Produces 6144EU/t at 150% efficiency",
|
||||
"Causes " + 20 * getPollutionPerTick(null) + " Pollution per second"};
|
||||
}
|
||||
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
|
||||
|
@ -218,8 +222,9 @@ public class GT_MetaTileEntity_DieselEngine extends GT_MetaTileEntity_MultiBlock
|
|||
|
||||
@Override
|
||||
public int getPollutionPerTick(ItemStack aStack) {
|
||||
return 15;
|
||||
return 16;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean explodesOnComponentBreak(ItemStack aStack) {
|
||||
return true;
|
||||
|
|
|
@ -47,7 +47,11 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
|
|||
"1x Energy Hatch (Any bottom layer casing)",
|
||||
"1x Maintenance Hatch (Any bottom layer casing)",
|
||||
"1x Muffler Hatch (Top middle)",
|
||||
"Heat Proof Machine Casings for the rest"};
|
||||
"Heat Proof Machine Casings for the rest",
|
||||
"Each 900K over the min. Heat Capacity grants 5% speedup (multiplicatively)",
|
||||
"Each 1800K over the min. Heat Capacity allows for one upgraded overclock",
|
||||
"Upgraded overclocks reduce recipe time to 25% and increase EU/t to 400%",
|
||||
"Causes " + 20 * getPollutionPerTick(null) + " Pollution per second"};
|
||||
}
|
||||
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
|
||||
|
|
|
@ -41,7 +41,8 @@ public class GT_MetaTileEntity_ImplosionCompressor
|
|||
"1x Maintenance Hatch (Any casing)",
|
||||
"1x Muffler Hatch (Any casing)",
|
||||
"1x Energy Hatch (Any casing)",
|
||||
"Solid Steel Casings for the rest (16 at least!)"};
|
||||
"Solid Steel Casings for the rest (16 at least!)",
|
||||
"Causes " + 20 * getPollutionPerTick(null) + " Pollution per second"};
|
||||
}
|
||||
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
|
||||
|
|
|
@ -23,6 +23,9 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
|||
extends GT_MetaTileEntity_MultiBlockBase {
|
||||
private boolean firstRun = true;
|
||||
private int mSuperEfficencyIncrease = 0;
|
||||
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) {
|
||||
super(aID, aName, aNameRegional);
|
||||
|
@ -35,7 +38,8 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
|||
public String[] getDescription() {
|
||||
return new String[]{
|
||||
"Controller Block for the Large Boiler",
|
||||
"Produces "+(getEUt()*40)*(runtimeBoost(20)/20f)+"L of Steam with 1 Coal in "+runtimeBoost(20)+" ticks",
|
||||
"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)",
|
||||
"Size(WxHxD): 3x5x3, Controller (Front middle in Fireboxes)",
|
||||
"3x1x3 of Fire Boxes (Bottom layer, Min 3)",
|
||||
"3x4x3 of Casings (Above Fireboxes, hollow, Min 24!)",
|
||||
|
@ -45,7 +49,8 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
|||
"1x Output Hatch (Any Casing)",
|
||||
"1x Maintenance Hatch (Any Firebox)",
|
||||
"1x Muffler Hatch (Any Firebox)",
|
||||
"Refined liquid fuels have 1/4 efficiency"};
|
||||
"Diesel fuels have 1/4 efficiency",
|
||||
String.format("Takes %.2f seconds to heat up", 500.0 / getEfficiencyIncrease())};
|
||||
}
|
||||
|
||||
public abstract Block getCasingBlock();
|
||||
|
@ -88,15 +93,27 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
|||
}
|
||||
|
||||
public boolean checkRecipe(ItemStack aStack) {
|
||||
this.mSuperEfficencyIncrease=0;
|
||||
//Do we have an integrated circuit with a valid configuration?
|
||||
if (mInventory[1] != null && mInventory[1].getUnlocalizedName().startsWith("gt.integrated_circuit")) {
|
||||
int circuit_config = mInventory[1].getItemDamage();
|
||||
if (circuit_config >= 1 && circuit_config <= 25) {
|
||||
// If so, overwrite the current config
|
||||
this.integratedCircuitConfig = circuit_config;
|
||||
}
|
||||
} else {
|
||||
//If not, set the config to zero
|
||||
this.integratedCircuitConfig = 0;
|
||||
}
|
||||
|
||||
this.mSuperEfficencyIncrease = 0;
|
||||
for (GT_Recipe tRecipe : GT_Recipe.GT_Recipe_Map.sDieselFuels.mRecipeList) {
|
||||
FluidStack tFluid = GT_Utility.getFluidForFilledItem(tRecipe.getRepresentativeInput(0), true);
|
||||
if ((tFluid != null) && (tRecipe.mSpecialValue > 1)) {
|
||||
if (tFluid != null && tRecipe.mSpecialValue > 1) {
|
||||
tFluid.amount = 1000;
|
||||
if (depleteInput(tFluid)) {
|
||||
this.mMaxProgresstime = (runtimeBoost(tRecipe.mSpecialValue / 2));
|
||||
this.mEUt = getEUt();
|
||||
this.mEfficiencyIncrease = (this.mMaxProgresstime * getEfficiencyIncrease() * 4);
|
||||
this.mMaxProgresstime = adjustBurnTimeForConfig(runtimeBoost(tRecipe.mSpecialValue / 2));
|
||||
this.mEUt = adjustEUtForConfig(getEUt());
|
||||
this.mEfficiencyIncrease = this.mMaxProgresstime * getEfficiencyIncrease() * 4;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -106,9 +123,9 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
|||
if (tFluid != null) {
|
||||
tFluid.amount = 1000;
|
||||
if (depleteInput(tFluid)) {
|
||||
this.mMaxProgresstime = Math.max(1, runtimeBoost(tRecipe.mSpecialValue * 2));
|
||||
this.mEUt = getEUt();
|
||||
this.mEfficiencyIncrease = (this.mMaxProgresstime * getEfficiencyIncrease());
|
||||
this.mMaxProgresstime = adjustBurnTimeForConfig(Math.max(1, runtimeBoost(tRecipe.mSpecialValue * 2)));
|
||||
this.mEUt = adjustEUtForConfig(getEUt());
|
||||
this.mEfficiencyIncrease = this.mMaxProgresstime * getEfficiencyIncrease();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -116,13 +133,20 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
|||
ArrayList<ItemStack> tInputList = getStoredInputs();
|
||||
if (!tInputList.isEmpty()) {
|
||||
for (ItemStack tInput : tInputList) {
|
||||
if ((GT_Utility.getFluidForFilledItem(tInput, true) == null) && ((this.mMaxProgresstime = runtimeBoost(GT_ModHandler.getFuelValue(tInput) / 80)) > 0)) {
|
||||
this.mEUt = getEUt();
|
||||
this.mEfficiencyIncrease = (this.mMaxProgresstime * getEfficiencyIncrease());
|
||||
if (GT_Utility.getFluidForFilledItem(tInput, true) == null && (this.mMaxProgresstime = GT_ModHandler.getFuelValue(tInput) / 80) > 0) {
|
||||
this.excessFuel += GT_ModHandler.getFuelValue(tInput) % 80;
|
||||
this.mMaxProgresstime += this.excessFuel / 80;
|
||||
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)};
|
||||
tInput.stackSize -= 1;
|
||||
updateSlots();
|
||||
if(this.mEfficiencyIncrease>5000){ this.mEfficiencyIncrease=0;this.mSuperEfficencyIncrease=20;}
|
||||
if (this.mEfficiencyIncrease > 5000) {
|
||||
this.mEfficiencyIncrease = 0;
|
||||
this.mSuperEfficencyIncrease = 20;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -136,7 +160,8 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
|||
|
||||
public boolean onRunningTick(ItemStack aStack) {
|
||||
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);
|
||||
if (tGeneratedEU > 0) {
|
||||
long amount = (tGeneratedEU + 160) / 160;
|
||||
|
@ -155,12 +180,11 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
|||
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
||||
if (mProgresstime > 0 && firstRun) {
|
||||
firstRun = false;
|
||||
GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "extremepressure");
|
||||
GT_Mod.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "extremepressure");
|
||||
}
|
||||
super.onPostTick(aBaseMetaTileEntity, aTick);
|
||||
}
|
||||
|
||||
|
||||
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
|
||||
int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
|
||||
int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
|
||||
|
@ -169,7 +193,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
|||
int tFireboxAmount = 0;
|
||||
for (int i = -1; i < 2; i++) {
|
||||
for (int j = -1; j < 2; j++) {
|
||||
if ((i != 0) || (j != 0)) {
|
||||
if (i != 0 || j != 0) {
|
||||
for (int k = 1; k <= 4; k++) {
|
||||
if (!addOutputToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, k, zDir + j), getCasingTextureIndex())) {
|
||||
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, k, zDir + j) != getCasingBlock()) {
|
||||
|
@ -204,9 +228,9 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
|||
}
|
||||
for (int i = -1; i < 2; i++) {
|
||||
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);
|
||||
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()) {
|
||||
return false;
|
||||
}
|
||||
|
@ -218,7 +242,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
|||
}
|
||||
}
|
||||
}
|
||||
return (tCasingAmount >= 24) && (tFireboxAmount >= 3);
|
||||
return tCasingAmount >= 24 && tFireboxAmount >= 3;
|
||||
}
|
||||
|
||||
public int getMaxEfficiency(ItemStack aStack) {
|
||||
|
@ -226,7 +250,8 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
|||
}
|
||||
|
||||
public int getPollutionPerTick(ItemStack aStack) {
|
||||
return 20;
|
||||
int adjustedEUOutput = Math.max(25, getEUt() - 25 * integratedCircuitConfig);
|
||||
return Math.max(1, 12 * adjustedEUOutput / getEUt());
|
||||
}
|
||||
|
||||
public int getDamageToComponent(ItemStack aStack) {
|
||||
|
@ -236,4 +261,21 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
|||
public boolean explodesOnComponentBreak(ItemStack aStack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
private int adjustEUtForConfig(int rawEUt) {
|
||||
int adjustedSteamOutput = rawEUt - 25 * integratedCircuitConfig;
|
||||
return Math.max(adjustedSteamOutput, 25);
|
||||
}
|
||||
|
||||
private int adjustBurnTimeForConfig(int rawBurnTime) {
|
||||
if (mEfficiency < 10000) {
|
||||
return rawBurnTime;
|
||||
}
|
||||
int adjustedEUt = Math.max(25, getEUt() - 25 * integratedCircuitConfig);
|
||||
int adjustedBurnTime = rawBurnTime * getEUt() / adjustedEUt;
|
||||
this.excessProjectedEU += getEUt() * rawBurnTime - adjustedEUt * adjustedBurnTime;
|
||||
adjustedBurnTime += this.excessProjectedEU / adjustedEUt;
|
||||
this.excessProjectedEU %= adjustedEUt;
|
||||
return adjustedBurnTime;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,8 @@ public class GT_MetaTileEntity_MultiFurnace
|
|||
"1x Maintenance Hatch (One of bottom)",
|
||||
"1x Muffler Hatch (Top middle)",
|
||||
"1x Energy Hatch (One of bottom)",
|
||||
"Heat Proof Machine Casings for the rest",};
|
||||
"Heat Proof Machine Casings for the rest",
|
||||
"Causes " + 20 * getPollutionPerTick(null) + " Pollution per second"};
|
||||
}
|
||||
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
|
||||
|
|
|
@ -34,7 +34,7 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock
|
|||
"Controller Block for the Pyrolyse Oven",
|
||||
"Industrial Charcoal producer and Oil from Plants",
|
||||
"Size(WxHxD): 5x4x5, Controller (Bottom center)",
|
||||
"3x1x3 Kanthal Heating Coils (Inside bottom 5x1x5 layer)",
|
||||
"9x Kanthal Heating Coils (Centered 3x1x3 area in Bottom layer)",
|
||||
"1x Input Hatch/Bus (Centered 3x1x3 area in Top layer)",
|
||||
"1x Output Hatch/Bus (Any bottom layer casing)",
|
||||
"1x Maintenance Hatch (Any bottom layer casing)",
|
||||
|
|
|
@ -22,8 +22,12 @@ public class GT_MetaTileEntity_AlloySmelter_Bronze
|
|||
super(aName, aDescription, aTextures, 2, 1, true);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_AlloySmelter_Bronze(String aName, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aDescription, aTextures, 2, 1, true);
|
||||
}
|
||||
|
||||
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) {
|
||||
|
|
|
@ -22,8 +22,12 @@ public class GT_MetaTileEntity_AlloySmelter_Steel
|
|||
super(aName, aDescription, aTextures, 2, 1, true);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_AlloySmelter_Steel(String aName, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aDescription, aTextures, 2, 1, true);
|
||||
}
|
||||
|
||||
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) {
|
||||
|
|
|
@ -24,12 +24,16 @@ public class GT_MetaTileEntity_Compressor_Bronze
|
|||
super(aName, aDescription, aTextures, 1, 1, false);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Compressor_Bronze(String aName, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aDescription, aTextures, 1, 1, false);
|
||||
}
|
||||
|
||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeCompressor.png", GT_Recipe.GT_Recipe_Map.sCompressorRecipes.mUnlocalizedName);
|
||||
}
|
||||
|
||||
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() {
|
||||
|
|
|
@ -24,12 +24,16 @@ public class GT_MetaTileEntity_Compressor_Steel
|
|||
super(aName, aDescription, aTextures, 1, 1, false);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Compressor_Steel(String aName, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aDescription, aTextures, 1, 1, false);
|
||||
}
|
||||
|
||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelCompressor.png", GT_Recipe.GT_Recipe_Map.sCompressorRecipes.mUnlocalizedName);
|
||||
}
|
||||
|
||||
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() {
|
||||
|
|
|
@ -24,12 +24,16 @@ public class GT_MetaTileEntity_Extractor_Bronze
|
|||
super(aName, aDescription, aTextures, 1, 1, false);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Extractor_Bronze(String aName, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aDescription, aTextures, 1, 1, false);
|
||||
}
|
||||
|
||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeExtractor.png", GT_Recipe.GT_Recipe_Map.sExtractorRecipes.mUnlocalizedName);
|
||||
}
|
||||
|
||||
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() {
|
||||
|
|
|
@ -24,12 +24,16 @@ public class GT_MetaTileEntity_Extractor_Steel
|
|||
super(aName, aDescription, aTextures, 1, 1, false);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Extractor_Steel(String aName, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aDescription, aTextures, 1, 1, false);
|
||||
}
|
||||
|
||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelExtractor.png", GT_Recipe.GT_Recipe_Map.sExtractorRecipes.mUnlocalizedName);
|
||||
}
|
||||
|
||||
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() {
|
||||
|
|
|
@ -22,8 +22,12 @@ public class GT_MetaTileEntity_ForgeHammer_Bronze
|
|||
super(aName, aDescription, aTextures, 1, 1, false);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_ForgeHammer_Bronze(String aName, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aDescription, aTextures, 1, 1, false);
|
||||
}
|
||||
|
||||
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) {
|
||||
|
|
|
@ -22,8 +22,12 @@ public class GT_MetaTileEntity_ForgeHammer_Steel
|
|||
super(aName, aDescription, aTextures, 1, 1, false);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_ForgeHammer_Steel(String aName, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aDescription, aTextures, 1, 1, false);
|
||||
}
|
||||
|
||||
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) {
|
||||
|
|
|
@ -23,12 +23,16 @@ public class GT_MetaTileEntity_Furnace_Bronze
|
|||
super(aName, aDescription, aTextures, 1, 1, true);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Furnace_Bronze(String aName, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aDescription, aTextures, 1, 1, true);
|
||||
}
|
||||
|
||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeFurnace.png", "smelting");
|
||||
}
|
||||
|
||||
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() {
|
||||
|
|
|
@ -23,12 +23,16 @@ public class GT_MetaTileEntity_Furnace_Steel
|
|||
super(aName, aDescription, aTextures, 1, 1, true);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Furnace_Steel(String aName, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aDescription, aTextures, 1, 1, true);
|
||||
}
|
||||
|
||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelFurnace.png", "smelting");
|
||||
}
|
||||
|
||||
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() {
|
||||
|
|
|
@ -29,12 +29,16 @@ public class GT_MetaTileEntity_Macerator_Bronze
|
|||
super(aName, aDescription, aTextures, 1, 1, false);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Macerator_Bronze(String aName, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aDescription, aTextures, 1, 1, false);
|
||||
}
|
||||
|
||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "BronzeMacerator.png", GT_Recipe_Map.sMaceratorRecipes.mUnlocalizedName);
|
||||
}
|
||||
|
||||
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) {
|
||||
|
|
|
@ -29,12 +29,16 @@ public class GT_MetaTileEntity_Macerator_Steel
|
|||
super(aName, aDescription, aTextures, 1, 1, false);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Macerator_Steel(String aName, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aDescription, aTextures, 1, 1, false);
|
||||
}
|
||||
|
||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
return new GT_GUIContainer_BasicMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "SteelMacerator.png", GT_Recipe_Map.sMaceratorRecipes.mUnlocalizedName);
|
||||
}
|
||||
|
||||
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) {
|
||||
|
|
|
@ -25,8 +25,15 @@ public class GT_MetaTileEntity_Locker
|
|||
super(aName, aTier, 4, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_Locker(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, 4, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public String[] getDescription() {
|
||||
return new String[]{this.mDescription, "Click with Screwdriver to change Style"};
|
||||
String[] desc = new String[mDescriptionArray.length + 1];
|
||||
System.arraycopy(mDescriptionArray, 0, desc, 0, mDescriptionArray.length);
|
||||
desc[mDescriptionArray.length] = "Click with Screwdriver to change Style";
|
||||
return desc;
|
||||
}
|
||||
|
||||
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
|
||||
|
@ -50,7 +57,7 @@ public class GT_MetaTileEntity_Locker
|
|||
}
|
||||
|
||||
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() {
|
||||
|
|
|
@ -26,6 +26,10 @@ public class GT_MetaTileEntity_QuantumChest extends GT_MetaTileEntity_TieredMach
|
|||
super(aName, aTier, 3, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_QuantumChest(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, 3, aDescription, aTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSimpleMachine() {
|
||||
return true;
|
||||
|
@ -48,7 +52,7 @@ public class GT_MetaTileEntity_QuantumChest extends GT_MetaTileEntity_TieredMach
|
|||
|
||||
@Override
|
||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
return new GT_MetaTileEntity_QuantumChest(mName, mTier, mDescription, mTextures);
|
||||
return new GT_MetaTileEntity_QuantumChest(mName, mTier, mDescriptionArray, mTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -20,6 +20,10 @@ public class GT_MetaTileEntity_QuantumTank
|
|||
super(aName, aTier, 3, aDescription, aTextures);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_QuantumTank(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
|
||||
super(aName, aTier, 3, aDescription, aTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITexture[][][] getTextureSet(ITexture[] aTextures) {
|
||||
return new ITexture[0][0][0];
|
||||
|
@ -125,7 +129,7 @@ public class GT_MetaTileEntity_QuantumTank
|
|||
|
||||
@Override
|
||||
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
|
||||
return new GT_MetaTileEntity_QuantumTank(mName, mTier, mDescription, mTextures);
|
||||
return new GT_MetaTileEntity_QuantumTank(mName, mTier, mDescriptionArray, mTextures);
|
||||
}
|
||||
|
||||
private static int CommonSizeCompute(int tier){
|
||||
|
|
Loading…
Add table
Reference in a new issue