Update version 5.08.30
This commit is contained in:
parent
c3fd04d6f4
commit
6d9c73a70a
29 changed files with 626 additions and 422 deletions
23
build.gradle
23
build.gradle
|
@ -61,3 +61,26 @@ processResources
|
|||
exclude 'mcmod.info'
|
||||
}
|
||||
}
|
||||
task sourceJar(type: Jar) {
|
||||
from sourceSets.main.allSource
|
||||
classifier = 'sources'}
|
||||
task devJar(type: Jar) {
|
||||
from sourceSets.main.output
|
||||
classifier = 'dev'
|
||||
manifest {
|
||||
//attributes 'FMLCorePlugin': 'WhateverLoaderClass'
|
||||
//attributes 'FMLCorePluginContainsFMLMod': 'true'
|
||||
}
|
||||
}
|
||||
//task apiJar(type: Jar) {
|
||||
//from sourceSets.main.allSource
|
||||
//include 'api/**'
|
||||
//classifier = 'sources'
|
||||
//manifest {
|
||||
//attributes 'FMLCorePlugin': 'WhateverLoaderClass'
|
||||
//attributes 'FMLCorePluginContainsFMLMod': 'true'
|
||||
//}
|
||||
}
|
||||
artifacts {
|
||||
archives devJar
|
||||
}
|
|
@ -306,8 +306,9 @@ public class GT_Mod
|
|||
gregtechproxy.mNerfedWoodPlank = tMainConfig.get("general", "WoodNeedsSawForCrafting", true).getBoolean(true);
|
||||
gregtechproxy.mNerfedVanillaTools = tMainConfig.get("general", "smallerVanillaToolDurability", true).getBoolean(true);
|
||||
gregtechproxy.mSortToTheEnd = tMainConfig.get("general", "EnsureToBeLoadedLast", true).getBoolean(true);
|
||||
gregtechproxy.mDisableIC2Cables = tMainConfig.get("general", "DisableIC2Cables", false).getBoolean(false);
|
||||
gregtechproxy.mAchievements = tMainConfig.get("general", "EnableAchievements", true).getBoolean(true);
|
||||
gregtechproxy.mDisableIC2Cables = tMainConfig.get("general", "DisableIC2Cables", false).getBoolean(false);
|
||||
gregtechproxy.mAchievements = tMainConfig.get("general", "EnableAchievements", true).getBoolean(true);
|
||||
gregtechproxy.mAE2Integration = tMainConfig.get("general", "EnableAE2Integration", Loader.isModLoaded("appliedenergistics2")).getBoolean(Loader.isModLoaded("appliedenergistics2"));
|
||||
|
||||
|
||||
GregTech_API.mOutputRF =GregTech_API.sOPStuff.get(ConfigCategories.general, "OutputRF", false);
|
||||
|
|
|
@ -166,7 +166,7 @@ public enum Materials implements IColorModulationContainer, ISubTagContainer {
|
|||
PhasedIron ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Phased Iron" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
|
||||
PhasedGold ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Phased Gold" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
|
||||
Soularium ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Soularium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
|
||||
Endium ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Endium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
|
||||
Endium ( 770, TextureSet.SET_DULL , 1.0F, 0, 2, 1|2 |8 , 165, 220, 250, 0, "Endium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes.dyeYellow ),
|
||||
Prismarine ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 |4 , 255, 255, 255, 0, "Prismarine" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
|
||||
GraveyardDirt ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1 , 255, 255, 255, 0, "Graveyard Dirt" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
|
||||
DarkSteel ( 364, TextureSet.SET_DULL , 8.0F, 512, 3, 1|2 |8 |64 , 80, 70, 80, 0, "Dark Steel" , 0, 0, 1811, 0, F, F, 5, 1, 1, Dyes.dyePurple ),
|
||||
|
|
|
@ -30,7 +30,7 @@ import net.minecraftforge.fluids.FluidStack;
|
|||
|
||||
public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
|
||||
|
||||
public boolean mMachine = false, mWrench = false, mScrewdriver = false, mSoftHammer = false, mHardHammer = false, mSolderingTool = false, mCrowbar = false;
|
||||
public boolean mMachine = false, mWrench = false, mScrewdriver = false, mSoftHammer = false, mHardHammer = false, mSolderingTool = false, mCrowbar = false, mRunningOnLoad = false;
|
||||
public int mPollution = 0, mProgresstime = 0, mMaxProgresstime = 0, mEUt = 0, mEfficiencyIncrease = 0, mUpdate = 0, mStartUpCheck = 100, mRuntime = 0, mEfficiency = 0;
|
||||
public ItemStack[] mOutputItems = null;
|
||||
public FluidStack[] mOutputFluids = null;
|
||||
|
@ -83,6 +83,11 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
|
|||
mOutputItems[i].writeToNBT(tNBT);
|
||||
aNBT.setTag("mOutputItem"+i, tNBT);
|
||||
}
|
||||
if (mOutputFluids != null) for (int i = 0; i < mOutputFluids.length; i++) if (mOutputFluids[i] != null) {
|
||||
NBTTagCompound tNBT = new NBTTagCompound();
|
||||
mOutputFluids[i].writeToNBT(tNBT);
|
||||
aNBT.setTag("mOutputFluids"+i, tNBT);
|
||||
}
|
||||
|
||||
aNBT.setBoolean("mWrench", mWrench);
|
||||
aNBT.setBoolean("mScrewdriver", mScrewdriver);
|
||||
|
@ -97,13 +102,16 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
|
|||
mEUt = aNBT.getInteger("mEUt");
|
||||
mProgresstime = aNBT.getInteger("mProgresstime");
|
||||
mMaxProgresstime = aNBT.getInteger("mMaxProgresstime");
|
||||
if(mMaxProgresstime>0)mRunningOnLoad=true;
|
||||
mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease");
|
||||
mEfficiency = aNBT.getInteger("mEfficiency");
|
||||
mPollution = aNBT.getInteger("mPollution");
|
||||
mRuntime = aNBT.getInteger("mRuntime");
|
||||
mOutputItems = new ItemStack[getAmountOfOutputs()];
|
||||
for (int i = 0; i < mOutputItems.length; i++) mOutputItems[i] = GT_Utility.loadItem(aNBT, "mOutputItem" + i);
|
||||
mWrench = aNBT.getBoolean("mWrench");
|
||||
mOutputFluids = new FluidStack[getAmountOfOutputs()];
|
||||
for (int i = 0; i < mOutputFluids.length; i++) mOutputFluids[i] = GT_Utility.loadFluid(aNBT, "mOutputFluids" + i);
|
||||
mWrench = aNBT.getBoolean("mWrench");
|
||||
mScrewdriver = aNBT.getBoolean("mScrewdriver");
|
||||
mSoftHammer = aNBT.getBoolean("mSoftHammer");
|
||||
mHardHammer = aNBT.getBoolean("mHardHammer");
|
||||
|
|
|
@ -1408,6 +1408,13 @@ public class GT_Utility {
|
|||
return loadItem(aNBT.getCompoundTag(aTagName));
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads an ItemStack properly.
|
||||
*/
|
||||
public static FluidStack loadFluid(NBTTagCompound aNBT, String aTagName) {
|
||||
return loadFluid(aNBT.getCompoundTag(aTagName));
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads an ItemStack properly.
|
||||
*/
|
||||
|
@ -1424,6 +1431,14 @@ public class GT_Utility {
|
|||
return GT_OreDictUnificator.get(T, rStack);
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads an ItemStack properly.
|
||||
*/
|
||||
public static FluidStack loadFluid(NBTTagCompound aNBT) {
|
||||
if (aNBT == null) return null;
|
||||
return FluidStack.loadFluidStackFromNBT(aNBT);
|
||||
}
|
||||
|
||||
public static <E> E selectItemInList(int aIndex, E aReplacement, List<E> aList) {
|
||||
if (aList == null || aList.isEmpty()) return aReplacement;
|
||||
if (aList.size() <= aIndex) return aList.get(aList.size() - 1);
|
||||
|
|
|
@ -151,6 +151,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
|
|||
public boolean mIgnoreTcon = true;
|
||||
public boolean mDisableIC2Cables = false;
|
||||
public boolean mAchievements = true;
|
||||
public boolean mAE2Integration = true;
|
||||
public int mSkeletonsShootGTArrows = 16;
|
||||
public int mMaxEqualEntitiesAtOneSpot = 3;
|
||||
public int mFlintChance = 30;
|
||||
|
|
|
@ -25,7 +25,7 @@ public class GT_Cover_SolarPanel
|
|||
else
|
||||
{
|
||||
boolean bRain = (aTileEntity.getWorld().isRaining()) && (aTileEntity.getBiome().rainfall > 0.0F);
|
||||
aCoverVariable = ((!bRain) || (aTileEntity.getWorld().skylightSubtracted < 4)) && (aTileEntity.getSkyAtSide(aSide)) ? 1 : (bRain) || (!aTileEntity.getWorld().isDaytime()) ? 2 : 0;
|
||||
aCoverVariable = bRain && aTileEntity.getWorld().skylightSubtracted >= 4 || !aTileEntity.getSkyAtSide(aSide) ? 0 : ((int) (!bRain && aTileEntity.getWorld().isDaytime() ? 1 : 2));
|
||||
}
|
||||
}
|
||||
if ((aCoverVariable == 1) || ((aCoverVariable == 2) && (aTimer % 8L == 0L))) {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package gregtech.common.tileentities.automation;
|
||||
|
||||
import gregtech.api.enums.OreDictNames;
|
||||
import gregtech.api.enums.OrePrefixes;
|
||||
import gregtech.api.enums.Textures;
|
||||
import gregtech.api.enums.Textures.BlockIcons;
|
||||
|
@ -8,6 +9,8 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
|
|||
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
|
||||
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Buffer;
|
||||
import gregtech.api.objects.GT_RenderedTexture;
|
||||
import gregtech.api.objects.ItemData;
|
||||
import gregtech.api.util.GT_OreDictUnificator;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
import gregtech.common.gui.GT_Container_TypeFilter;
|
||||
import gregtech.common.gui.GT_GUIContainer_TypeFilter;
|
||||
|
@ -71,17 +74,22 @@ public class GT_MetaTileEntity_TypeFilter
|
|||
{
|
||||
if (aRightClick)
|
||||
{
|
||||
do{
|
||||
i--;
|
||||
if (i < 0) {
|
||||
i = OrePrefixes.values().length - 1;
|
||||
}
|
||||
}while(OrePrefixes.values()[i].mPrefixedItems.isEmpty());
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
do{
|
||||
i++;
|
||||
if (i >= OrePrefixes.values().length) {
|
||||
i = 0;
|
||||
}
|
||||
}while(OrePrefixes.values()[i].mPrefixedItems.isEmpty());
|
||||
}
|
||||
if(!OrePrefixes.values()[i].mPrefixedItems.isEmpty() && OrePrefixes.values()[i].mPrefixInto == OrePrefixes.values()[i])
|
||||
mPrefix = OrePrefixes.values()[i];
|
||||
|
@ -94,21 +102,21 @@ public class GT_MetaTileEntity_TypeFilter
|
|||
|
||||
public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick)
|
||||
{
|
||||
super.onPreTick(aBaseMetaTileEntity, aTick);
|
||||
if ((getBaseMetaTileEntity().isServerSide()) && (aTick % 8L == 0L)) {
|
||||
if (this.mPrefix.mPrefixedItems.isEmpty())
|
||||
{
|
||||
this.mInventory[9] = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
Object[] tmp63_60 = new Object[1]; int tmp90_89 = ((this.mRotationIndex + 1) % this.mPrefix.mPrefixedItems.size());this.mRotationIndex = tmp90_89;tmp63_60[0] = this.mPrefix.mPrefixedItems.get(tmp90_89);this.mInventory[9] = GT_Utility.copyAmount(1L, tmp63_60);
|
||||
if (this.mInventory[9].getItemDamage() == 32767) {
|
||||
this.mInventory[9].setItemDamage(0);
|
||||
}
|
||||
this.mInventory[9].setStackDisplayName(this.mPrefix.toString());
|
||||
}
|
||||
}
|
||||
super.onPreTick(aBaseMetaTileEntity, aTick);
|
||||
if ((getBaseMetaTileEntity().isServerSide()) && (aTick % 8L == 0L)) {
|
||||
if (this.mPrefix.mPrefixedItems.isEmpty())
|
||||
{
|
||||
this.mInventory[9] = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.mInventory[9] = GT_Utility.copyAmount(1L, new Object[] { this.mPrefix.mPrefixedItems.get(this.mRotationIndex = (this.mRotationIndex + 1) % this.mPrefix.mPrefixedItems.size()) });
|
||||
if (this.mInventory[9].getItemDamage() == 32767) {
|
||||
this.mInventory[9].setItemDamage(0);
|
||||
}
|
||||
this.mInventory[9].setStackDisplayName(this.mPrefix.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void saveNBTData(NBTTagCompound aNBT)
|
||||
|
@ -129,7 +137,22 @@ public class GT_MetaTileEntity_TypeFilter
|
|||
|
||||
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack)
|
||||
{
|
||||
return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && ((this.bNBTAllowed) || (!aStack.hasTagCompound())) && (this.mPrefix.contains(aStack) != this.bInvertFilter);
|
||||
boolean tAllowPrefix = this.mPrefix.contains(aStack);
|
||||
if(this.mPrefix==OrePrefixes.ore){
|
||||
OrePrefixes tFix = GT_OreDictUnificator.getItemData(aStack).mPrefix;
|
||||
if(tFix==OrePrefixes.oreBlackgranite||
|
||||
tFix==OrePrefixes.oreDense||
|
||||
tFix==OrePrefixes.oreEnd||
|
||||
tFix==OrePrefixes.oreEndstone||
|
||||
tFix==OrePrefixes.oreNether||
|
||||
tFix==OrePrefixes.oreNetherrack||
|
||||
tFix==OrePrefixes.oreNormal||
|
||||
tFix==OrePrefixes.orePoor||
|
||||
tFix==OrePrefixes.oreRedgranite||
|
||||
tFix==OrePrefixes.oreRich||
|
||||
tFix==OrePrefixes.oreSmall)tAllowPrefix=true;
|
||||
}
|
||||
return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && ((this.bNBTAllowed) || (!aStack.hasTagCompound())) && (tAllowPrefix != this.bInvertFilter);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -101,7 +101,12 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
|
|||
if ((mActiveSiphon == null) || (mActiveSiphon.getBaseMetaTileEntity() == null) || (mActiveSiphon.getBaseMetaTileEntity().isInvalidTileEntity()) || (!mActiveSiphon.hasEgg())) {
|
||||
mActiveSiphon = this;
|
||||
} else {
|
||||
getBaseMetaTileEntity().doExplosion(Integer.MAX_VALUE);
|
||||
Block tEgg = mActiveSiphon.getBaseMetaTileEntity().getBlockOffset(0, 1, 0);
|
||||
if(!getBaseMetaTileEntity().getWorld().getChunkFromBlockCoords(mActiveSiphon.getBaseMetaTileEntity().getXCoord(), mActiveSiphon.getBaseMetaTileEntity().getZCoord()).isChunkLoaded&&(tEgg==Blocks.dragon_egg||tEgg.getUnlocalizedName().equals("tile.dragonEgg")))
|
||||
{getBaseMetaTileEntity().doExplosion(Integer.MAX_VALUE);}else{
|
||||
mActiveSiphon=this;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ import gregtech.api.util.GT_Recipe;
|
|||
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
|
||||
import gregtech.api.util.GT_Utility;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
|
||||
public class GT_MetaTileEntity_Boxinator
|
||||
extends GT_MetaTileEntity_BasicMachine
|
||||
|
@ -97,7 +98,10 @@ public class GT_MetaTileEntity_Boxinator
|
|||
if (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack))
|
||||
{
|
||||
if ((ItemList.Schematic_1by1.isStackEqual(getInputAt(1))) || (ItemList.Schematic_2by2.isStackEqual(getInputAt(1))) || (ItemList.Schematic_3by3.isStackEqual(getInputAt(1)))) {
|
||||
return GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.findRecipe(getBaseMetaTileEntity(), true, gregtech.api.enums.GT_Values.V[this.mTier], null, new ItemStack[] { GT_Utility.copyAmount(64L, new Object[] { aStack }), getInputAt(1) }) != null;
|
||||
if(GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.findRecipe(getBaseMetaTileEntity(), true, gregtech.api.enums.GT_Values.V[this.mTier], null, new ItemStack[] { GT_Utility.copyAmount(64L, new Object[] { aStack }), getInputAt(1) }) != null){return true;}
|
||||
if(ItemList.Schematic_1by1.isStackEqual(getInputAt(1))&>_ModHandler.getRecipeOutput(new ItemStack[] { aStack })!=null)return true;
|
||||
if(ItemList.Schematic_2by2.isStackEqual(getInputAt(1))&>_ModHandler.getRecipeOutput(new ItemStack[] { aStack, aStack, null, aStack, aStack })!=null){return true;}
|
||||
if(ItemList.Schematic_3by3.isStackEqual(getInputAt(1))&&(GT_ModHandler.getRecipeOutput(new ItemStack[] { aStack,aStack,aStack,aStack,aStack,aStack,aStack,aStack,aStack })!=null)){return true;}
|
||||
}else{return GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.containsInput(aStack);}
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.Arrays;
|
|||
import gregtech.GT_Mod;
|
||||
import gregtech.api.GregTech_API;
|
||||
import gregtech.api.enums.Dyes;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import gregtech.api.enums.Textures;
|
||||
import gregtech.api.gui.GT_Container_MultiMachine;
|
||||
import gregtech.api.gui.GT_GUIContainer_MultiMachine;
|
||||
|
@ -24,415 +25,422 @@ import gregtech.api.util.GT_Utility;
|
|||
import gregtech.api.metatileentity.implementations.*;
|
||||
import gregtech.common.gui.GT_GUIContainer_FusionReactor;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.multiplayer.WorldClient;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldType;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public abstract class GT_MetaTileEntity_FusionComputer
|
||||
extends GT_MetaTileEntity_MultiBlockBase
|
||||
{
|
||||
|
||||
public GT_Recipe mLastRecipe;
|
||||
public int mEUStore;
|
||||
public GT_MetaTileEntity_FusionComputer(int aID, String aName, String aNameRegional, int tier)
|
||||
{
|
||||
super(aID, aName, aNameRegional);
|
||||
}
|
||||
|
||||
public GT_MetaTileEntity_FusionComputer(String aName)
|
||||
{
|
||||
super(aName);
|
||||
}
|
||||
public abstract int tier();
|
||||
|
||||
public abstract long maxEUStore();
|
||||
|
||||
@Override
|
||||
public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
return new GT_Container_MultiMachine(aPlayerInventory, aBaseMetaTileEntity);
|
||||
}
|
||||
public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity_MultiBlockBase {
|
||||
|
||||
@Override
|
||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
return new GT_GUIContainer_FusionReactor(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "FusionComputer.png");
|
||||
}
|
||||
|
||||
public abstract MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity);
|
||||
|
||||
public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack)
|
||||
{
|
||||
return aSide != getBaseMetaTileEntity().getFrontFacing();
|
||||
}
|
||||
|
||||
public void saveNBTData(NBTTagCompound aNBT) {
|
||||
super.saveNBTData(aNBT);
|
||||
}
|
||||
|
||||
public void loadNBTData(NBTTagCompound aNBT) {
|
||||
super.loadNBTData(aNBT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity,ItemStack aStack) {
|
||||
int xCenter = getBaseMetaTileEntity().getXCoord() + ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing()).offsetX * 5;int yCenter = getBaseMetaTileEntity().getYCoord();int zCenter = getBaseMetaTileEntity().getZCoord() + ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing()).offsetZ * 5;
|
||||
if (((isAdvancedMachineCasing(xCenter + 5, yCenter, zCenter)) || (xCenter + 5 == getBaseMetaTileEntity().getXCoord())) &&
|
||||
((isAdvancedMachineCasing(xCenter - 5, yCenter, zCenter)) || (xCenter - 5 == getBaseMetaTileEntity().getXCoord())) &&
|
||||
((isAdvancedMachineCasing(xCenter, yCenter, zCenter + 5)) || (zCenter + 5 == getBaseMetaTileEntity().getZCoord())) &&
|
||||
((isAdvancedMachineCasing(xCenter, yCenter, zCenter - 5)) || (zCenter - 5 == getBaseMetaTileEntity().getZCoord())) &&
|
||||
(checkCoils(xCenter, yCenter, zCenter)) &&
|
||||
(checkHulls(xCenter, yCenter, zCenter)) &&
|
||||
(checkUpperOrLowerHulls(xCenter, yCenter + 1, zCenter)) &&
|
||||
(checkUpperOrLowerHulls(xCenter, yCenter - 1, zCenter)) &&
|
||||
(addIfEnergyInjector(xCenter + 4, yCenter, zCenter + 3,aBaseMetaTileEntity)) &&
|
||||
(addIfEnergyInjector(xCenter + 4, yCenter, zCenter - 3,aBaseMetaTileEntity)) &&
|
||||
(addIfEnergyInjector(xCenter + 4, yCenter, zCenter + 5,aBaseMetaTileEntity)) &&
|
||||
(addIfEnergyInjector(xCenter + 4, yCenter, zCenter - 5,aBaseMetaTileEntity)) &&
|
||||
(addIfEnergyInjector(xCenter - 4, yCenter, zCenter + 3,aBaseMetaTileEntity)) &&
|
||||
(addIfEnergyInjector(xCenter - 4, yCenter, zCenter - 3,aBaseMetaTileEntity)) &&
|
||||
(addIfEnergyInjector(xCenter - 4, yCenter, zCenter + 5,aBaseMetaTileEntity)) &&
|
||||
(addIfEnergyInjector(xCenter - 4, yCenter, zCenter - 5,aBaseMetaTileEntity)) &&
|
||||
(addIfEnergyInjector(xCenter + 3, yCenter, zCenter + 4,aBaseMetaTileEntity)) &&
|
||||
(addIfEnergyInjector(xCenter - 3, yCenter, zCenter + 4,aBaseMetaTileEntity)) &&
|
||||
(addIfEnergyInjector(xCenter + 5, yCenter, zCenter + 4,aBaseMetaTileEntity)) &&
|
||||
(addIfEnergyInjector(xCenter - 5, yCenter, zCenter + 4,aBaseMetaTileEntity)) &&
|
||||
(addIfEnergyInjector(xCenter + 3, yCenter, zCenter - 4,aBaseMetaTileEntity)) &&
|
||||
(addIfEnergyInjector(xCenter - 3, yCenter, zCenter - 4,aBaseMetaTileEntity)) &&
|
||||
(addIfEnergyInjector(xCenter + 5, yCenter, zCenter - 4,aBaseMetaTileEntity)) &&
|
||||
(addIfEnergyInjector(xCenter - 5, yCenter, zCenter - 4,aBaseMetaTileEntity)) &&
|
||||
(addIfExtractor(xCenter + 1, yCenter, zCenter - 5,aBaseMetaTileEntity)) &&
|
||||
(addIfExtractor(xCenter + 1, yCenter, zCenter + 5,aBaseMetaTileEntity)) &&
|
||||
(addIfExtractor(xCenter - 1, yCenter, zCenter - 5,aBaseMetaTileEntity)) &&
|
||||
(addIfExtractor(xCenter - 1, yCenter, zCenter + 5,aBaseMetaTileEntity)) &&
|
||||
(addIfExtractor(xCenter + 1, yCenter, zCenter - 7,aBaseMetaTileEntity)) &&
|
||||
(addIfExtractor(xCenter + 1, yCenter, zCenter + 7,aBaseMetaTileEntity)) &&
|
||||
(addIfExtractor(xCenter - 1, yCenter, zCenter - 7,aBaseMetaTileEntity)) &&
|
||||
(addIfExtractor(xCenter - 1, yCenter, zCenter + 7,aBaseMetaTileEntity)) &&
|
||||
(addIfExtractor(xCenter + 5, yCenter, zCenter - 1,aBaseMetaTileEntity)) &&
|
||||
(addIfExtractor(xCenter + 5, yCenter, zCenter + 1,aBaseMetaTileEntity)) &&
|
||||
(addIfExtractor(xCenter - 5, yCenter, zCenter - 1,aBaseMetaTileEntity)) &&
|
||||
(addIfExtractor(xCenter - 5, yCenter, zCenter + 1,aBaseMetaTileEntity)) &&
|
||||
(addIfExtractor(xCenter + 7, yCenter, zCenter - 1,aBaseMetaTileEntity)) &&
|
||||
(addIfExtractor(xCenter + 7, yCenter, zCenter + 1,aBaseMetaTileEntity)) &&
|
||||
(addIfExtractor(xCenter - 7, yCenter, zCenter - 1,aBaseMetaTileEntity)) &&
|
||||
(addIfExtractor(xCenter - 7, yCenter, zCenter + 1,aBaseMetaTileEntity)) &&
|
||||
(addIfInjector(xCenter + 1, yCenter + 1, zCenter - 6,aBaseMetaTileEntity)) &&
|
||||
(addIfInjector(xCenter + 1, yCenter + 1, zCenter + 6,aBaseMetaTileEntity)) &&
|
||||
(addIfInjector(xCenter - 1, yCenter + 1, zCenter - 6,aBaseMetaTileEntity)) &&
|
||||
(addIfInjector(xCenter - 1, yCenter + 1, zCenter + 6,aBaseMetaTileEntity)) &&
|
||||
(addIfInjector(xCenter - 6, yCenter + 1, zCenter + 1,aBaseMetaTileEntity)) &&
|
||||
(addIfInjector(xCenter + 6, yCenter + 1, zCenter + 1,aBaseMetaTileEntity)) &&
|
||||
(addIfInjector(xCenter - 6, yCenter + 1, zCenter - 1,aBaseMetaTileEntity)) &&
|
||||
(addIfInjector(xCenter + 6, yCenter + 1, zCenter - 1,aBaseMetaTileEntity)) &&
|
||||
(addIfInjector(xCenter + 1, yCenter - 1, zCenter - 6,aBaseMetaTileEntity)) &&
|
||||
(addIfInjector(xCenter + 1, yCenter - 1, zCenter + 6,aBaseMetaTileEntity)) &&
|
||||
(addIfInjector(xCenter - 1, yCenter - 1, zCenter - 6,aBaseMetaTileEntity)) &&
|
||||
(addIfInjector(xCenter - 1, yCenter - 1, zCenter + 6,aBaseMetaTileEntity)) &&
|
||||
(addIfInjector(xCenter - 6, yCenter - 1, zCenter + 1,aBaseMetaTileEntity)) &&
|
||||
(addIfInjector(xCenter + 6, yCenter - 1, zCenter + 1,aBaseMetaTileEntity)) &&
|
||||
(addIfInjector(xCenter - 6, yCenter - 1, zCenter - 1,aBaseMetaTileEntity)) &&
|
||||
(addIfInjector(xCenter + 6, yCenter - 1, zCenter - 1,aBaseMetaTileEntity)) &&
|
||||
(this.mEnergyHatches.size()>=1)&&
|
||||
(this.mOutputHatches.size()>=1)&&
|
||||
(this.mInputHatches.size()>=2)) {
|
||||
if(this.mEnergyHatches!=null){
|
||||
for(int i = 0;i < this.mEnergyHatches.size();i++){
|
||||
if(this.mEnergyHatches.get(i).mTier<tier())return false;}
|
||||
}if(this.mOutputHatches!=null){
|
||||
for(int i = 0;i < this.mOutputHatches.size();i++){
|
||||
if(this.mOutputHatches.get(i).mTier<tier())return false;}
|
||||
}if(this.mInputHatches!=null){
|
||||
for(int i = 0;i < this.mInputHatches.size();i++){
|
||||
if(this.mInputHatches.get(i).mTier<tier())return false;}
|
||||
public GT_Recipe mLastRecipe;
|
||||
public int mEUStore;
|
||||
|
||||
public GT_MetaTileEntity_FusionComputer(int aID, String aName, String aNameRegional, int tier) {
|
||||
super(aID, aName, aNameRegional);
|
||||
}
|
||||
mWrench = true;mScrewdriver = true; mSoftHammer = true; mHardHammer = true; mSolderingTool = true; mCrowbar = true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean checkTier(byte tier,ArrayList<GT_MetaTileEntity_Hatch> list){
|
||||
if(list!=null){
|
||||
for(int i = 0;i < list.size();i++){
|
||||
if(list.get(i).mTier<tier){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
public GT_MetaTileEntity_FusionComputer(String aName) {
|
||||
super(aName);
|
||||
}
|
||||
|
||||
public abstract int tier();
|
||||
|
||||
public abstract long maxEUStore();
|
||||
|
||||
@Override
|
||||
public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
return new GT_Container_MultiMachine(aPlayerInventory, aBaseMetaTileEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
return new GT_GUIContainer_FusionReactor(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "FusionComputer.png");
|
||||
}
|
||||
|
||||
public abstract MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity);
|
||||
|
||||
public boolean allowCoverOnSide(byte aSide, GT_ItemStack aStack) {
|
||||
|
||||
return aSide != getBaseMetaTileEntity().getFrontFacing();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveNBTData(NBTTagCompound aNBT) {
|
||||
super.saveNBTData(aNBT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadNBTData(NBTTagCompound aNBT) {
|
||||
super.loadNBTData(aNBT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
|
||||
int xCenter = getBaseMetaTileEntity().getXCoord() + ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing()).offsetX * 5;
|
||||
int yCenter = getBaseMetaTileEntity().getYCoord();
|
||||
int zCenter = getBaseMetaTileEntity().getZCoord() + ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing()).offsetZ * 5;
|
||||
if (((isAdvancedMachineCasing(xCenter + 5, yCenter, zCenter)) || (xCenter + 5 == getBaseMetaTileEntity().getXCoord()))
|
||||
&& ((isAdvancedMachineCasing(xCenter - 5, yCenter, zCenter)) || (xCenter - 5 == getBaseMetaTileEntity().getXCoord()))
|
||||
&& ((isAdvancedMachineCasing(xCenter, yCenter, zCenter + 5)) || (zCenter + 5 == getBaseMetaTileEntity().getZCoord()))
|
||||
&& ((isAdvancedMachineCasing(xCenter, yCenter, zCenter - 5)) || (zCenter - 5 == getBaseMetaTileEntity().getZCoord())) && (checkCoils(xCenter, yCenter, zCenter))
|
||||
&& (checkHulls(xCenter, yCenter, zCenter)) && (checkUpperOrLowerHulls(xCenter, yCenter + 1, zCenter)) && (checkUpperOrLowerHulls(xCenter, yCenter - 1, zCenter))
|
||||
&& (addIfEnergyInjector(xCenter + 4, yCenter, zCenter + 3, aBaseMetaTileEntity)) && (addIfEnergyInjector(xCenter + 4, yCenter, zCenter - 3, aBaseMetaTileEntity))
|
||||
&& (addIfEnergyInjector(xCenter + 4, yCenter, zCenter + 5, aBaseMetaTileEntity)) && (addIfEnergyInjector(xCenter + 4, yCenter, zCenter - 5, aBaseMetaTileEntity))
|
||||
&& (addIfEnergyInjector(xCenter - 4, yCenter, zCenter + 3, aBaseMetaTileEntity)) && (addIfEnergyInjector(xCenter - 4, yCenter, zCenter - 3, aBaseMetaTileEntity))
|
||||
&& (addIfEnergyInjector(xCenter - 4, yCenter, zCenter + 5, aBaseMetaTileEntity)) && (addIfEnergyInjector(xCenter - 4, yCenter, zCenter - 5, aBaseMetaTileEntity))
|
||||
&& (addIfEnergyInjector(xCenter + 3, yCenter, zCenter + 4, aBaseMetaTileEntity)) && (addIfEnergyInjector(xCenter - 3, yCenter, zCenter + 4, aBaseMetaTileEntity))
|
||||
&& (addIfEnergyInjector(xCenter + 5, yCenter, zCenter + 4, aBaseMetaTileEntity)) && (addIfEnergyInjector(xCenter - 5, yCenter, zCenter + 4, aBaseMetaTileEntity))
|
||||
&& (addIfEnergyInjector(xCenter + 3, yCenter, zCenter - 4, aBaseMetaTileEntity)) && (addIfEnergyInjector(xCenter - 3, yCenter, zCenter - 4, aBaseMetaTileEntity))
|
||||
&& (addIfEnergyInjector(xCenter + 5, yCenter, zCenter - 4, aBaseMetaTileEntity)) && (addIfEnergyInjector(xCenter - 5, yCenter, zCenter - 4, aBaseMetaTileEntity))
|
||||
&& (addIfExtractor(xCenter + 1, yCenter, zCenter - 5, aBaseMetaTileEntity)) && (addIfExtractor(xCenter + 1, yCenter, zCenter + 5, aBaseMetaTileEntity))
|
||||
&& (addIfExtractor(xCenter - 1, yCenter, zCenter - 5, aBaseMetaTileEntity)) && (addIfExtractor(xCenter - 1, yCenter, zCenter + 5, aBaseMetaTileEntity))
|
||||
&& (addIfExtractor(xCenter + 1, yCenter, zCenter - 7, aBaseMetaTileEntity)) && (addIfExtractor(xCenter + 1, yCenter, zCenter + 7, aBaseMetaTileEntity))
|
||||
&& (addIfExtractor(xCenter - 1, yCenter, zCenter - 7, aBaseMetaTileEntity)) && (addIfExtractor(xCenter - 1, yCenter, zCenter + 7, aBaseMetaTileEntity))
|
||||
&& (addIfExtractor(xCenter + 5, yCenter, zCenter - 1, aBaseMetaTileEntity)) && (addIfExtractor(xCenter + 5, yCenter, zCenter + 1, aBaseMetaTileEntity))
|
||||
&& (addIfExtractor(xCenter - 5, yCenter, zCenter - 1, aBaseMetaTileEntity)) && (addIfExtractor(xCenter - 5, yCenter, zCenter + 1, aBaseMetaTileEntity))
|
||||
&& (addIfExtractor(xCenter + 7, yCenter, zCenter - 1, aBaseMetaTileEntity)) && (addIfExtractor(xCenter + 7, yCenter, zCenter + 1, aBaseMetaTileEntity))
|
||||
&& (addIfExtractor(xCenter - 7, yCenter, zCenter - 1, aBaseMetaTileEntity)) && (addIfExtractor(xCenter - 7, yCenter, zCenter + 1, aBaseMetaTileEntity))
|
||||
&& (addIfInjector(xCenter + 1, yCenter + 1, zCenter - 6, aBaseMetaTileEntity)) && (addIfInjector(xCenter + 1, yCenter + 1, zCenter + 6, aBaseMetaTileEntity))
|
||||
&& (addIfInjector(xCenter - 1, yCenter + 1, zCenter - 6, aBaseMetaTileEntity)) && (addIfInjector(xCenter - 1, yCenter + 1, zCenter + 6, aBaseMetaTileEntity))
|
||||
&& (addIfInjector(xCenter - 6, yCenter + 1, zCenter + 1, aBaseMetaTileEntity)) && (addIfInjector(xCenter + 6, yCenter + 1, zCenter + 1, aBaseMetaTileEntity))
|
||||
&& (addIfInjector(xCenter - 6, yCenter + 1, zCenter - 1, aBaseMetaTileEntity)) && (addIfInjector(xCenter + 6, yCenter + 1, zCenter - 1, aBaseMetaTileEntity))
|
||||
&& (addIfInjector(xCenter + 1, yCenter - 1, zCenter - 6, aBaseMetaTileEntity)) && (addIfInjector(xCenter + 1, yCenter - 1, zCenter + 6, aBaseMetaTileEntity))
|
||||
&& (addIfInjector(xCenter - 1, yCenter - 1, zCenter - 6, aBaseMetaTileEntity)) && (addIfInjector(xCenter - 1, yCenter - 1, zCenter + 6, aBaseMetaTileEntity))
|
||||
&& (addIfInjector(xCenter - 6, yCenter - 1, zCenter + 1, aBaseMetaTileEntity)) && (addIfInjector(xCenter + 6, yCenter - 1, zCenter + 1, aBaseMetaTileEntity))
|
||||
&& (addIfInjector(xCenter - 6, yCenter - 1, zCenter - 1, aBaseMetaTileEntity)) && (addIfInjector(xCenter + 6, yCenter - 1, zCenter - 1, aBaseMetaTileEntity))
|
||||
&& (this.mEnergyHatches.size() >= 1) && (this.mOutputHatches.size() >= 1) && (this.mInputHatches.size() >= 2)) {
|
||||
if (this.mEnergyHatches != null) {
|
||||
for (int i = 0; i < this.mEnergyHatches.size(); i++) {
|
||||
if (this.mEnergyHatches.get(i).mTier < tier())
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean checkCoils(int aX, int aY, int aZ)
|
||||
{
|
||||
return (isFusionCoil(aX + 6, aY, aZ - 1)) && (isFusionCoil(aX + 6, aY, aZ)) && (isFusionCoil(aX + 6, aY, aZ + 1)) && (isFusionCoil(aX + 5, aY, aZ - 3)) && (isFusionCoil(aX + 5, aY, aZ - 2)) && (isFusionCoil(aX + 5, aY, aZ + 2)) && (isFusionCoil(aX + 5, aY, aZ + 3)) && (isFusionCoil(aX + 4, aY, aZ - 4)) && (isFusionCoil(aX + 4, aY, aZ + 4)) && (isFusionCoil(aX + 3, aY, aZ - 5)) && (isFusionCoil(aX + 3, aY, aZ + 5)) && (isFusionCoil(aX + 2, aY, aZ - 5)) && (isFusionCoil(aX + 2, aY, aZ + 5)) && (isFusionCoil(aX + 1, aY, aZ - 6)) && (isFusionCoil(aX + 1, aY, aZ + 6)) && (isFusionCoil(aX, aY, aZ - 6)) && (isFusionCoil(aX, aY, aZ + 6)) && (isFusionCoil(aX - 1, aY, aZ - 6)) && (isFusionCoil(aX - 1, aY, aZ + 6)) && (isFusionCoil(aX - 2, aY, aZ - 5)) && (isFusionCoil(aX - 2, aY, aZ + 5)) && (isFusionCoil(aX - 3, aY, aZ - 5)) && (isFusionCoil(aX - 3, aY, aZ + 5)) && (isFusionCoil(aX - 4, aY, aZ - 4)) && (isFusionCoil(aX - 4, aY, aZ + 4)) && (isFusionCoil(aX - 5, aY, aZ - 3)) && (isFusionCoil(aX - 5, aY, aZ - 2)) && (isFusionCoil(aX - 5, aY, aZ + 2)) && (isFusionCoil(aX - 5, aY, aZ + 3)) && (isFusionCoil(aX - 6, aY, aZ - 1)) && (isFusionCoil(aX - 6, aY, aZ)) && (isFusionCoil(aX - 6, aY, aZ + 1));
|
||||
}
|
||||
|
||||
private boolean checkUpperOrLowerHulls(int aX, int aY, int aZ)
|
||||
{
|
||||
return (isAdvancedMachineCasing(aX + 6, aY, aZ)) && (isAdvancedMachineCasing(aX + 5, aY, aZ - 3)) && (isAdvancedMachineCasing(aX + 5, aY, aZ - 2)) && (isAdvancedMachineCasing(aX + 5, aY, aZ + 2)) && (isAdvancedMachineCasing(aX + 5, aY, aZ + 3)) && (isAdvancedMachineCasing(aX + 4, aY, aZ - 4)) && (isAdvancedMachineCasing(aX + 4, aY, aZ + 4)) && (isAdvancedMachineCasing(aX + 3, aY, aZ - 5)) && (isAdvancedMachineCasing(aX + 3, aY, aZ + 5)) && (isAdvancedMachineCasing(aX + 2, aY, aZ - 5)) && (isAdvancedMachineCasing(aX + 2, aY, aZ + 5)) && (isAdvancedMachineCasing(aX, aY, aZ - 6)) && (isAdvancedMachineCasing(aX, aY, aZ + 6)) && (isAdvancedMachineCasing(aX - 2, aY, aZ - 5)) && (isAdvancedMachineCasing(aX - 2, aY, aZ + 5)) && (isAdvancedMachineCasing(aX - 3, aY, aZ - 5)) && (isAdvancedMachineCasing(aX - 3, aY, aZ + 5)) && (isAdvancedMachineCasing(aX - 4, aY, aZ - 4)) && (isAdvancedMachineCasing(aX - 4, aY, aZ + 4)) && (isAdvancedMachineCasing(aX - 5, aY, aZ - 3)) && (isAdvancedMachineCasing(aX - 5, aY, aZ - 2)) && (isAdvancedMachineCasing(aX - 5, aY, aZ + 2)) && (isAdvancedMachineCasing(aX - 5, aY, aZ + 3)) && (isAdvancedMachineCasing(aX - 6, aY, aZ));
|
||||
}
|
||||
|
||||
private boolean checkHulls(int aX, int aY, int aZ)
|
||||
{
|
||||
return (isAdvancedMachineCasing(aX + 6, aY, aZ - 3)) && (isAdvancedMachineCasing(aX + 6, aY, aZ - 2)) && (isAdvancedMachineCasing(aX + 6, aY, aZ + 2)) && (isAdvancedMachineCasing(aX + 6, aY, aZ + 3)) && (isAdvancedMachineCasing(aX + 3, aY, aZ - 6)) && (isAdvancedMachineCasing(aX + 3, aY, aZ + 6)) && (isAdvancedMachineCasing(aX + 2, aY, aZ - 6)) && (isAdvancedMachineCasing(aX + 2, aY, aZ + 6)) && (isAdvancedMachineCasing(aX - 2, aY, aZ - 6)) && (isAdvancedMachineCasing(aX - 2, aY, aZ + 6)) && (isAdvancedMachineCasing(aX - 3, aY, aZ - 6)) && (isAdvancedMachineCasing(aX - 3, aY, aZ + 6)) && (isAdvancedMachineCasing(aX - 7, aY, aZ)) && (isAdvancedMachineCasing(aX + 7, aY, aZ)) && (isAdvancedMachineCasing(aX, aY, aZ - 7)) && (isAdvancedMachineCasing(aX, aY, aZ + 7)) && (isAdvancedMachineCasing(aX - 6, aY, aZ - 3)) && (isAdvancedMachineCasing(aX - 6, aY, aZ - 2)) && (isAdvancedMachineCasing(aX - 6, aY, aZ + 2)) && (isAdvancedMachineCasing(aX - 6, aY, aZ + 3)) && (isAdvancedMachineCasing(aX - 4, aY, aZ - 2)) && (isAdvancedMachineCasing(aX - 4, aY, aZ + 2)) && (isAdvancedMachineCasing(aX + 4, aY, aZ - 2)) && (isAdvancedMachineCasing(aX + 4, aY, aZ + 2)) && (isAdvancedMachineCasing(aX - 2, aY, aZ - 4)) && (isAdvancedMachineCasing(aX - 2, aY, aZ + 4)) && (isAdvancedMachineCasing(aX + 2, aY, aZ - 4)) && (isAdvancedMachineCasing(aX + 2, aY, aZ + 4));
|
||||
}
|
||||
|
||||
private boolean addIfEnergyInjector(int aX, int aY, int aZ,IGregTechTileEntity aBaseMetaTileEntity)
|
||||
{
|
||||
if(addEnergyInputToMachineList(aBaseMetaTileEntity.getIGregTechTileEntity(aX,aY,aZ), 53)){
|
||||
return true;
|
||||
}
|
||||
return isAdvancedMachineCasing(aX, aY, aZ);
|
||||
}
|
||||
|
||||
private boolean addIfInjector(int aX, int aY, int aZ,IGregTechTileEntity aTileEntity)
|
||||
{
|
||||
if(addInputToMachineList(aTileEntity.getIGregTechTileEntity(aX,aY,aZ), 53)){
|
||||
return true;
|
||||
}
|
||||
return isAdvancedMachineCasing(aX, aY, aZ);
|
||||
}
|
||||
|
||||
private boolean addIfExtractor(int aX, int aY, int aZ,IGregTechTileEntity aTileEntity)
|
||||
{
|
||||
if(addOutputToMachineList(aTileEntity.getIGregTechTileEntity(aX,aY,aZ), 53)){
|
||||
return true;
|
||||
}
|
||||
return isAdvancedMachineCasing(aX, aY, aZ);
|
||||
}
|
||||
|
||||
private boolean isAdvancedMachineCasing(int aX, int aY, int aZ)
|
||||
{
|
||||
return (getBaseMetaTileEntity().getBlock(aX, aY, aZ) == getCasing()) && (getBaseMetaTileEntity().getMetaID(aX, aY, aZ) == getCasingMeta());
|
||||
}
|
||||
public abstract Block getCasing();
|
||||
public abstract int getCasingMeta();
|
||||
|
||||
private boolean isFusionCoil(int aX, int aY, int aZ)
|
||||
{
|
||||
return (getBaseMetaTileEntity().getBlock(aX, aY, aZ) == getFusionCoil() && (getBaseMetaTileEntity().getMetaID(aX, aY, aZ) == getFusionCoilMeta()));
|
||||
}
|
||||
public abstract Block getFusionCoil();
|
||||
public abstract int getFusionCoilMeta();
|
||||
}
|
||||
if (this.mOutputHatches != null) {
|
||||
for (int i = 0; i < this.mOutputHatches.size(); i++) {
|
||||
if (this.mOutputHatches.get(i).mTier < tier())
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (this.mInputHatches != null) {
|
||||
for (int i = 0; i < this.mInputHatches.size(); i++) {
|
||||
if (this.mInputHatches.get(i).mTier < tier())
|
||||
return false;
|
||||
}
|
||||
}
|
||||
mWrench = true;
|
||||
mScrewdriver = true;
|
||||
mSoftHammer = true;
|
||||
mHardHammer = true;
|
||||
mSolderingTool = true;
|
||||
mCrowbar = true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public abstract String[] getDescription();
|
||||
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone)
|
||||
{
|
||||
ITexture[] sTexture;
|
||||
if(aSide==aFacing){
|
||||
sTexture = new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, Dyes.getModulation(-1, Dyes._NULL.mRGBa)),new GT_RenderedTexture(getIconOverlay()) };
|
||||
}else{
|
||||
if(!aActive){
|
||||
sTexture = new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, Dyes.getModulation(-1, Dyes._NULL.mRGBa))};}else{
|
||||
sTexture = new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW, Dyes.getModulation(-1, Dyes._NULL.mRGBa))};
|
||||
}
|
||||
}
|
||||
return sTexture;
|
||||
}
|
||||
|
||||
public abstract IIconContainer getIconOverlay();
|
||||
|
||||
@Override
|
||||
public boolean isCorrectMachinePart(ItemStack aStack) {return true;}
|
||||
|
||||
public int overclock(int mEUt){
|
||||
if(tierOverclock()==1){return 1;}
|
||||
if(tierOverclock()==2){return mEUt<32768? 2 : 1;}
|
||||
return mEUt<32768?4:mEUt<65536?2:1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkRecipe(ItemStack aStack) {
|
||||
if(this.mLastRecipe!=null){;
|
||||
for(GT_MetaTileEntity_Hatch_Input tInput : this.mInputHatches){
|
||||
if(tInput.mFluid!=null&& tInput.mFluid!=null&&tInput.mFluid.getFluid().getID()==this.mLastRecipe.mFluidInputs[0].getFluid().getID()&&tInput.mFluid.amount>=this.mLastRecipe.mFluidInputs[0].amount){
|
||||
for(GT_MetaTileEntity_Hatch_Input tInput2 : this.mInputHatches){
|
||||
if(tInput2.mFluid!=null&& tInput2.mFluid!=null&&tInput2.mFluid.getFluid().getID()==this.mLastRecipe.mFluidInputs[1].getFluid().getID()&&tInput2.mFluid.amount>=this.mLastRecipe.mFluidInputs[1].amount&&getMaxInputVoltage()>=this.mLastRecipe.mEUt){
|
||||
tInput.drain(this.mLastRecipe.mFluidInputs[0].amount, true);
|
||||
tInput2.drain(this.mLastRecipe.mFluidInputs[1].amount, true);
|
||||
this.mEUt = (this.mLastRecipe.mEUt*overclock(this.mLastRecipe.mEUt));
|
||||
this.mMaxProgresstime = this.mLastRecipe.mDuration/overclock(this.mLastRecipe.mEUt);
|
||||
this.mEfficiencyIncrease = 10000;
|
||||
this.mOutputFluids = this.mLastRecipe.mFluidOutputs;
|
||||
turnCasingActive(true);
|
||||
return true;
|
||||
}
|
||||
private boolean checkTier(byte tier, ArrayList<GT_MetaTileEntity_Hatch> list) {
|
||||
if (list != null) {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
if (list.get(i).mTier < tier) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
this.mLastRecipe=null;
|
||||
turnCasingActive(false);
|
||||
for (GT_Recipe tRecipe : GT_Recipe.GT_Recipe_Map.sFusionRecipes.mRecipeList){
|
||||
FluidStack tFluid = tRecipe.mFluidInputs[0];
|
||||
if(tFluid!=null){
|
||||
for(GT_MetaTileEntity_Hatch_Input tInput : this.mInputHatches){
|
||||
if(tFluid.getFluid() !=null&& tInput.getFluid()!=null && tFluid.getFluid().getID()==tInput.getFluid().getFluid().getID()&&tFluid.amount<=tInput.getFluid().amount){
|
||||
FluidStack tFluid2 = tRecipe.mFluidInputs[1];
|
||||
if(tFluid2!=null){
|
||||
for(GT_MetaTileEntity_Hatch_Input tInput2 : this.mInputHatches){
|
||||
if(tFluid2.getFluid() !=null&& tInput2.getFluid()!=null&&tFluid2.getFluid().getID()==tInput2.getFluid().getFluid().getID()&&tFluid2.amount<=tInput2.getFluid().amount&&getMaxInputVoltage()>=tRecipe.mEUt&&this.mEUStore>=tRecipe.mSpecialValue){
|
||||
tInput.drain(tFluid.amount, true);
|
||||
tInput2.drain(tFluid2.amount, true);
|
||||
this.mLastRecipe=tRecipe;
|
||||
|
||||
this.mEUt = (tRecipe.mEUt*overclock(this.mLastRecipe.mEUt));
|
||||
this.mMaxProgresstime = tRecipe.mDuration/overclock(this.mLastRecipe.mEUt);
|
||||
|
||||
this.mEfficiencyIncrease = 10000;
|
||||
this.mOutputFluids = tRecipe.mFluidOutputs;
|
||||
turnCasingActive(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public abstract int tierOverclock();
|
||||
|
||||
public boolean turnCasingActive(boolean status){
|
||||
if(this.mEnergyHatches!=null){
|
||||
for(GT_MetaTileEntity_Hatch_Energy hatch: this.mEnergyHatches){
|
||||
hatch.mMachineBlock = status?(byte) 52:(byte) 53;
|
||||
}
|
||||
}if(this.mOutputHatches!=null){
|
||||
for(GT_MetaTileEntity_Hatch_Output hatch: this.mOutputHatches){
|
||||
hatch.mMachineBlock = status?(byte) 52:(byte) 53;
|
||||
}
|
||||
}if(this.mInputHatches!=null){
|
||||
for(GT_MetaTileEntity_Hatch_Input hatch: this.mInputHatches){
|
||||
hatch.mMachineBlock = status?(byte) 52:(byte) 53;
|
||||
}
|
||||
private boolean checkCoils(int aX, int aY, int aZ) {
|
||||
return (isFusionCoil(aX + 6, aY, aZ - 1)) && (isFusionCoil(aX + 6, aY, aZ)) && (isFusionCoil(aX + 6, aY, aZ + 1)) && (isFusionCoil(aX + 5, aY, aZ - 3)) && (isFusionCoil(aX + 5, aY, aZ - 2))
|
||||
&& (isFusionCoil(aX + 5, aY, aZ + 2)) && (isFusionCoil(aX + 5, aY, aZ + 3)) && (isFusionCoil(aX + 4, aY, aZ - 4)) && (isFusionCoil(aX + 4, aY, aZ + 4))
|
||||
&& (isFusionCoil(aX + 3, aY, aZ - 5)) && (isFusionCoil(aX + 3, aY, aZ + 5)) && (isFusionCoil(aX + 2, aY, aZ - 5)) && (isFusionCoil(aX + 2, aY, aZ + 5))
|
||||
&& (isFusionCoil(aX + 1, aY, aZ - 6)) && (isFusionCoil(aX + 1, aY, aZ + 6)) && (isFusionCoil(aX, aY, aZ - 6)) && (isFusionCoil(aX, aY, aZ + 6)) && (isFusionCoil(aX - 1, aY, aZ - 6))
|
||||
&& (isFusionCoil(aX - 1, aY, aZ + 6)) && (isFusionCoil(aX - 2, aY, aZ - 5)) && (isFusionCoil(aX - 2, aY, aZ + 5)) && (isFusionCoil(aX - 3, aY, aZ - 5))
|
||||
&& (isFusionCoil(aX - 3, aY, aZ + 5)) && (isFusionCoil(aX - 4, aY, aZ - 4)) && (isFusionCoil(aX - 4, aY, aZ + 4)) && (isFusionCoil(aX - 5, aY, aZ - 3))
|
||||
&& (isFusionCoil(aX - 5, aY, aZ - 2)) && (isFusionCoil(aX - 5, aY, aZ + 2)) && (isFusionCoil(aX - 5, aY, aZ + 3)) && (isFusionCoil(aX - 6, aY, aZ - 1))
|
||||
&& (isFusionCoil(aX - 6, aY, aZ)) && (isFusionCoil(aX - 6, aY, aZ + 1));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
||||
if (aBaseMetaTileEntity.isServerSide()) {
|
||||
if (mEfficiency < 0) mEfficiency = 0;
|
||||
if (--mUpdate==0 || --mStartUpCheck==0) {
|
||||
mInputHatches.clear();
|
||||
mInputBusses.clear();
|
||||
mOutputHatches.clear();
|
||||
mOutputBusses.clear();
|
||||
mDynamoHatches.clear();
|
||||
mEnergyHatches.clear();
|
||||
mMufflerHatches.clear();
|
||||
mMaintenanceHatches.clear();
|
||||
mMachine = checkMachine(aBaseMetaTileEntity, mInventory[1]);
|
||||
|
||||
private boolean checkUpperOrLowerHulls(int aX, int aY, int aZ) {
|
||||
return (isAdvancedMachineCasing(aX + 6, aY, aZ)) && (isAdvancedMachineCasing(aX + 5, aY, aZ - 3)) && (isAdvancedMachineCasing(aX + 5, aY, aZ - 2))
|
||||
&& (isAdvancedMachineCasing(aX + 5, aY, aZ + 2)) && (isAdvancedMachineCasing(aX + 5, aY, aZ + 3)) && (isAdvancedMachineCasing(aX + 4, aY, aZ - 4))
|
||||
&& (isAdvancedMachineCasing(aX + 4, aY, aZ + 4)) && (isAdvancedMachineCasing(aX + 3, aY, aZ - 5)) && (isAdvancedMachineCasing(aX + 3, aY, aZ + 5))
|
||||
&& (isAdvancedMachineCasing(aX + 2, aY, aZ - 5)) && (isAdvancedMachineCasing(aX + 2, aY, aZ + 5)) && (isAdvancedMachineCasing(aX, aY, aZ - 6))
|
||||
&& (isAdvancedMachineCasing(aX, aY, aZ + 6)) && (isAdvancedMachineCasing(aX - 2, aY, aZ - 5)) && (isAdvancedMachineCasing(aX - 2, aY, aZ + 5))
|
||||
&& (isAdvancedMachineCasing(aX - 3, aY, aZ - 5)) && (isAdvancedMachineCasing(aX - 3, aY, aZ + 5)) && (isAdvancedMachineCasing(aX - 4, aY, aZ - 4))
|
||||
&& (isAdvancedMachineCasing(aX - 4, aY, aZ + 4)) && (isAdvancedMachineCasing(aX - 5, aY, aZ - 3)) && (isAdvancedMachineCasing(aX - 5, aY, aZ - 2))
|
||||
&& (isAdvancedMachineCasing(aX - 5, aY, aZ + 2)) && (isAdvancedMachineCasing(aX - 5, aY, aZ + 3)) && (isAdvancedMachineCasing(aX - 6, aY, aZ));
|
||||
}
|
||||
|
||||
private boolean checkHulls(int aX, int aY, int aZ) {
|
||||
return (isAdvancedMachineCasing(aX + 6, aY, aZ - 3)) && (isAdvancedMachineCasing(aX + 6, aY, aZ - 2)) && (isAdvancedMachineCasing(aX + 6, aY, aZ + 2))
|
||||
&& (isAdvancedMachineCasing(aX + 6, aY, aZ + 3)) && (isAdvancedMachineCasing(aX + 3, aY, aZ - 6)) && (isAdvancedMachineCasing(aX + 3, aY, aZ + 6))
|
||||
&& (isAdvancedMachineCasing(aX + 2, aY, aZ - 6)) && (isAdvancedMachineCasing(aX + 2, aY, aZ + 6)) && (isAdvancedMachineCasing(aX - 2, aY, aZ - 6))
|
||||
&& (isAdvancedMachineCasing(aX - 2, aY, aZ + 6)) && (isAdvancedMachineCasing(aX - 3, aY, aZ - 6)) && (isAdvancedMachineCasing(aX - 3, aY, aZ + 6))
|
||||
&& (isAdvancedMachineCasing(aX - 7, aY, aZ)) && (isAdvancedMachineCasing(aX + 7, aY, aZ)) && (isAdvancedMachineCasing(aX, aY, aZ - 7)) && (isAdvancedMachineCasing(aX, aY, aZ + 7))
|
||||
&& (isAdvancedMachineCasing(aX - 6, aY, aZ - 3)) && (isAdvancedMachineCasing(aX - 6, aY, aZ - 2)) && (isAdvancedMachineCasing(aX - 6, aY, aZ + 2))
|
||||
&& (isAdvancedMachineCasing(aX - 6, aY, aZ + 3)) && (isAdvancedMachineCasing(aX - 4, aY, aZ - 2)) && (isAdvancedMachineCasing(aX - 4, aY, aZ + 2))
|
||||
&& (isAdvancedMachineCasing(aX + 4, aY, aZ - 2)) && (isAdvancedMachineCasing(aX + 4, aY, aZ + 2)) && (isAdvancedMachineCasing(aX - 2, aY, aZ - 4))
|
||||
&& (isAdvancedMachineCasing(aX - 2, aY, aZ + 4)) && (isAdvancedMachineCasing(aX + 2, aY, aZ - 4)) && (isAdvancedMachineCasing(aX + 2, aY, aZ + 4));
|
||||
}
|
||||
|
||||
private boolean addIfEnergyInjector(int aX, int aY, int aZ, IGregTechTileEntity aBaseMetaTileEntity) {
|
||||
if (addEnergyInputToMachineList(aBaseMetaTileEntity.getIGregTechTileEntity(aX, aY, aZ), 53)) {
|
||||
return true;
|
||||
}
|
||||
if (mStartUpCheck < 0) {
|
||||
if (mMachine) {
|
||||
for (GT_MetaTileEntity_Hatch_Maintenance tHatch : mMaintenanceHatches) {
|
||||
if (isValidMetaTileEntity(tHatch)) {
|
||||
if (tHatch.mWrench) mWrench = true;
|
||||
if (tHatch.mScrewdriver) mScrewdriver = true;
|
||||
if (tHatch.mSoftHammer) mSoftHammer = true;
|
||||
if (tHatch.mHardHammer) mHardHammer = true;
|
||||
if (tHatch.mSolderingTool) mSolderingTool = true;
|
||||
if (tHatch.mCrowbar) mCrowbar = true;
|
||||
|
||||
tHatch.mWrench = false;
|
||||
tHatch.mScrewdriver = false;
|
||||
tHatch.mSoftHammer = false;
|
||||
tHatch.mHardHammer = false;
|
||||
tHatch.mSolderingTool = false;
|
||||
tHatch.mCrowbar = false;
|
||||
}
|
||||
}
|
||||
if(this.mEnergyHatches!=null){
|
||||
for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) if (isValidMetaTileEntity(tHatch)) {
|
||||
if (aBaseMetaTileEntity.getStoredEU()+(2048*tierOverclock())<maxEUStore()&&tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(2048*tierOverclock(), false)){
|
||||
aBaseMetaTileEntity.increaseStoredEnergyUnits(2048*tierOverclock(),true);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(this.mEUStore<=0&&mMaxProgresstime>0){
|
||||
stopMachine();
|
||||
}
|
||||
if (getRepairStatus() > 0) {
|
||||
if (mMaxProgresstime > 0 && doRandomMaintenanceDamage()) {
|
||||
this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(mEUt, true);
|
||||
if (mMaxProgresstime > 0 && ++mProgresstime>=mMaxProgresstime) {
|
||||
if (mOutputItems != null) for (ItemStack tStack : mOutputItems) if (tStack != null) addOutput(tStack);
|
||||
if (mOutputFluids != null) for (FluidStack tStack : mOutputFluids) if (tStack != null) addOutput(tStack);
|
||||
mEfficiency = Math.max(0, Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]) - ((getIdealStatus() - getRepairStatus()) * 1000)));
|
||||
mOutputItems = null;
|
||||
mProgresstime = 0;
|
||||
mMaxProgresstime = 0;
|
||||
mEfficiencyIncrease = 0;
|
||||
if(mOutputFluids!=null&&mOutputFluids.length>0){
|
||||
GT_Mod.instance.achievements.issueAchivementHatchFluid(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), mOutputFluids[0]);}
|
||||
this.mEUStore=(int) aBaseMetaTileEntity.getStoredEU();
|
||||
if (aBaseMetaTileEntity.isAllowedToWork()) checkRecipe(mInventory[1]);
|
||||
}
|
||||
} else {
|
||||
if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity.hasInventoryBeenModified()) {
|
||||
turnCasingActive(mMaxProgresstime>0);
|
||||
if (aBaseMetaTileEntity.isAllowedToWork()) {
|
||||
this.mEUStore=(int) aBaseMetaTileEntity.getStoredEU();
|
||||
if(checkRecipe(mInventory[1])&&aBaseMetaTileEntity.getStoredEU()>=this.mLastRecipe.mSpecialValue){
|
||||
aBaseMetaTileEntity.decreaseStoredEnergyUnits(this.mLastRecipe.mSpecialValue, true);
|
||||
}
|
||||
}
|
||||
if (mMaxProgresstime <= 0) mEfficiency = Math.max(0, mEfficiency - 1000);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.mLastRecipe=null;
|
||||
stopMachine();
|
||||
}
|
||||
return isAdvancedMachineCasing(aX, aY, aZ);
|
||||
}
|
||||
|
||||
private boolean addIfInjector(int aX, int aY, int aZ, IGregTechTileEntity aTileEntity) {
|
||||
if (addInputToMachineList(aTileEntity.getIGregTechTileEntity(aX, aY, aZ), 53)) {
|
||||
return true;
|
||||
}
|
||||
return isAdvancedMachineCasing(aX, aY, aZ);
|
||||
}
|
||||
|
||||
private boolean addIfExtractor(int aX, int aY, int aZ, IGregTechTileEntity aTileEntity) {
|
||||
if (addOutputToMachineList(aTileEntity.getIGregTechTileEntity(aX, aY, aZ), 53)) {
|
||||
return true;
|
||||
}
|
||||
return isAdvancedMachineCasing(aX, aY, aZ);
|
||||
}
|
||||
|
||||
private boolean isAdvancedMachineCasing(int aX, int aY, int aZ) {
|
||||
return (getBaseMetaTileEntity().getBlock(aX, aY, aZ) == getCasing()) && (getBaseMetaTileEntity().getMetaID(aX, aY, aZ) == getCasingMeta());
|
||||
}
|
||||
|
||||
public abstract Block getCasing();
|
||||
|
||||
public abstract int getCasingMeta();
|
||||
|
||||
private boolean isFusionCoil(int aX, int aY, int aZ) {
|
||||
return (getBaseMetaTileEntity().getBlock(aX, aY, aZ) == getFusionCoil() && (getBaseMetaTileEntity().getMetaID(aX, aY, aZ) == getFusionCoilMeta()));
|
||||
}
|
||||
|
||||
public abstract Block getFusionCoil();
|
||||
|
||||
public abstract int getFusionCoilMeta();
|
||||
|
||||
public abstract String[] getDescription();
|
||||
|
||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
|
||||
ITexture[] sTexture;
|
||||
if (aSide == aFacing) {
|
||||
sTexture = new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, Dyes.getModulation(-1, Dyes._NULL.mRGBa)), new GT_RenderedTexture(getIconOverlay()) };
|
||||
} else {
|
||||
if (!aActive) {
|
||||
sTexture = new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS, Dyes.getModulation(-1, Dyes._NULL.mRGBa)) };
|
||||
} else {
|
||||
turnCasingActive(false);
|
||||
this.mLastRecipe=null;
|
||||
stopMachine();
|
||||
sTexture = new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_FUSION_GLASS_YELLOW, Dyes.getModulation(-1, Dyes._NULL.mRGBa)) };
|
||||
}
|
||||
}
|
||||
aBaseMetaTileEntity.setErrorDisplayID((aBaseMetaTileEntity.getErrorDisplayID()&~127)|(mWrench?0:1)|(mScrewdriver?0:2)|(mSoftHammer?0:4)|(mHardHammer?0:8)|(mSolderingTool?0:16)|(mCrowbar?0:32)|(mMachine?0:64));
|
||||
aBaseMetaTileEntity.setActive(mMaxProgresstime>0);
|
||||
return sTexture;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onRunningTick(ItemStack aStack) {
|
||||
if (mEUt < 0) {
|
||||
if (!drainEnergyInput(((long)-mEUt * 10000) / Math.max(1000, mEfficiency))) {
|
||||
this.mLastRecipe=null;
|
||||
public abstract IIconContainer getIconOverlay();
|
||||
|
||||
@Override
|
||||
public boolean isCorrectMachinePart(ItemStack aStack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int overclock(int mStartEnergy) {
|
||||
if (tierOverclock() == 1) {
|
||||
return 1;
|
||||
}
|
||||
if (tierOverclock() == 2) {
|
||||
return mStartEnergy < 160000000 ? 2 : 1;
|
||||
}
|
||||
return mStartEnergy < 160000000 ? 4 : mStartEnergy > 320000000 ? 2 : 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkRecipe(ItemStack aStack) {
|
||||
ArrayList<FluidStack> tFluidList = getStoredFluids();
|
||||
for (int i = 0; i < tFluidList.size() - 1; i++) {
|
||||
for (int j = i + 1; j < tFluidList.size(); j++) {
|
||||
if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i), (FluidStack) tFluidList.get(j))) {
|
||||
if (((FluidStack) tFluidList.get(i)).amount >= ((FluidStack) tFluidList.get(j)).amount) {
|
||||
tFluidList.remove(j--);
|
||||
} else {
|
||||
tFluidList.remove(i--);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (tFluidList.size() > 1) {
|
||||
FluidStack[] tFluids = tFluidList.toArray(new FluidStack[tFluidList.size()]);
|
||||
GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sFusionRecipes.findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, false, GT_Values.V[8], tFluids, new ItemStack[] {});
|
||||
if (tRecipe == null&&!mRunningOnLoad) {
|
||||
turnCasingActive(false);
|
||||
this.mLastRecipe = null;
|
||||
return false;
|
||||
}
|
||||
if (mRunningOnLoad||tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[] {})) {
|
||||
if(mRunningOnLoad)System.out.println("First Recipe!");
|
||||
this.mLastRecipe = tRecipe;
|
||||
this.mEUt = (this.mLastRecipe.mEUt * overclock(this.mLastRecipe.mSpecialValue));
|
||||
this.mMaxProgresstime = this.mLastRecipe.mDuration / overclock(this.mLastRecipe.mSpecialValue);
|
||||
this.mEfficiencyIncrease = 10000;
|
||||
this.mOutputFluids = this.mLastRecipe.mFluidOutputs;
|
||||
turnCasingActive(true);
|
||||
mRunningOnLoad=false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public abstract int tierOverclock();
|
||||
|
||||
public boolean turnCasingActive(boolean status) {
|
||||
if (this.mEnergyHatches != null) {
|
||||
for (GT_MetaTileEntity_Hatch_Energy hatch : this.mEnergyHatches) {
|
||||
hatch.mMachineBlock = status ? (byte) 52 : (byte) 53;
|
||||
}
|
||||
}
|
||||
if (this.mOutputHatches != null) {
|
||||
for (GT_MetaTileEntity_Hatch_Output hatch : this.mOutputHatches) {
|
||||
hatch.mMachineBlock = status ? (byte) 52 : (byte) 53;
|
||||
}
|
||||
}
|
||||
if (this.mInputHatches != null) {
|
||||
for (GT_MetaTileEntity_Hatch_Input hatch : this.mInputHatches) {
|
||||
hatch.mMachineBlock = status ? (byte) 52 : (byte) 53;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
||||
if (aBaseMetaTileEntity.isServerSide()) {
|
||||
if (mEfficiency < 0)
|
||||
mEfficiency = 0;
|
||||
if(mRunningOnLoad&&checkMachine(aBaseMetaTileEntity, mInventory[1])){
|
||||
this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU();
|
||||
checkRecipe(mInventory[1]);}
|
||||
if (--mUpdate == 0 || --mStartUpCheck == 0) {
|
||||
mInputHatches.clear();
|
||||
mInputBusses.clear();
|
||||
mOutputHatches.clear();
|
||||
mOutputBusses.clear();
|
||||
mDynamoHatches.clear();
|
||||
mEnergyHatches.clear();
|
||||
mMufflerHatches.clear();
|
||||
mMaintenanceHatches.clear();
|
||||
mMachine = checkMachine(aBaseMetaTileEntity, mInventory[1]);
|
||||
}
|
||||
if (mStartUpCheck < 0) {
|
||||
if (mMachine) {
|
||||
if (this.mEnergyHatches != null) {
|
||||
for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches)
|
||||
if (isValidMetaTileEntity(tHatch)) {
|
||||
if (aBaseMetaTileEntity.getStoredEU() + (2048 * tierOverclock()) < maxEUStore()
|
||||
&& tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(2048 * tierOverclock(), false)) {
|
||||
aBaseMetaTileEntity.increaseStoredEnergyUnits(2048 * tierOverclock(), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.mEUStore <= 0 && mMaxProgresstime > 0) {
|
||||
stopMachine();
|
||||
}
|
||||
if (getRepairStatus() > 0) {
|
||||
if (mMaxProgresstime > 0 && doRandomMaintenanceDamage()) {
|
||||
this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(mEUt, true);
|
||||
if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) {
|
||||
if (mOutputItems != null)for (ItemStack tStack : mOutputItems )if (tStack != null)addOutput(tStack);
|
||||
if (mOutputFluids != null)for (FluidStack tStack : mOutputFluids)if (tStack != null)addOutput(tStack);
|
||||
mEfficiency = Math.max(0, Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]) - ((getIdealStatus() - getRepairStatus()) * 1000)));
|
||||
mOutputItems = null;
|
||||
mProgresstime = 0;
|
||||
mMaxProgresstime = 0;
|
||||
mEfficiencyIncrease = 0;
|
||||
if (mOutputFluids != null && mOutputFluids.length > 0) {
|
||||
GT_Mod.instance.achievements.issueAchivementHatchFluid(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), mOutputFluids[0]);
|
||||
}
|
||||
this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU();
|
||||
if (aBaseMetaTileEntity.isAllowedToWork())
|
||||
checkRecipe(mInventory[1]);
|
||||
}
|
||||
} else {
|
||||
if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity.hasInventoryBeenModified()) {
|
||||
turnCasingActive(mMaxProgresstime > 0);
|
||||
if (aBaseMetaTileEntity.isAllowedToWork()) {
|
||||
this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU();
|
||||
if (checkRecipe(mInventory[1]) && aBaseMetaTileEntity.getStoredEU() >= this.mLastRecipe.mSpecialValue) {
|
||||
aBaseMetaTileEntity.decreaseStoredEnergyUnits(this.mLastRecipe.mSpecialValue, true);
|
||||
}
|
||||
}
|
||||
if (mMaxProgresstime <= 0)
|
||||
mEfficiency = Math.max(0, mEfficiency - 1000);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.mLastRecipe = null;
|
||||
stopMachine();
|
||||
}
|
||||
} else {
|
||||
turnCasingActive(false);
|
||||
this.mLastRecipe = null;
|
||||
stopMachine();
|
||||
}
|
||||
}
|
||||
aBaseMetaTileEntity.setErrorDisplayID((aBaseMetaTileEntity.getErrorDisplayID() & ~127) | (mWrench ? 0 : 1) | (mScrewdriver ? 0 : 2) | (mSoftHammer ? 0 : 4) | (mHardHammer ? 0 : 8)
|
||||
| (mSolderingTool ? 0 : 16) | (mCrowbar ? 0 : 32) | (mMachine ? 0 : 64));
|
||||
aBaseMetaTileEntity.setActive(mMaxProgresstime > 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onRunningTick(ItemStack aStack) {
|
||||
if (mEUt < 0) {
|
||||
if (!drainEnergyInput(((long) -mEUt * 10000) / Math.max(1000, mEfficiency))) {
|
||||
this.mLastRecipe = null;
|
||||
stopMachine();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (this.mEUStore <= 0) {
|
||||
this.mLastRecipe = null;
|
||||
stopMachine();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if(this.mEUStore<=0){
|
||||
this.mLastRecipe=null;
|
||||
stopMachine();
|
||||
|
||||
public boolean drainEnergyInput(long aEU) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean drainEnergyInput(long aEU) {
|
||||
// if (aEU <= this.mEUStore) {
|
||||
// this.mEUStore-=aEU;
|
||||
// return true;}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getMaxEfficiency(ItemStack aStack) {
|
||||
return 10000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxEfficiency(ItemStack aStack) {
|
||||
return 10000;}
|
||||
@Override
|
||||
public int getPollutionPerTick(ItemStack aStack) {return 0;}
|
||||
@Override
|
||||
public int getDamageToComponent(ItemStack aStack) {return 0;}
|
||||
@Override
|
||||
public int getAmountOfOutputs() {return 0;}
|
||||
@Override
|
||||
public boolean explodesOnComponentBreak(ItemStack aStack) {return false;} }
|
||||
@Override
|
||||
public int getPollutionPerTick(ItemStack aStack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDamageToComponent(ItemStack aStack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAmountOfOutputs() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean explodesOnComponentBreak(ItemStack aStack) {
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -156,7 +156,8 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_M
|
|||
|
||||
if (mEUt <= 0) {
|
||||
|
||||
this.mEfficiencyIncrease = (-10);
|
||||
// this.mEfficiencyIncrease = (-10);
|
||||
this.mEfficiency = 0;
|
||||
//stopMachine();
|
||||
return false;
|
||||
} else {
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.util.ArrayList;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import gregtech.GT_Mod;
|
||||
import gregtech.api.GregTech_API;
|
||||
import gregtech.api.enums.Textures;
|
||||
import gregtech.api.interfaces.ITexture;
|
||||
|
@ -55,6 +56,7 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La
|
|||
public int getPollutionPerTick(ItemStack aStack) {
|
||||
return 0;
|
||||
}
|
||||
public boolean achievement=false;
|
||||
|
||||
@Override
|
||||
int fluidIntoPower(ArrayList<FluidStack> aFluids, int aOptFlow, int aBaseEff) {
|
||||
|
@ -70,6 +72,10 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La
|
|||
depleteInput(new FluidStack(aFluids.get(i), flow)); // deplete that amount
|
||||
remainingFlow -= flow; // track amount we're allowed to keep depleting from hatches
|
||||
totalFlow += flow; // track total used
|
||||
if(!achievement){
|
||||
try{GT_Mod.instance.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "efficientsteam");}catch(Exception e){}
|
||||
achievement=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.Collection;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import gregtech.GT_Mod;
|
||||
import gregtech.api.GregTech_API;
|
||||
import gregtech.api.enums.Textures;
|
||||
import gregtech.api.interfaces.ITexture;
|
||||
|
@ -70,7 +71,6 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
|
|||
|
||||
@Override
|
||||
int fluidIntoPower(ArrayList<FluidStack> aFluids, int aOptFlow, int aBaseEff) {
|
||||
|
||||
aOptFlow *= 20;
|
||||
int tEU = 0;
|
||||
|
||||
|
@ -79,8 +79,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
|
|||
if (aFluids.size() >= 1) {
|
||||
FluidStack firstFuelType = new FluidStack(aFluids.get(0), 0); // Identify a SINGLE type of fluid to process. Doesn't matter which one. Ignore the rest!
|
||||
int fuelValue = getFuelValue(firstFuelType);
|
||||
actualOptimalFlow = (int) (aOptFlow / fuelValue);
|
||||
|
||||
actualOptimalFlow = (int) ((aOptFlow + fuelValue -1 )/ fuelValue);
|
||||
int remainingFlow = (int) (actualOptimalFlow * 1.25f); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios.
|
||||
int flow = 0;
|
||||
int totalFlow = 0;
|
||||
|
@ -106,7 +105,6 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar
|
|||
} else {
|
||||
tEU = tEU * aBaseEff / 10000;
|
||||
}
|
||||
|
||||
return tEU;
|
||||
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.util.ArrayList;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import gregtech.GT_Mod;
|
||||
import gregtech.api.GregTech_API;
|
||||
import gregtech.api.enums.Textures;
|
||||
import gregtech.api.interfaces.ITexture;
|
||||
|
@ -63,6 +64,8 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg
|
|||
water = water - (int)usage;
|
||||
return usage;
|
||||
}
|
||||
|
||||
private boolean achievement = false;
|
||||
|
||||
@Override
|
||||
int fluidIntoPower(ArrayList<FluidStack> aFluids, int aOptFlow, int aBaseEff) {
|
||||
|
@ -79,6 +82,10 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg
|
|||
depleteInput(new FluidStack(aFluids.get(i), flow)); // deplete that amount
|
||||
remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches
|
||||
totalFlow += flow; // track total input used
|
||||
if(!achievement){
|
||||
try{GT_Mod.instance.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "muchsteam");}catch(Exception e){}
|
||||
achievement=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -112,6 +112,8 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
|
|||
return GT_Recipe.GT_Recipe_Map.sBenderRecipes;
|
||||
}else if(tmp.startsWith("wiremill")){
|
||||
return GT_Recipe.GT_Recipe_Map.sWiremillRecipes;
|
||||
}else if(tmp.startsWith("arcfurnace")){
|
||||
return GT_Recipe.GT_Recipe_Map.sArcFurnaceRecipes;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -240,6 +242,11 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
|
|||
tmp = overStacks.toArray(tmp);
|
||||
tOut = ArrayUtils.addAll(tOut, tmp);
|
||||
}
|
||||
List<ItemStack> tSList = new ArrayList<ItemStack>();
|
||||
for(ItemStack tS : tOut){
|
||||
if(tS.stackSize>0)tSList.add(tS);
|
||||
}
|
||||
tOut = tSList.toArray(new ItemStack[tSList.size()]);
|
||||
this.mOutputItems = tOut;
|
||||
this.mOutputFluids = new FluidStack[]{tFOut};
|
||||
updateSlots();
|
||||
|
|
|
@ -175,6 +175,7 @@ public int adjY = 9;
|
|||
}
|
||||
|
||||
public Achievement registerAchievement(String textId, int x, int y, ItemStack icon, Achievement requirement, boolean special) {
|
||||
if(GT_Mod.gregtechproxy.mAchievements){return null;};
|
||||
Achievement achievement = new Achievement(textId, textId, this.adjX + x, this.adjY+y, icon, requirement);
|
||||
if (special) {
|
||||
achievement.setSpecial();
|
||||
|
@ -189,6 +190,7 @@ public int adjY = 9;
|
|||
}
|
||||
|
||||
public Achievement registerAchievement(String textId, int x, int y, ItemStack icon, String requirement, boolean special) {
|
||||
if(GT_Mod.gregtechproxy.mAchievements){return null;};
|
||||
Achievement achievement = new Achievement(textId, textId, this.adjX + x, this.adjY+y, icon, getAchievement(requirement));
|
||||
if (special) {
|
||||
achievement.setSpecial();
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package gregtech.loaders.oreprocessing;
|
||||
|
||||
import appeng.api.config.TunnelType;
|
||||
import appeng.core.Api;
|
||||
import gregtech.GT_Mod;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import gregtech.api.enums.ItemList;
|
||||
import gregtech.api.enums.Materials;
|
||||
|
@ -27,6 +30,10 @@ public class ProcessingNugget implements gregtech.api.interfaces.IOreRecipeRegis
|
|||
if (aMaterial.mStandardMoltenFluid != null) GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Nugget.get(0L, new Object[0]), aMaterial.getMolten(16L), GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 1L), 16, 4);
|
||||
GT_RecipeRegistrator.registerReverseFluidSmelting(aStack, aMaterial, aPrefix.mMaterialAmount, null);
|
||||
GT_RecipeRegistrator.registerReverseMacerating(aStack, aMaterial, aPrefix.mMaterialAmount, null, null, null, false);
|
||||
|
||||
if(GT_Mod.gregtechproxy.mAE2Integration){
|
||||
Api.INSTANCE.registries().matterCannon().registerAmmo(GT_OreDictUnificator.get(OrePrefixes.round, aMaterial, 1L), aMaterial.getMass());;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package gregtech.loaders.oreprocessing;
|
||||
|
||||
import appeng.api.config.TunnelType;
|
||||
import appeng.api.features.IP2PTunnelRegistry;
|
||||
import appeng.core.Api;
|
||||
import gregtech.GT_Mod;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import gregtech.api.enums.ItemList;
|
||||
import gregtech.api.enums.Materials;
|
||||
|
@ -31,6 +35,11 @@ public class ProcessingWire01 implements gregtech.api.interfaces.IOreRecipeRegis
|
|||
GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(8L, new Object[] { aStack }), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.wireGt08, aMaterial, 1L), 300, 8);
|
||||
GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(12L, new Object[] { aStack }), ItemList.Circuit_Integrated.getWithDamage(0L, 12L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.wireGt12, aMaterial, 1L), 400, 8);
|
||||
GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(16L, new Object[] { aStack }), ItemList.Circuit_Integrated.getWithDamage(0L, 16L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.wireGt16, aMaterial, 1L), 500, 8);
|
||||
|
||||
if(GT_Mod.gregtechproxy.mAE2Integration){
|
||||
Api.INSTANCE.registries().p2pTunnel().addNewAttunement(aStack, TunnelType.IC2_POWER);
|
||||
Api.INSTANCE.registries().p2pTunnel().addNewAttunement(GT_OreDictUnificator.get(OrePrefixes.cableGt01, aMaterial, 1L), TunnelType.IC2_POWER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package gregtech.loaders.oreprocessing;
|
||||
|
||||
import appeng.api.config.TunnelType;
|
||||
import appeng.core.Api;
|
||||
import gregtech.GT_Mod;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import gregtech.api.enums.Materials;
|
||||
import gregtech.api.enums.OrePrefixes;
|
||||
|
@ -22,6 +25,11 @@ public class ProcessingWire02 implements gregtech.api.interfaces.IOreRecipeRegis
|
|||
GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt02, aMaterial, 1L), new Object[] { aOreDictName, OrePrefixes.plate.get(Materials.Rubber) });
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 2L), new Object[] { aOreDictName });
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), new Object[] { OrePrefixes.wireGt01.get(aMaterial), OrePrefixes.wireGt01.get(aMaterial) });
|
||||
|
||||
if(GT_Mod.gregtechproxy.mAE2Integration){
|
||||
Api.INSTANCE.registries().p2pTunnel().addNewAttunement(aStack, TunnelType.IC2_POWER);
|
||||
Api.INSTANCE.registries().p2pTunnel().addNewAttunement(GT_OreDictUnificator.get(OrePrefixes.cableGt02, aMaterial, 1L), TunnelType.IC2_POWER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package gregtech.loaders.oreprocessing;
|
||||
|
||||
import appeng.api.config.TunnelType;
|
||||
import appeng.core.Api;
|
||||
import gregtech.GT_Mod;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import gregtech.api.enums.Materials;
|
||||
import gregtech.api.enums.OrePrefixes;
|
||||
|
@ -22,6 +25,11 @@ public class ProcessingWire04 implements gregtech.api.interfaces.IOreRecipeRegis
|
|||
GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt04, aMaterial, 1L), new Object[] { aOreDictName, OrePrefixes.plate.get(Materials.Rubber), OrePrefixes.plate.get(Materials.Rubber) });
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 4L), new Object[] { aOreDictName });
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), new Object[] { OrePrefixes.wireGt02.get(aMaterial), OrePrefixes.wireGt02.get(aMaterial) });
|
||||
|
||||
if(GT_Mod.gregtechproxy.mAE2Integration){
|
||||
Api.INSTANCE.registries().p2pTunnel().addNewAttunement(aStack, TunnelType.IC2_POWER);
|
||||
Api.INSTANCE.registries().p2pTunnel().addNewAttunement(GT_OreDictUnificator.get(OrePrefixes.cableGt04, aMaterial, 1L), TunnelType.IC2_POWER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package gregtech.loaders.oreprocessing;
|
||||
|
||||
import appeng.api.config.TunnelType;
|
||||
import appeng.core.Api;
|
||||
import gregtech.GT_Mod;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import gregtech.api.enums.Materials;
|
||||
import gregtech.api.enums.OrePrefixes;
|
||||
|
@ -22,6 +25,11 @@ public class ProcessingWire08 implements gregtech.api.interfaces.IOreRecipeRegis
|
|||
GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt08, aMaterial, 1L), new Object[] { aOreDictName, OrePrefixes.plate.get(Materials.Rubber), OrePrefixes.plate.get(Materials.Rubber), OrePrefixes.plate.get(Materials.Rubber) });
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 8L), new Object[] { aOreDictName });
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), new Object[] { OrePrefixes.wireGt04.get(aMaterial), OrePrefixes.wireGt04.get(aMaterial) });
|
||||
|
||||
if(GT_Mod.gregtechproxy.mAE2Integration){
|
||||
Api.INSTANCE.registries().p2pTunnel().addNewAttunement(aStack, TunnelType.IC2_POWER);
|
||||
Api.INSTANCE.registries().p2pTunnel().addNewAttunement(GT_OreDictUnificator.get(OrePrefixes.cableGt08, aMaterial, 1L), TunnelType.IC2_POWER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package gregtech.loaders.oreprocessing;
|
||||
|
||||
import appeng.api.config.TunnelType;
|
||||
import appeng.core.Api;
|
||||
import gregtech.GT_Mod;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import gregtech.api.enums.Materials;
|
||||
import gregtech.api.enums.OrePrefixes;
|
||||
|
@ -22,7 +25,12 @@ public class ProcessingWire12 implements gregtech.api.interfaces.IOreRecipeRegis
|
|||
GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt12, aMaterial, 1L), new Object[] { aOreDictName, OrePrefixes.plate.get(Materials.Rubber), OrePrefixes.plate.get(Materials.Rubber), OrePrefixes.plate.get(Materials.Rubber), OrePrefixes.plate.get(Materials.Rubber) });
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 12L), new Object[] { aOreDictName });
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), new Object[] { OrePrefixes.wireGt08.get(aMaterial), OrePrefixes.wireGt04.get(aMaterial) });
|
||||
}
|
||||
|
||||
if(GT_Mod.gregtechproxy.mAE2Integration){
|
||||
Api.INSTANCE.registries().p2pTunnel().addNewAttunement(aStack, TunnelType.IC2_POWER);
|
||||
Api.INSTANCE.registries().p2pTunnel().addNewAttunement(GT_OreDictUnificator.get(OrePrefixes.cableGt12, aMaterial, 1L), TunnelType.IC2_POWER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package gregtech.loaders.oreprocessing;
|
||||
|
||||
import appeng.api.config.TunnelType;
|
||||
import appeng.core.Api;
|
||||
import gregtech.GT_Mod;
|
||||
import gregtech.api.enums.Materials;
|
||||
import gregtech.api.enums.OrePrefixes;
|
||||
import gregtech.api.util.GT_ModHandler;
|
||||
|
@ -19,6 +22,10 @@ public class ProcessingWire16 implements gregtech.api.interfaces.IOreRecipeRegis
|
|||
GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 16L), new Object[] { aOreDictName });
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), new Object[] { OrePrefixes.wireGt08.get(aMaterial), OrePrefixes.wireGt08.get(aMaterial) });
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), new Object[] { OrePrefixes.wireGt12.get(aMaterial), OrePrefixes.wireGt04.get(aMaterial) });
|
||||
|
||||
if(GT_Mod.gregtechproxy.mAE2Integration){
|
||||
Api.INSTANCE.registries().p2pTunnel().addNewAttunement(aStack, TunnelType.IC2_POWER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@ import gregtech.common.GT_Proxy;
|
|||
|
||||
import java.io.PrintStream;
|
||||
|
||||
import appeng.api.features.IP2PTunnelRegistry;
|
||||
import appeng.core.Api;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
|
@ -440,7 +442,7 @@ public class GT_CraftingRecipeLoader
|
|||
GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.piston, 1), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { "WWW", "CBC", "CRC", Character.valueOf('W'), OrePrefixes.plank.get(Materials.Wood), Character.valueOf('C'), OrePrefixes.stoneCobble, Character.valueOf('R'), OrePrefixes.dust.get(Materials.Redstone), Character.valueOf('B'), OrePrefixes.ingot.get(Materials.Steel) });
|
||||
GT_ModHandler.addCraftingRecipe(new ItemStack(Blocks.piston, 1), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { "WWW", "CBC", "CRC", Character.valueOf('W'), OrePrefixes.plank.get(Materials.Wood), Character.valueOf('C'), OrePrefixes.stoneCobble, Character.valueOf('R'), OrePrefixes.dust.get(Materials.Redstone), Character.valueOf('B'), OrePrefixes.ingot.get(Materials.Titanium) });
|
||||
|
||||
GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("reactorVent", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { "AIA", "I I", "AIA", Character.valueOf('I'), new ItemStack(Blocks.iron_bars, 1), Character.valueOf('A'), OrePrefixes.plate.get(Materials.Aluminium) });
|
||||
GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("reactorVent", 1L,1), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { "AIA", "I I", "AIA", Character.valueOf('I'), new ItemStack(Blocks.iron_bars, 1), Character.valueOf('A'), OrePrefixes.plate.get(Materials.Aluminium) });
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_ModHandler.getIC2Item("reactorPlatingExplosive", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { GT_ModHandler.getIC2Item("reactorPlating", 1L), OrePrefixes.plate.get(Materials.Lead) });
|
||||
if (!Materials.Steel.mBlastFurnaceRequired) {
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Steel, 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { OrePrefixes.dust.get(Materials.Iron), OrePrefixes.dust.get(Materials.Coal), OrePrefixes.dust.get(Materials.Coal) });
|
||||
|
@ -494,6 +496,7 @@ public class GT_CraftingRecipeLoader
|
|||
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 5L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { OrePrefixes.dust.get(Materials.Potassium), OrePrefixes.cell.get(Materials.Nitrogen), OrePrefixes.cell.get(Materials.Oxygen), OrePrefixes.cell.get(Materials.Oxygen), OrePrefixes.cell.get(Materials.Oxygen) });
|
||||
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("carbonFiber", 1L));
|
||||
|
||||
if(GT_Mod.gregtechproxy.mDisableIC2Cables){
|
||||
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("copperCableItem", 1L));
|
||||
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("insulatedCopperCableItem", 1L));
|
||||
|
@ -607,8 +610,8 @@ public class GT_CraftingRecipeLoader
|
|||
GT_ModHandler.addCraftingRecipe(GT_ModHandler.removeRecipe(new ItemStack[] { new ItemStack(Blocks.cobblestone, 1), new ItemStack(Items.iron_pickaxe, 1), new ItemStack(Blocks.cobblestone, 1), new ItemStack(Blocks.cobblestone, 1), new ItemStack(Blocks.piston, 1), new ItemStack(Blocks.cobblestone, 1), new ItemStack(Blocks.cobblestone, 1), new ItemStack(Items.redstone, 1), new ItemStack(Blocks.cobblestone, 1) }), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { "RGR", "RPR", "RCR", Character.valueOf('G'), OreDictNames.craftingGrinder, Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Advanced), Character.valueOf('R'), OrePrefixes.plate.get(Materials.Steel), Character.valueOf('P'), OreDictNames.craftingPiston });
|
||||
}
|
||||
if ((GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "beryliumreflector", true)) &&
|
||||
(GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("reactorReflectorThick", 1L)))) {
|
||||
GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("reactorReflectorThick", 1L), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { " N ", "NBN", " N ", Character.valueOf('B'), OrePrefixes.plate.get(Materials.Beryllium), Character.valueOf('N'), GT_ModHandler.getIC2Item("reactorReflector", 1L) });
|
||||
(GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("reactorReflectorThick", 1L,1)))) {
|
||||
GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("reactorReflectorThick", 1L,1), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { " N ", "NBN", " N ", Character.valueOf('B'), OrePrefixes.plate.get(Materials.Beryllium), Character.valueOf('N'), GT_ModHandler.getIC2Item("reactorReflector", 1L) });
|
||||
}
|
||||
if (GT_OreDictUnificator.get(OrePrefixes.gear, Materials.Diamond, 1L) != null)
|
||||
{
|
||||
|
|
|
@ -615,6 +615,36 @@ public class GT_MachineRecipeLoader
|
|||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getIC2Item("rubberSapling", 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Rubber, 1L));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getIC2Item("rubberLeaves", 16L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Rubber, 1L));
|
||||
GT_ModHandler.addExtractionRecipe(ItemList.Cell_Air.get(1L, new Object[0]), ItemList.Cell_Empty.get(1L, new Object[0]));
|
||||
if(Loader.isModLoaded("ExtrabiomesXL")){
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "waterplant1", 1, 0), new ItemStack(Items.dye,4,2));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "vines", 1, 0), new ItemStack(Items.dye,4,1));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower3", 1, 11), new ItemStack(Items.dye,4,11));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower3", 1, 10), new ItemStack(Items.dye,4,5));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower3", 1, 9), new ItemStack(Items.dye,4,14));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower3", 1, 8), new ItemStack(Items.dye,4,14));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower3", 1, 7), new ItemStack(Items.dye,4,1));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower3", 1, 6), new ItemStack(Items.dye,4,1));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower3", 1, 5), new ItemStack(Items.dye,4,11));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower3", 1, 0), new ItemStack(Items.dye,4,9));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower3", 1, 4), new ItemStack(Items.dye,4,11));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower3", 1, 3), new ItemStack(Items.dye,4,13));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower1", 1, 3), new ItemStack(Items.dye,4,5));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower3", 1, 2), new ItemStack(Items.dye,4,5));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower1", 1, 1), new ItemStack(Items.dye,4,12));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower2", 1, 15), new ItemStack(Items.dye,4,11));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower2", 1, 14), new ItemStack(Items.dye,4,1));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower2", 1, 13), new ItemStack(Items.dye,4,9));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower2", 1, 12), new ItemStack(Items.dye,4,14));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower2", 1, 11), new ItemStack(Items.dye,4,7));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower1", 1, 7), new ItemStack(Items.dye,4,7));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower1", 1, 2), new ItemStack(Items.dye,4,11));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower3", 1, 13), new ItemStack(Items.dye,4,6));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower2", 1, 6), new ItemStack(Items.dye,4,12));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower2", 1, 5), new ItemStack(Items.dye,4,10));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower2", 1, 2), new ItemStack(Items.dye,4,1));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower2", 1, 1), new ItemStack(Items.dye,4,9));
|
||||
GT_ModHandler.addExtractionRecipe(GT_ModHandler.getModItem("ExtrabiomesXL", "flower2", 1, 0), new ItemStack(Items.dye,4,13));
|
||||
}
|
||||
|
||||
GT_ModHandler.addCompressionRecipe(ItemList.IC2_Compressed_Coal_Chunk.get(1L, new Object[0]), ItemList.IC2_Industrial_Diamond.get(1L, new Object[0]));
|
||||
GT_ModHandler.addCompressionRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Uranium, 1L), GT_ModHandler.getIC2Item("Uran238", 1L));
|
||||
|
@ -667,6 +697,10 @@ public class GT_MachineRecipeLoader
|
|||
GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.stained_glass_pane, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L), 16, 10);
|
||||
GT_Values.RA.addForgeHammerRecipe(new ItemStack(Blocks.glass_pane, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Glass, 3L), 16, 10);
|
||||
|
||||
GT_Values.RA.addForgeHammerRecipe(GT_ModHandler.getModItem("HardcoreEnderExpansion", "endium_ore", 1), GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.Endium,1), 16, 10);
|
||||
GT_ModHandler.addPulverisationRecipe(GT_ModHandler.getModItem("HardcoreEnderExpansion", "endium_ore", 1), GT_OreDictUnificator.get(OrePrefixes.crushed, Materials.Endium,2),GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Endstone,1),5000,GT_Values.NI,0, true);
|
||||
GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.Endium, GT_ModHandler.getModItem("HardcoreEnderExpansion", "endium_ingot", 1), true, true);
|
||||
|
||||
GT_Values.RA.addAmplifier(ItemList.IC2_Scrap.get(9L, new Object[0]), 180, 1);
|
||||
GT_Values.RA.addAmplifier(ItemList.IC2_Scrapbox.get(1L, new Object[0]), 180, 1);
|
||||
|
||||
|
@ -704,7 +738,7 @@ public class GT_MachineRecipeLoader
|
|||
GT_Values.RA.addFusionReactorRecipe(Materials.Lithium.getMolten(16), Materials.Tungsten.getMolten(16), Materials.Iridium.getMolten(16), 32, 32768, 300000000);
|
||||
GT_Values.RA.addFusionReactorRecipe(Materials.Deuterium.getGas(125), Materials.Tritium.getGas(125), Materials.Helium.getPlasma(125), 16, 4096, 40000000); //Mark 1 Cheap //
|
||||
GT_Values.RA.addFusionReactorRecipe(Materials.Deuterium.getGas(125), Materials.Helium_3.getGas(125), Materials.Helium.getPlasma(125), 16, 2048, 60000000); //Mark 1 Expensive //
|
||||
GT_Values.RA.addCannerRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Lithium, 1L), GT_ModHandler.getIC2Item("reactorLithiumCell", 1) , null, 16, 64);
|
||||
GT_Values.RA.addCannerRecipe(GT_ModHandler.getIC2Item("fuelRod", 1), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Lithium, 1L), GT_ModHandler.getIC2Item("reactorLithiumCell", 1,1) , null, 16, 64);
|
||||
GT_Values.RA.addFluidExtractionRecipe(GT_ModHandler.getIC2Item("TritiumCell", 1), GT_ModHandler.getIC2Item("fuelRod", 1), Materials.Tritium.getGas(32), 10000, 16, 64);
|
||||
GT_Values.RA.addFusionReactorRecipe(Materials.Carbon.getMolten(125), Materials.Helium_3.getGas(125), Materials.Oxygen.getPlasma(125), 32, 4096, 80000000); //Mark 1 Expensive //
|
||||
GT_Values.RA.addFusionReactorRecipe(Materials.Aluminium.getMolten(16), Materials.Lithium.getMolten(16), Materials.Sulfur.getPlasma(125), 32, 10240, 240000000); //Mark 2 Cheap
|
||||
|
@ -722,6 +756,7 @@ public class GT_MachineRecipeLoader
|
|||
GT_Values.RA.addFusionReactorRecipe(Materials.Mercury.getFluid(16), Materials.Magnesium.getMolten(16), Materials.Uranium.getMolten(16), 64, 49152, 240000000); //
|
||||
GT_Values.RA.addFusionReactorRecipe(Materials.Gold.getMolten(16), Materials.Aluminium.getMolten(16), Materials.Uranium.getMolten(16), 64, 49152, 240000000); //
|
||||
GT_Values.RA.addFusionReactorRecipe(Materials.Uranium.getMolten(16), Materials.Helium.getGas(16), Materials.Plutonium.getMolten(16), 128, 49152, 480000000); //
|
||||
GT_Values.RA.addFusionReactorRecipe(Materials.Vanadium.getMolten(16), Materials.Hydrogen.getGas(125), Materials.Chrome.getMolten(16), 64, 24576, 140000000); //
|
||||
|
||||
GT_ModHandler.removeRecipeByOutput(ItemList.IC2_Fertilizer.get(1L, new Object[0]));
|
||||
GT_Values.RA.addImplosionRecipe(ItemList.IC2_Compressed_Coal_Chunk.get(1L, new Object[0]), 8, ItemList.IC2_Industrial_Diamond.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.DarkAsh, 4L));
|
||||
|
@ -817,9 +852,9 @@ public class GT_MachineRecipeLoader
|
|||
GT_Values.RA.addBenderRecipe(ItemList.IC2_Item_Casing_Iron.get(2L, new Object[0]), GT_ModHandler.getIC2Item("fuelRod", 1L), 100, 8);
|
||||
GT_Values.RA.addBenderRecipe(ItemList.IC2_Item_Casing_Tin.get(1L, new Object[0]), ItemList.IC2_Food_Can_Empty.get(1L, new Object[0]), 100, 8);
|
||||
|
||||
GT_Values.RA.addVacuumFreezerRecipe(GT_ModHandler.getIC2Item("reactorCoolantSimple", 1L, 32767), GT_ModHandler.getIC2Item("reactorCoolantSimple", 1L), 100);
|
||||
GT_Values.RA.addVacuumFreezerRecipe(GT_ModHandler.getIC2Item("reactorCoolantTriple", 1L, 32767), GT_ModHandler.getIC2Item("reactorCoolantTriple", 1L), 300);
|
||||
GT_Values.RA.addVacuumFreezerRecipe(GT_ModHandler.getIC2Item("reactorCoolantSix", 1L, 32767), GT_ModHandler.getIC2Item("reactorCoolantSix", 1L), 600);
|
||||
GT_Values.RA.addVacuumFreezerRecipe(GT_ModHandler.getIC2Item("reactorCoolantSimple", 1L, 32767), GT_ModHandler.getIC2Item("reactorCoolantSimple", 1L,1), 100);
|
||||
GT_Values.RA.addVacuumFreezerRecipe(GT_ModHandler.getIC2Item("reactorCoolantTriple", 1L, 32767), GT_ModHandler.getIC2Item("reactorCoolantTriple", 1L,1), 300);
|
||||
GT_Values.RA.addVacuumFreezerRecipe(GT_ModHandler.getIC2Item("reactorCoolantSix", 1L, 32767), GT_ModHandler.getIC2Item("reactorCoolantSix", 1L,1), 600);
|
||||
GT_Values.RA.addVacuumFreezerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ice, 1L), 50);
|
||||
|
||||
GT_Values.RA.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lead, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Obsidian, 2L), ItemList.TE_Hardened_Glass.get(2L, new Object[0]), 200, 16);
|
||||
|
@ -938,7 +973,7 @@ public class GT_MachineRecipeLoader
|
|||
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), ItemList.Casing_IV.get(1L, new Object[0]), 50, 16);
|
||||
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Chrome, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), ItemList.Casing_LuV.get(1L, new Object[0]), 50, 16);
|
||||
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), ItemList.Casing_ZPM.get(1L, new Object[0]), 50, 16);
|
||||
|
||||
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), ItemList.Casing_UV.get(1L, new Object[0]), 50, 16);
|
||||
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 8L), ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]), ItemList.Casing_MAX.get(1L, new Object[0]), 50, 16);
|
||||
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Lead, 2L), ItemList.Casing_ULV.get(1L, new Object[0]), ItemList.Hull_ULV.get(1L, new Object[0]), 25, 16);
|
||||
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tin, 2L), ItemList.Casing_LV.get(1L, new Object[0]), ItemList.Hull_LV.get(1L, new Object[0]), 50, 16);
|
||||
|
@ -946,11 +981,11 @@ public class GT_MachineRecipeLoader
|
|||
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.AnnealedCopper, 2L), ItemList.Casing_MV.get(1L, new Object[0]), ItemList.Hull_MV.get(1L, new Object[0]), 50, 16);
|
||||
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Gold, 2L), ItemList.Casing_HV.get(1L, new Object[0]), ItemList.Hull_HV.get(1L, new Object[0]), 50, 16);
|
||||
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Aluminium, 2L), ItemList.Casing_EV.get(1L, new Object[0]), ItemList.Hull_EV.get(1L, new Object[0]), 50, 16);
|
||||
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt02, Materials.Tungsten, 2L), ItemList.Casing_IV.get(1L, new Object[0]), ItemList.Hull_IV.get(1L, new Object[0]), 50, 16);
|
||||
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tungsten, 2L), ItemList.Casing_IV.get(1L, new Object[0]), ItemList.Hull_IV.get(1L, new Object[0]), 50, 16);
|
||||
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Tungsten, 2L), ItemList.Casing_LuV.get(1L, new Object[0]), ItemList.Hull_LuV.get(1L, new Object[0]), 50, 16);
|
||||
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.Osmium, 2L), ItemList.Casing_ZPM.get(1L, new Object[0]), ItemList.Hull_ZPM.get(1L, new Object[0]), 50, 16);
|
||||
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Osmium, 2L), ItemList.Casing_UV.get(1L, new Object[0]), ItemList.Hull_UV.get(1L, new Object[0]), 50, 16);
|
||||
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Osmium, 8L), ItemList.Casing_MAX.get(1L, new Object[0]), ItemList.Hull_MAX.get(1L, new Object[0]), 50, 16);
|
||||
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 2L), ItemList.Casing_MAX.get(1L, new Object[0]), ItemList.Hull_MAX.get(1L, new Object[0]), 50, 16);
|
||||
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BatteryAlloy, 2L), GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Tin, 1L), ItemList.Battery_Hull_LV.get(1L, new Object[0]), 1600, 2);
|
||||
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BatteryAlloy, 6L), GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Copper, 2L), ItemList.Battery_Hull_MV.get(1L, new Object[0]), 2400, 4);
|
||||
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BatteryAlloy, 6L), GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.AnnealedCopper, 2L), ItemList.Battery_Hull_MV.get(1L, new Object[0]), 2400, 4);
|
||||
|
@ -1120,6 +1155,8 @@ public class GT_MachineRecipeLoader
|
|||
|
||||
GT_Utility.removeSimpleIC2MachineRecipe(new ItemStack(Blocks.cobblestone), GT_ModHandler.getMaceratorRecipeList(), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L));
|
||||
GT_Utility.removeSimpleIC2MachineRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Lapis, 1L), GT_ModHandler.getMaceratorRecipeList(), ItemList.IC2_Plantball.get(1L, new Object[0]));
|
||||
GT_Utility.removeSimpleIC2MachineRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), GT_ModHandler.getMaceratorRecipeList(), ItemList.IC2_Plantball.get(1L, new Object[0]));
|
||||
GT_Utility.removeSimpleIC2MachineRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), GT_ModHandler.getMaceratorRecipeList(), ItemList.IC2_Plantball.get(1L, new Object[0]));
|
||||
|
||||
if (GregTech_API.sThaumcraftCompat != null)
|
||||
{
|
||||
|
|
|
@ -116,7 +116,7 @@ public class GT_Loader_Item_Block_And_Fluid
|
|||
ItemList.NC_SensorCard.set(tItem == null ? new GT_Generic_Item("sensorcard", "GregTech Sensor Card", "Nuclear Control not installed", false) : tItem);
|
||||
|
||||
ItemList.Neutron_Reflector.set(new GT_NeutronReflector_Item("neutronreflector", "Iridium Neutron Reflector", 0));
|
||||
GT_ModHandler.addCraftingRecipe(ItemList.Neutron_Reflector.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE , new Object[] { "RRR", "RPR", "RRR",'R', GT_ModHandler.getIC2Item("reactorReflectorThick", 1L),'P', OrePrefixes.plateAlloy.get(Materials.Iridium) });
|
||||
GT_ModHandler.addCraftingRecipe(ItemList.Neutron_Reflector.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE , new Object[] { "RRR", "RPR", "RRR",'R', GT_ModHandler.getIC2Item("reactorReflectorThick", 1L,1),'P', OrePrefixes.plateAlloy.get(Materials.Iridium) });
|
||||
|
||||
ItemList.Reactor_Coolant_He_1.set(GregTech_API.constructCoolantCellItem("60k_Helium_Coolantcell", "60k He Coolant Cell", 60000));
|
||||
GT_ModHandler.addCraftingRecipe(ItemList.Reactor_Coolant_He_1.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE , new Object[] { " P ", "PCP", " P ",'C', OrePrefixes.cell.get(Materials.Helium),'P', OrePrefixes.plate.get(Materials.Tin) });
|
||||
|
@ -128,7 +128,7 @@ public class GT_Loader_Item_Block_And_Fluid
|
|||
GT_ModHandler.addCraftingRecipe(ItemList.Reactor_Coolant_He_6.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE , new Object[] { "PCP", "PDP", "PCP",'C', ItemList.Reactor_Coolant_He_3,'P', OrePrefixes.plate.get(Materials.Tin),'D',OrePrefixes.plateDense.get(Materials.Copper) });
|
||||
|
||||
ItemList.Reactor_Coolant_NaK_1.set(GregTech_API.constructCoolantCellItem("60k_NaK_Coolantcell", "60k NaK Coolantcell", 60000));
|
||||
GT_ModHandler.addCraftingRecipe(ItemList.Reactor_Coolant_NaK_1.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE , new Object[] { "TST", "PCP", "TST",'C', GT_ModHandler.getIC2Item("reactorCoolantSimple", 1L),'T', OrePrefixes.plate.get(Materials.Tin) ,'S', OrePrefixes.dust.get(Materials.Sodium),'P', OrePrefixes.dust.get(Materials.Potassium)});
|
||||
GT_ModHandler.addCraftingRecipe(ItemList.Reactor_Coolant_NaK_1.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE , new Object[] { "TST", "PCP", "TST",'C', GT_ModHandler.getIC2Item("reactorCoolantSimple", 1L, 1),'T', OrePrefixes.plate.get(Materials.Tin) ,'S', OrePrefixes.dust.get(Materials.Sodium),'P', OrePrefixes.dust.get(Materials.Potassium)});
|
||||
|
||||
ItemList.Reactor_Coolant_NaK_3.set(GregTech_API.constructCoolantCellItem("180k_NaK_Coolantcell", "180k NaK Coolantcell", 180000));
|
||||
GT_ModHandler.addCraftingRecipe(ItemList.Reactor_Coolant_NaK_3.get(1L, new Object[0]), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE , new Object[] { "PCP", "PCP", "PCP",'C', ItemList.Reactor_Coolant_NaK_1,'P', OrePrefixes.plate.get(Materials.Tin)});
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 429 B After Width: | Height: | Size: 642 B |
Binary file not shown.
Before Width: | Height: | Size: 531 B |
Loading…
Reference in a new issue