More updates.

Many bugfixes + 5 Tier Pump + API.jar
This commit is contained in:
Blood-Asp 2015-05-10 11:23:53 +02:00
parent eba3a051ca
commit 1d802999d8
62 changed files with 1680 additions and 1761 deletions

BIN
API.jar Normal file

Binary file not shown.

View file

@ -1,5 +1,4 @@
/* 1: */ package gregtech;
/* 2: */
/* 3: */ import cpw.mods.fml.common.FMLLog;
/* 4: */ import cpw.mods.fml.common.LoadController;
/* 5: */ import cpw.mods.fml.common.Loader;
@ -106,6 +105,7 @@ import gregtech.api.enums.*;
/* 110: */ import net.minecraft.world.World;
/* 111: */ import net.minecraft.world.biome.BiomeGenBase;
/* 112: */ import net.minecraftforge.common.ChestGenHooks;
import net.minecraftforge.common.ForgeVersion;
/* 113: */ import net.minecraftforge.common.config.Configuration;
/* 114: */ import net.minecraftforge.common.config.Property;
/* 115: */ import net.minecraftforge.fluids.FluidContainerRegistry;

View file

@ -645,7 +645,7 @@ public enum ItemList implements IItemContainer {
Energy_LapotronicOrb2,
ZPM2, Quantum_Tank_LV,Quantum_Tank_MV,Quantum_Tank_HV,Quantum_Tank_EV,Quantum_Tank_IV, Quantum_Chest_LV, Quantum_Chest_MV, Quantum_Chest_HV, Quantum_Chest_EV, Quantum_Chest_IV,
NULL, Cover_RedstoneTransmitterExternal,Cover_RedstoneTransmitterInternal,Cover_RedstoneReceiverExternal,Cover_RedstoneReceiverInternal;
NULL, Cover_RedstoneTransmitterExternal,Cover_RedstoneTransmitterInternal,Cover_RedstoneReceiverExternal,Cover_RedstoneReceiverInternal, LargeTurbine, Ingot_Heavy1,Ingot_Heavy2,Ingot_Heavy3, Pump_LV, Pump_MV, Pump_HV, Pump_EV, Pump_IV, Teleporter;
public static final ItemList[]
DYE_ONLY_ITEMS = {Color_00, Color_01, Color_02, Color_03, Color_04, Color_05, Color_06, Color_07, Color_08, Color_09, Color_10, Color_11, Color_12, Color_13, Color_14, Color_15}

View file

@ -198,8 +198,10 @@ public enum Materials implements IColorModulationContainer, ISubTagContainer {
Fairy ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Fairy" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
Ludicrite ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Ludicrite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
Pokefennium ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Pokefennium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
Draconium ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Draconium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
DraconiumAwakened ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Awakened Draconium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
Draconium ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Draconium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
DraconiumAwakened ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 1|2 , 255, 255, 255, 0, "Awakened Draconium" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
PurpleAlloy ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 100, 180, 255, 0, "Purple Alloy" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
InfusedTeslatite ( -1, TextureSet.SET_NONE , 1.0F, 0, 2, 0 , 100, 180, 255, 0, "Infused Teslatite" , 0, 0, -1, 0, F, F, 3, 1, 1, Dyes._NULL ),
/**
* Unknown Material Components. Dead End Section.

View file

@ -133,7 +133,7 @@ public enum OrePrefixes {
compressedDirt ("9^X Compressed Dirt" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
compressedGravel ("9^X Compressed Gravel" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
compressedSand ("9^X Compressed Sand" , "" , "" ,F,F,F,F,F,F,F,F,F,F, 0 , -1, 64, -1),
compressed ("Compressed Materials" , "Compressed " , "" ,T,T,F,F,F,F,T,F,F,F, 0 , M * 1 , 64, -1), // Compressed Material, worth 1 Unit. Introduced by Galacticraft
compressed ("Compressed Materials" , "Compressed " , "" ,T,T,F,F,F,F,T,F,F,F, 0 , M * 2 , 64, -1), // Compressed Material, worth 1 Unit. Introduced by Galacticraft
glass ("Glasses" , "" , "" ,F,F,T,F,T,F,F,F,F,F, 0 , -1, 64, -1),
paneGlass ("Glass Panes" , "" , "" ,F,F,T,F,F,T,F,F,F,F, 0 , -1, 64, -1),
blockGlass ("Glass Blocks" , "" , "" ,F,F,T,F,F,T,F,F,F,F, 0 , -1, 64, -1),

View file

@ -62,7 +62,7 @@ public class Textures {
, OVERLAY_TOP_POTIONBREWER_ACTIVE, OVERLAY_TOP_REPLICATOR_ACTIVE, OVERLAY_TOP_MASSFAB_ACTIVE, OVERLAY_TOP_STEAM_HAMMER_ACTIVE, OVERLAY_TOP_STEAM_FURNACE_ACTIVE, OVERLAY_TOP_STEAM_ALLOY_SMELTER_ACTIVE, OVERLAY_TOP_STEAM_MACERATOR_ACTIVE, OVERLAY_TOP_STEAM_COMPRESSOR_ACTIVE, OVERLAY_TOP_STEAM_EXTRACTOR_ACTIVE, OVERLAY_TOP_DISASSEMBLER_ACTIVE, OVERLAY_TOP_BOXINATOR_ACTIVE, OVERLAY_TOP_ROCK_BREAKER_ACTIVE, OVERLAY_TOP_SCANNER_ACTIVE
, OVERLAY_FRONT_POTIONBREWER_ACTIVE, OVERLAY_FRONT_REPLICATOR_ACTIVE, OVERLAY_FRONT_MASSFAB_ACTIVE, OVERLAY_FRONT_STEAM_HAMMER_ACTIVE, OVERLAY_FRONT_STEAM_FURNACE_ACTIVE, OVERLAY_FRONT_STEAM_ALLOY_SMELTER_ACTIVE, OVERLAY_FRONT_STEAM_MACERATOR_ACTIVE, OVERLAY_FRONT_STEAM_COMPRESSOR_ACTIVE, OVERLAY_FRONT_STEAM_EXTRACTOR_ACTIVE, OVERLAY_FRONT_DISASSEMBLER_ACTIVE, OVERLAY_FRONT_BOXINATOR_ACTIVE, OVERLAY_FRONT_ROCK_BREAKER_ACTIVE, OVERLAY_FRONT_SCANNER_ACTIVE
, OVERLAY_BOTTOM_POTIONBREWER_ACTIVE, OVERLAY_BOTTOM_REPLICATOR_ACTIVE, OVERLAY_BOTTOM_MASSFAB_ACTIVE, OVERLAY_BOTTOM_STEAM_HAMMER_ACTIVE, OVERLAY_BOTTOM_STEAM_FURNACE_ACTIVE, OVERLAY_BOTTOM_STEAM_ALLOY_SMELTER_ACTIVE, OVERLAY_BOTTOM_STEAM_MACERATOR_ACTIVE, OVERLAY_BOTTOM_STEAM_COMPRESSOR_ACTIVE, OVERLAY_BOTTOM_STEAM_EXTRACTOR_ACTIVE, OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE, OVERLAY_BOTTOM_BOXINATOR_ACTIVE, OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE, OVERLAY_BOTTOM_SCANNER_ACTIVE
, OVERLAY_SIDE_POTIONBREWER_ACTIVE, OVERLAY_SIDE_REPLICATOR_ACTIVE, OVERLAY_SIDE_MASSFAB_ACTIVE, OVERLAY_SIDE_STEAM_HAMMER_ACTIVE, OVERLAY_SIDE_STEAM_FURNACE_ACTIVE, OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE, OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE, OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE, OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE, OVERLAY_SIDE_DISASSEMBLER_ACTIVE, OVERLAY_SIDE_BOXINATOR_ACTIVE, OVERLAY_SIDE_ROCK_BREAKER_ACTIVE, OVERLAY_SIDE_SCANNER_ACTIVE
, OVERLAY_SIDE_POTIONBREWER_ACTIVE, OVERLAY_SIDE_REPLICATOR_ACTIVE, OVERLAY_SIDE_MASSFAB_ACTIVE, OVERLAY_SIDE_STEAM_HAMMER_ACTIVE, OVERLAY_SIDE_STEAM_FURNACE_ACTIVE, OVERLAY_SIDE_STEAM_ALLOY_SMELTER_ACTIVE, OVERLAY_SIDE_STEAM_MACERATOR_ACTIVE, OVERLAY_SIDE_STEAM_COMPRESSOR_ACTIVE, OVERLAY_SIDE_STEAM_EXTRACTOR_ACTIVE, OVERLAY_SIDE_DISASSEMBLER_ACTIVE, OVERLAY_SIDE_BOXINATOR_ACTIVE, OVERLAY_SIDE_ROCK_BREAKER_ACTIVE, OVERLAY_SIDE_SCANNER_ACTIVE, OVERLAY_ADV_PUMP, OVERLAY_TELEPORTER,OVERLAY_TELEPORTER_ACTIVE
;
protected IIcon mIcon;

View file

@ -75,7 +75,7 @@ public class GT_RadioactiveCell_Item
tNBT = new NBTTagCompound();
aStack.setTagCompound(tNBT);
}
return tNBT.getInteger("durability");
return tNBT.getInteger("advDmg");
}
public int getMaxNuclearDurability()
@ -156,6 +156,6 @@ public class GT_RadioactiveCell_Item
{
super.addAdditionalToolTips(aList, aStack);
//aList.add("Time left: " + (this.maxDelay - getDurabilityOfStack(aStack)) + " secs");
aList.add("Durability: "+(this.maxDmg - this.dura)+"/"+this.maxDmg);
aList.add("Durability: "+(this.maxDmg - getDurabilityOfStack(aStack))+"/"+this.maxDmg);
}
}

View file

@ -393,7 +393,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
mRunningThroughTick = false;
return;
}
if (GregTech_API.sMachineThunderExplosions && worldObj.isThundering() && getRandomNumber(3) == 0) {
if (GregTech_API.sMachineThunderExplosions && worldObj.isThundering() && getBiome().rainfall > 0 && getRandomNumber(3) == 0) {
doEnergyExplosion();
}
}
@ -651,7 +651,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
@Override public boolean isActive() {return mActive;}
@Override public void setActive(boolean aActive) {mActive = aActive;}
@Override public long getTimer() {return mTickTimer;}
@Override public boolean decreaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooLessEnergy) {if (!canAccessData()) return false; return mHasEnoughEnergy = decreaseStoredSteam(aEnergy, false) || decreaseStoredEU(aEnergy, aIgnoreTooLessEnergy) || (aIgnoreTooLessEnergy && (decreaseStoredSteam(aEnergy, true)));}
@Override public boolean decreaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooLessEnergy) {if (!canAccessData()) return false; return mHasEnoughEnergy = decreaseStoredEU(aEnergy, aIgnoreTooLessEnergy) || decreaseStoredSteam(aEnergy, false) || (aIgnoreTooLessEnergy && (decreaseStoredSteam(aEnergy, true)));}
@Override public boolean increaseStoredEnergyUnits(long aEnergy, boolean aIgnoreTooMuchEnergy) {if (!canAccessData()) return false; if (getStoredEU() < getEUCapacity() || aIgnoreTooMuchEnergy) {setStoredEU(mMetaTileEntity.getEUVar() + aEnergy); return true;} return false;}
@Override public boolean inputEnergyFrom(byte aSide) {if (aSide == 6) return true; if (isServerSide()) return (aSide>=0&&aSide<6?mActiveEUInputs [aSide]:false)&&!mReleaseEnergy; return isEnergyInputSide (aSide);}
@Override public boolean outputsEnergyTo(byte aSide) {if (aSide == 6) return true; if (isServerSide()) return (aSide>=0&&aSide<6?mActiveEUOutputs[aSide]:false)|| mReleaseEnergy; return isEnergyOutputSide(aSide);}
@ -678,7 +678,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
public boolean setStoredEU (long aEnergy) {if (!canAccessData()) return false; if (aEnergy < 0) aEnergy = 0; mMetaTileEntity.setEUVar (aEnergy); return true;}
public boolean setStoredSteam (long aEnergy) {if (!canAccessData()) return false; if (aEnergy < 0) aEnergy = 0; mMetaTileEntity.setSteamVar (aEnergy); return true;}
public boolean decreaseStoredEU (long aEnergy, boolean aIgnoreTooLessEnergy) {if (!canAccessData()) return false; if (mMetaTileEntity.getEUVar() - aEnergy >= 0 || aIgnoreTooLessEnergy) {setStoredEU(mMetaTileEntity.getEUVar() - aEnergy); if (mMetaTileEntity.getEUVar() < 0) {setStoredEU (0); return false;} return true;} return false;}
public boolean decreaseStoredEU (long aEnergy, boolean aIgnoreTooLessEnergy) {if (!canAccessData()) {return false;} if (mMetaTileEntity.getEUVar() - aEnergy >= 0 || aIgnoreTooLessEnergy) {setStoredEU(mMetaTileEntity.getEUVar() - aEnergy); if (mMetaTileEntity.getEUVar() < 0) {setStoredEU (0); return false;} return true;} return false;}
public boolean decreaseStoredSteam (long aEnergy, boolean aIgnoreTooLessEnergy) {if (!canAccessData()) return false; if (mMetaTileEntity.getSteamVar() - aEnergy >= 0 || aIgnoreTooLessEnergy) {setStoredSteam(mMetaTileEntity.getSteamVar() - aEnergy); if (mMetaTileEntity.getSteamVar() < 0) {setStoredSteam(0); return false;} return true;} return false;}
public boolean playerOwnsThis(EntityPlayer aPlayer, boolean aCheckPrecicely) {if (!canAccessData()) return false; if (aCheckPrecicely || privateAccess() || mOwnerName.equals("")) if (mOwnerName.equals("")&&isServerSide()) setOwnerName(aPlayer.getDisplayName()); else if (privateAccess() && !aPlayer.getDisplayName().equals("Player") && !mOwnerName.equals("Player") && !mOwnerName.equals(aPlayer.getDisplayName())) return false; return true;}

View file

@ -8,6 +8,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Map;
import net.minecraftforge.common.ForgeVersion;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
@ -17,6 +18,7 @@ import net.minecraftforge.fluids.FluidStack;
public class GT_FluidStack extends FluidStack {
private static final Collection<GT_FluidStack> sAllFluidStacks = new ArrayList<GT_FluidStack>(5000);
private Fluid mFluid;
private static boolean lock=false;
public GT_FluidStack(Fluid aFluid, int aAmount) {
super(aFluid, aAmount);
@ -29,18 +31,25 @@ public class GT_FluidStack extends FluidStack {
}
public static void fixAllThoseFuckingFluidIDs() {
if(ForgeVersion.getBuildVersion()<1355){
while(lock){try {Thread.sleep(1);} catch (InterruptedException e) {}}
lock=true;
for (GT_FluidStack tFluid : sAllFluidStacks) tFluid.fixFluidIDForFucksSake();
for (Map<Fluid, ?> tMap : GregTech_API.sFluidMappings) try {GT_Utility.reMap(tMap);} catch(Throwable e) {e.printStackTrace(GT_Log.err);}
lock=false;}
}
public void fixFluidIDForFucksSake() {
int fluidID = this.getFluid().getID();
try {fluidID = mFluid.getID();} catch(Throwable e) {fluidID = -1;}
if(ForgeVersion.getBuildVersion()<1355){
int fluidID;
try {fluidID = this.getFluid().getID();} catch(Throwable e){System.err.println(e);}
try {fluidID = mFluid.getID();} catch(Throwable e) {fluidID = -1;}}
}
@Override
public FluidStack copy() {
fixFluidIDForFucksSake();
if(ForgeVersion.getBuildVersion()<1355){
fixFluidIDForFucksSake();}
return new GT_FluidStack(this);
}
}

View file

@ -963,6 +963,7 @@ public class GT_Utility {
public static boolean addSimpleIC2MachineRecipe(ItemStack aInput, Map<IRecipeInput, RecipeOutput> aRecipeList, NBTTagCompound aNBT, Object... aOutput) {
if (isStackInvalid(aInput) || aOutput.length == 0 || aRecipeList == null) return F;
ItemData tOreName = GT_OreDictUnificator.getAssociation(aInput);
for(int i = 0;i<aOutput.length;i++){if(aOutput[i]==null){System.out.println("EmptyIC2Output!"+aInput.getUnlocalizedName());return F;}}
if (tOreName != null) {
aRecipeList.put(new RecipeInputOreDict(tOreName.toString(), aInput.stackSize), new RecipeOutput(aNBT, GT_OreDictUnificator.getStackArray(T, aOutput)));
} else {

File diff suppressed because it is too large Load diff

View file

@ -299,7 +299,7 @@
if((aDuration = GregTech_API.sRecipeFile.get("distillation", aInput.getUnlocalizedName(), aDuration))<=0){
return false;
}
GT_Recipe.GT_Recipe_Map.sDistillationRecipes.addRecipe(true, null,new ItemStack[]{ aOutput2}, null, new FluidStack[]{ aInput}, aOutputs, Math.min(aDuration,16), Math.max(1, aEUt), 0);
GT_Recipe.GT_Recipe_Map.sDistillationRecipes.addRecipe(false, null,new ItemStack[]{ aOutput2}, null, new FluidStack[]{ aInput}, aOutputs, Math.max(1, aDuration), Math.max(1, aEUt), 0);
return false;
}
/* 293: */

View file

@ -62,6 +62,7 @@ import gregtech.common.covers.GT_Cover_RedstoneTransmitterInternal;
/* 54: */ import java.util.List;
import cpw.mods.fml.common.Loader;
/* 55: */ import net.minecraft.block.Block;
/* 56: */ import net.minecraft.enchantment.Enchantment;
/* 57: */ import net.minecraft.entity.item.EntityItem;
@ -72,6 +73,7 @@ import gregtech.common.covers.GT_Cover_RedstoneTransmitterInternal;
/* 62: */ import net.minecraft.potion.Potion;
/* 63: */ import net.minecraft.util.MathHelper;
/* 64: */ import net.minecraft.world.World;
import net.minecraftforge.common.ForgeModContainer;
/* 65: */
/* 66: */ public class GT_MetaGenerated_Item_01
/* 67: */ extends GT_MetaGenerated_Item_X32
@ -369,6 +371,18 @@ import gregtech.common.covers.GT_Cover_RedstoneTransmitterInternal;
/* 359: */
/* 360:328 */ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Platinum, 2L), new ItemStack(Items.flint, 1), ItemList.Tool_Lighter_Platinum_Empty.get(1L, new Object[0]), 256, 256);
/* 361: */
if(Loader.isModLoaded("GalacticraftMars")){
ItemList.Ingot_Heavy1.set(addItem(tLastID = 462, "Heavy Duty Alloy Ingot", "Used to make Heavy Duty Plates", new Object[0]));
ItemList.Ingot_Heavy2.set(addItem(tLastID = 463, "Heavy Duty Alloy Ingot T2", "Used to make Heavy Duty Plates T2", new Object[0]));
ItemList.Ingot_Heavy3.set(addItem(tLastID = 464, "Heavy Duty Alloy Ingot T3", "Used to make Heavy Duty Plates T3", new Object[0]));
GT_ModHandler.addCraftingRecipe(ItemList.Ingot_Heavy1.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { "BhB", "CAS", "B B", 'B', OrePrefixes.bolt.get(Materials.StainlessSteel), 'C', OrePrefixes.compressed.get(Materials.Bronze), 'A', OrePrefixes.compressed.get(Materials.Aluminium), 'S', OrePrefixes.compressed.get(Materials.Steel) });
GT_Values.RA.addImplosionRecipe(ItemList.Ingot_Heavy1.get(1L, new Object[0]), 8, GT_ModHandler.getModItem("GalacticraftCore", "item.heavyPlating", 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.StainlessSteel, 2L));
GT_ModHandler.addCraftingRecipe(ItemList.Ingot_Heavy2.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { " BB", "hPC", " BB", 'B', OrePrefixes.bolt.get(Materials.Tungsten), 'C', OrePrefixes.compressed.get(Materials.MeteoricIron), 'P', GT_ModHandler.getModItem("GalacticraftCore", "item.heavyPlating", 1L)});
GT_Values.RA.addImplosionRecipe(ItemList.Ingot_Heavy2.get(1L, new Object[0]), 8, GT_ModHandler.getModItem("GalacticraftMars", "item.null", 1L,3), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Tungsten, 2L));
GT_ModHandler.addCraftingRecipe(ItemList.Ingot_Heavy3.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { " BB", "hPC", " BB", 'B', OrePrefixes.bolt.get(Materials.TungstenSteel), 'C', OrePrefixes.compressed.get(Materials.Desh), 'P', GT_ModHandler.getModItem("GalacticraftMars", "item.null", 1L,3)});
GT_Values.RA.addImplosionRecipe(ItemList.Ingot_Heavy3.get(1L, new Object[0]), 8, GT_ModHandler.getModItem("GalacticraftMars", "item.itemBasicAsteroids", 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.TungstenSteel, 2L));
}
/* 362:330 */ ItemList.Ingot_IridiumAlloy.set(addItem(tLastID = 480, "Iridium Alloy Ingot", "Used to make Iridium Plates", new Object[] { new TC_Aspects.TC_AspectStack(TC_Aspects.TUTAMEN, 4L), new TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 4L) }));
/* 363: */
/* 364:332 */ GT_ModHandler.addRollingMachineRecipe(ItemList.Ingot_IridiumAlloy.get(1L, new Object[0]), new Object[] { "IAI", "ADA", "IAI", Character.valueOf('D'), GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "iridiumplate", true) ? OreDictNames.craftingIndustrialDiamond : OrePrefixes.dust.get(Materials.Diamond), Character.valueOf('A'), OrePrefixes.plateAlloy.get("Advanced"), Character.valueOf('I'), OrePrefixes.plate.get(Materials.Iridium) });

View file

@ -9,6 +9,7 @@ import net.minecraft.block.Block;
import net.minecraft.entity.item.EntityEnderCrystal;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
import gregtech.api.enums.Textures;
@ -95,12 +96,16 @@ import gregtech.api.util.GT_Utility;
//Energyzed node
if(isThaumcraftLoaded){
try{
int fire = VisNetHandler.drainVis(this.getBaseMetaTileEntity().getWorld(), this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), Aspect.FIRE, 1000);
int earth = VisNetHandler.drainVis(this.getBaseMetaTileEntity().getWorld(), this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), Aspect.EARTH, 1000);
int air = VisNetHandler.drainVis(this.getBaseMetaTileEntity().getWorld(), this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), Aspect.AIR, 1000);
int destruction = VisNetHandler.drainVis(this.getBaseMetaTileEntity().getWorld(), this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), Aspect.ENTROPY, 1000);
int order = VisNetHandler.drainVis(this.getBaseMetaTileEntity().getWorld(), this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), Aspect.ORDER, 1000);
int water = VisNetHandler.drainVis(this.getBaseMetaTileEntity().getWorld(), this.getBaseMetaTileEntity().getXCoord(), this.getBaseMetaTileEntity().getYCoord(), this.getBaseMetaTileEntity().getZCoord(), Aspect.WATER, 1000);
World tmpWorld = this.getBaseMetaTileEntity().getWorld();
int tmpX = this.getBaseMetaTileEntity().getXCoord();
int tmpY = this.getBaseMetaTileEntity().getYCoord();
int tmpZ = this.getBaseMetaTileEntity().getZCoord();
int fire = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.FIRE, 1000);
int earth = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.EARTH, 1000);
int air = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.AIR, 1000);
int destruction = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.ENTROPY, 1000);
int order = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.ORDER, 1000);
int water = VisNetHandler.drainVis(tmpWorld, tmpX, tmpY, tmpZ, Aspect.WATER, 1000);
int visEU = (int) (Math.pow(fire, 4)+Math.pow(earth, 4)+Math.pow(air, 4)+Math.pow(destruction, 4)+Math.pow(order, 4)+Math.pow(water, 4));
getBaseMetaTileEntity().increaseStoredEnergyUnits(Math.min(maxEUOutput(), visEU*getEfficiency()/this.sEnergyFromVis), false);
}catch (Throwable e){}
@ -121,7 +126,9 @@ import gregtech.api.util.GT_Utility;
public boolean hasEgg()
{
return Blocks.dragon_egg == getBaseMetaTileEntity().getBlockOffset(0, 1, 0);
Block above = getBaseMetaTileEntity().getBlockOffset(0, 1, 0);
if(above==null||Blocks.air==above){return false;}
return Blocks.dragon_egg == above || above.getUnlocalizedName().equals("tile.dragonEgg");
}
/* 43: */
/* 44: */ public int getEfficiency()

View file

@ -1,6 +1,7 @@
/* 1: */ package gregtech.common.tileentities.machines.basic;
/* 2: */
/* 3: */ import gregtech.api.enums.ItemList;
/* 3: */ import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Textures;
/* 4: */ import gregtech.api.enums.Textures.BlockIcons;
/* 5: */ import gregtech.api.interfaces.ITexture;
@ -91,15 +92,17 @@ import gregtech.api.util.GT_Recipe;
/* 89:71 */ return 0;
/* 90: */ }
/* 91: */
/* 92: */ public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack)
/* 93: */ {
/* 94:76 */ if (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack))
/* 95: */ {
/* 96:76 */ if (((getInputSlot() == aIndex) || (!ItemList.Crate_Empty.isStackEqual(aStack))) && (!ItemList.Schematic_1by1.isStackEqual(getInputAt(1))) && (!ItemList.Schematic_2by2.isStackEqual(getInputAt(1))) && (!ItemList.Schematic_3by3.isStackEqual(getInputAt(1)))) {}
/* 97:76 */ 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;
/* 98: */ }
/* 99:77 */ return false;
/* :0: */ }
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack)
{
if(super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack))
return getInputSlot() != aIndex && ItemList.Crate_Empty.isStackEqual(aStack) || ItemList.Schematic_1by1.isStackEqual(getInputAt(1)) || ItemList.Schematic_2by2.isStackEqual(getInputAt(1)) || ItemList.Schematic_3by3.isStackEqual(getInputAt(1)) || gregtech.api.util.GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.findRecipe(getBaseMetaTileEntity(), true, GT_Values.V[mTier], null, new ItemStack[] {
GT_Utility.copyAmount(64L, new Object[] {
aStack
}), getInputAt(1)
}) != null;
else
return false;
}
/* :1: */ }

View file

@ -0,0 +1,374 @@
package gregtech.common.tileentities.machines.basic;
import static gregtech.api.enums.GT_Values.V;
import java.util.ArrayList;
import java.util.Iterator;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.ChunkPosition;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidBlock;
import gregtech.api.enums.Textures;
import gregtech.api.gui.GT_Container_BasicTank;
import gregtech.api.gui.GT_GUIContainer_BasicTank;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.BaseTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
public ArrayList<ChunkPosition> mPumpList = new ArrayList();
public int mPumpTimer = 0;
public int mPumpCountBelow = 0;
public Block mPumpedBlock1 = null;
public Block mPumpedBlock2 = null;
public GT_MetaTileEntity_Pump(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier, 3, "The best way of emptying Oceans!");
}
public GT_MetaTileEntity_Pump(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
super(aName, aTier, 3, aDescription,aTextures);
}
@Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_Pump(this.mName, this.mTier, this.mDescription, this.mTextures);
}
public void saveNBTData(NBTTagCompound aNBT) {
super.saveNBTData(aNBT);
aNBT.setString("mPumpedBlock1", this.mPumpedBlock1 == null ? "" : this.mPumpedBlock1.getUnlocalizedName());
aNBT.setString("mPumpedBlock2", this.mPumpedBlock2 == null ? "" : this.mPumpedBlock2.getUnlocalizedName());
}
public void loadNBTData(NBTTagCompound aNBT) {
super.loadNBTData(aNBT);
this.mPumpedBlock1 = Block.getBlockFromName(aNBT.getString("mPumpedBlock1"));
this.mPumpedBlock2 = Block.getBlockFromName(aNBT.getString("mPumpedBlock2"));
}
@Override
public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
return new GT_Container_BasicTank(aPlayerInventory, aBaseMetaTileEntity);
}
@Override
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
return new GT_GUIContainer_BasicTank(aPlayerInventory, aBaseMetaTileEntity, getLocalName());
}
@Override
public boolean doesFillContainers() {
return true;
}
@Override
public boolean doesEmptyContainers() {
return false;
}
@Override
public boolean canTankBeFilled() {
return false;
}
@Override
public boolean canTankBeEmptied() {
return true;
}
@Override
public boolean displaysItemStack() {
return true;
}
@Override
public boolean displaysStackSize() {
return false;
}
@Override
public boolean isFluidInputAllowed(FluidStack aFluid) {
return false;
}
@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
super.onPostTick(aBaseMetaTileEntity, aTick);
if (getBaseMetaTileEntity().isServerSide()) {
this.mPumpTimer -= 1;
if ((getBaseMetaTileEntity() instanceof BaseTileEntity)) {
((BaseTileEntity) getBaseMetaTileEntity()).ignoreUnloadedChunks = false;
}
this.doTickProfilingInThisTick = true;
this.mPumpCountBelow = 0;
IGregTechTileEntity tTileEntity;
for (int i = 1; (i < 21) && ((tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance((byte) 0, i)) != null)
&& (tTileEntity.getMetaTileEntity() != null) && ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Pump)); i++) {
getBaseMetaTileEntity().setActive(tTileEntity.isActive());
this.mPumpCountBelow += 1;
((GT_MetaTileEntity_Pump) tTileEntity.getMetaTileEntity()).mPumpTimer -= 1;
}
if (this.mPumpCountBelow <= 0) {
if ((getBaseMetaTileEntity().isAllowedToWork()) && (getBaseMetaTileEntity().isUniversalEnergyStored(16*((int)Math.pow(4, this.mTier))))
&& ((this.mFluid == null) || (this.mFluid.amount + 1000 <= getCapacity()))) {
boolean tMovedOneDown = false;
if ((this.mPumpList.isEmpty()) && (getBaseMetaTileEntity().getTimer() % 100L == 0L)) {
tMovedOneDown = moveOneDown();
}
if ((GT_Utility.isBlockInvalid(this.mPumpedBlock1)) || (GT_Utility.isBlockInvalid(this.mPumpedBlock2))) {
getFluidAt(getBaseMetaTileEntity().getXCoord(), getYOfPumpHead() - 1, getBaseMetaTileEntity().getZCoord());
if ((GT_Utility.isBlockInvalid(this.mPumpedBlock1)) || (GT_Utility.isBlockInvalid(this.mPumpedBlock2))) {
getFluidAt(getBaseMetaTileEntity().getXCoord(), getYOfPumpHead(), getBaseMetaTileEntity().getZCoord() + 1);
}
if ((GT_Utility.isBlockInvalid(this.mPumpedBlock1)) || (GT_Utility.isBlockInvalid(this.mPumpedBlock2))) {
getFluidAt(getBaseMetaTileEntity().getXCoord(), getYOfPumpHead(), getBaseMetaTileEntity().getZCoord() - 1);
}
if ((GT_Utility.isBlockInvalid(this.mPumpedBlock1)) || (GT_Utility.isBlockInvalid(this.mPumpedBlock2))) {
getFluidAt(getBaseMetaTileEntity().getXCoord() + 1, getYOfPumpHead(), getBaseMetaTileEntity().getZCoord());
}
if ((GT_Utility.isBlockInvalid(this.mPumpedBlock1)) || (GT_Utility.isBlockInvalid(this.mPumpedBlock2))) {
getFluidAt(getBaseMetaTileEntity().getXCoord() - 1, getYOfPumpHead(), getBaseMetaTileEntity().getZCoord());
}
} else if (getYOfPumpHead() < getBaseMetaTileEntity().getYCoord()) {
if ((tMovedOneDown) || ((this.mPumpList.isEmpty()) && (getBaseMetaTileEntity().getTimer() % 200L == 100L)) || (getBaseMetaTileEntity().getTimer() % 72000L == 100L)) {
this.mPumpList.clear();
int y = getBaseMetaTileEntity().getYCoord() - 1;
for (int yHead = getYOfPumpHead(); (this.mPumpList.isEmpty()) && (y >= yHead); y--) {
scanForFluid(getBaseMetaTileEntity().getXCoord(), y, getBaseMetaTileEntity().getZCoord(), this.mPumpList, getBaseMetaTileEntity().getXCoord(), getBaseMetaTileEntity().getZCoord(), 8*((int)Math.pow(2, this.mTier)));
}
}
if ((!tMovedOneDown) && (this.mPumpTimer <= 0)) {
while ((!this.mPumpList.isEmpty())
&& (!consumeFluid(((ChunkPosition) this.mPumpList.get(this.mPumpList.size() - 1)).chunkPosX,
((ChunkPosition) this.mPumpList.get(this.mPumpList.size() - 1)).chunkPosY,
((ChunkPosition) this.mPumpList.remove(this.mPumpList.size() - 1)).chunkPosZ))) {
}
this.mPumpTimer = 160/((int)Math.pow(2, this.mTier));
}
}
}
getBaseMetaTileEntity().setActive(!this.mPumpList.isEmpty());
}
}
}
private boolean moveOneDown() {
if ((this.mInventory[0] == null) || (this.mInventory[0].stackSize < 1)
|| (!GT_Utility.areStacksEqual(this.mInventory[0], GT_ModHandler.getIC2Item("miningPipe", 1L)))) {
return false;
}
int yHead = getYOfPumpHead();
if (yHead <= 0) {
return false;
}
if ((!consumeFluid(getBaseMetaTileEntity().getXCoord(), yHead - 1, getBaseMetaTileEntity().getZCoord()))
&& (!getBaseMetaTileEntity().getAir(getBaseMetaTileEntity().getXCoord(), yHead - 1, getBaseMetaTileEntity().getZCoord()))) {
return false;
}
if (!(getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord(), yHead - 1, getBaseMetaTileEntity().getZCoord(),GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))))) {
return false;
}
if (yHead != getBaseMetaTileEntity().getYCoord()) {
getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord(), yHead, getBaseMetaTileEntity().getZCoord(),GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipe", 1L)));
}
getBaseMetaTileEntity().decrStackSize(0, 1);
return true;
}
private int getYOfPumpHead() {
int y = getBaseMetaTileEntity().getYCoord() - 1;
while (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord(), y, getBaseMetaTileEntity().getZCoord()) == GT_Utility
.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipe", 1L))) {
y--;
}
if (y == getBaseMetaTileEntity().getYCoord() - 1) {
if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord(), y, getBaseMetaTileEntity().getZCoord()) != GT_Utility
.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))) {
return y + 1;
}
} else if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord(), y, getBaseMetaTileEntity().getZCoord()) != GT_Utility
.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))) {
getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord(), y, getBaseMetaTileEntity().getZCoord(),
GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L)));
}
return y;
}
private void scanForFluid(int aX, int aY, int aZ, ArrayList<ChunkPosition> aList, int mX, int mZ, int mDist) {
doTickProfilingInThisTick = false;
ArrayList tList1 = new ArrayList();
ArrayList tList2 = new ArrayList();
tList1.add(new ChunkPosition(aX, aY, aZ));
while(!tList1.isEmpty())
{
Iterator i$ = tList1.iterator();
do
{
if(!i$.hasNext())
break;
ChunkPosition tPos = (ChunkPosition)i$.next();
if(tPos.chunkPosX < mX + mDist)
addToFirstListIfFluidAndNotAlreadyAddedToAnyOfTheLists(tPos.chunkPosX + 1, tPos.chunkPosY, tPos.chunkPosZ, tList2, aList);
if(tPos.chunkPosX > mX - mDist)
addToFirstListIfFluidAndNotAlreadyAddedToAnyOfTheLists(tPos.chunkPosX - 1, tPos.chunkPosY, tPos.chunkPosZ, tList2, aList);
if(tPos.chunkPosZ < mZ + mDist)
addToFirstListIfFluidAndNotAlreadyAddedToAnyOfTheLists(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ + 1, tList2, aList);
if(tPos.chunkPosZ > mZ - mDist)
addToFirstListIfFluidAndNotAlreadyAddedToAnyOfTheLists(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ - 1, tList2, aList);
addToFirstListIfFluidAndNotAlreadyAddedToAnyOfTheLists(tPos.chunkPosX, tPos.chunkPosY + 1, tPos.chunkPosZ, tList2, aList);
ChunkPosition tCoordinate = new ChunkPosition(aX, aY + 1, aZ);
if(tPos.chunkPosX == mX && tPos.chunkPosZ == mZ && tPos.chunkPosY < getBaseMetaTileEntity().getYCoord() && !aList.contains(tCoordinate) && !tList2.contains(tCoordinate))
tList2.add(tCoordinate);
} while(true);
aList.addAll(tList2);
tList1 = tList2;
tList2 = new ArrayList();
}
for(int y = getBaseMetaTileEntity().getYCoord(); y >= aY; y--)
aList.remove(new ChunkPosition(aX, y, aZ));
}
private boolean addToFirstListIfFluidAndNotAlreadyAddedToAnyOfTheLists(int aX, int aY, int aZ, ArrayList<ChunkPosition> aList1,
ArrayList<ChunkPosition> aList2) {
ChunkPosition tCoordinate = new ChunkPosition(aX, aY, aZ);
if ((!aList1.contains(tCoordinate)) && (!aList2.contains(tCoordinate))) {
Block aBlock = getBaseMetaTileEntity().getBlock(aX, aY, aZ);
if ((this.mPumpedBlock1 == aBlock) || (this.mPumpedBlock2 == aBlock)) {
aList1.add(tCoordinate);
return true;
}
}
return false;
}
private void getFluidAt(int aX, int aY, int aZ) {
Block aBlock = getBaseMetaTileEntity().getBlock(aX, aY, aZ);
if (GT_Utility.isBlockValid(aBlock)) {
if ((aBlock == Blocks.water) || (aBlock == Blocks.flowing_water)) {
this.mPumpedBlock1 = Blocks.water;
this.mPumpedBlock2 = Blocks.flowing_water;
return;
}
if ((aBlock == Blocks.lava) || (aBlock == Blocks.flowing_lava)) {
this.mPumpedBlock1 = Blocks.lava;
this.mPumpedBlock2 = Blocks.flowing_lava;
return;
}
if ((aBlock instanceof IFluidBlock)) {
this.mPumpedBlock1 = aBlock;
this.mPumpedBlock2 = aBlock;
return;
}
}
this.mPumpedBlock1 = null;
this.mPumpedBlock2 = null;
}
private boolean consumeFluid(int aX, int aY, int aZ) {
Block aBlock = getBaseMetaTileEntity().getBlock(aX, aY, aZ);
int aMeta = getBaseMetaTileEntity().getMetaID(aX, aY, aZ);
if ((GT_Utility.isBlockValid(aBlock)) && ((this.mPumpedBlock1 == aBlock) || (this.mPumpedBlock2 == aBlock))) {
if ((aBlock == Blocks.water) || (aBlock == Blocks.flowing_water)) {
if (aMeta == 0) {
if (this.mFluid == null) {
getBaseMetaTileEntity().decreaseStoredEnergyUnits(16*((int)Math.pow(4, this.mTier)), true);
this.mFluid = GT_ModHandler.getWater(1000L);
} else if (GT_ModHandler.isWater(this.mFluid)) {
getBaseMetaTileEntity().decreaseStoredEnergyUnits(16*((int)Math.pow(4, this.mTier)), true);
this.mFluid.amount += 1000;
} else {
return false;
}
} else {
getBaseMetaTileEntity().decreaseStoredEnergyUnits(4*((int)Math.pow(4, this.mTier)), true);
}
}
if ((aBlock == Blocks.lava) || (aBlock == Blocks.flowing_lava)) {
if (aMeta == 0) {
if (this.mFluid == null) {
getBaseMetaTileEntity().decreaseStoredEnergyUnits(16*((int)Math.pow(4, this.mTier)), true);
this.mFluid = GT_ModHandler.getLava(1000L);
} else if (GT_ModHandler.isLava(this.mFluid)) {
getBaseMetaTileEntity().decreaseStoredEnergyUnits(16*((int)Math.pow(4, this.mTier)), true);
this.mFluid.amount += 1000;
} else {
return false;
}
} else {
getBaseMetaTileEntity().decreaseStoredEnergyUnits(4*((int)Math.pow(4, this.mTier)), true);
}
}
if ((aBlock instanceof IFluidBlock)) {
if (this.mFluid == null) {
this.mFluid = ((IFluidBlock) aBlock).drain(getBaseMetaTileEntity().getWorld(), aX, aY, aZ, true);
getBaseMetaTileEntity().decreaseStoredEnergyUnits(this.mFluid == null ? 1000 : this.mFluid.amount, true);
} else {
return false;
}
}
getBaseMetaTileEntity().getWorld().setBlock(aX, aY, aZ,Blocks.air,0,2);
return true;
}
return false;
}
@Override
public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
if (aBaseMetaTileEntity.isClientSide()) return true;
aBaseMetaTileEntity.openGUI(aPlayer);
return true;
}
@Override public boolean isSimpleMachine() {return false;}
@Override public boolean isOverclockerUpgradable() {return false;}
@Override public boolean isTransformerUpgradable() {return false;}
@Override public boolean isElectric() {return true;}
@Override public boolean isFacingValid(byte aFacing) {return true;}
@Override public boolean isEnetInput() {return true;}
@Override public boolean isInputFacing(byte aSide) {return true;}
@Override public boolean isOutputFacing(byte aSide) {return false;}
@Override public boolean isTeleporterCompatible() {return false;}
@Override public long getMinimumStoredEU() {return V[mTier]*16;}
@Override public long maxEUStore() {return V[mTier]*64;}
@Override public long maxEUInput() {return V[mTier];}
@Override public long maxSteamStore() {return maxEUStore();}
@Override public long maxAmperesIn() {return 2;}
@Override public int getStackDisplaySlot() {return 2;}
@Override public boolean isAccessAllowed(EntityPlayer aPlayer) {return true;}
@Override
public int getCapacity() {
return 16000*this.mTier;
}
@Override
public int getTankPressure() {
return 100;
}
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex+1], (aSide == 0||aSide ==1) ? null : new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP) };
}
@Override
public ITexture[] getTexturesActive(ITexture aBaseTexture) {
return getTexturesInactive(aBaseTexture);
}
@Override
public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
return new ITexture[] {
new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP),new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP),
new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP),new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP),};
}
}

View file

@ -0,0 +1,301 @@
package gregtech.common.tileentities.machines.basic;
import static gregtech.api.enums.GT_Values.V;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityHanging;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.boss.EntityDragonPart;
import net.minecraft.entity.effect.EntityWeatherEffect;
import net.minecraft.entity.item.EntityBoat;
import net.minecraft.entity.item.EntityEnderCrystal;
import net.minecraft.entity.item.EntityEnderEye;
import net.minecraft.entity.item.EntityFireworkRocket;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.item.EntityMinecart;
import net.minecraft.entity.item.EntityTNTPrimed;
import net.minecraft.entity.item.EntityXPOrb;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.entity.projectile.EntityFireball;
import net.minecraft.entity.projectile.EntityFishHook;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.init.Blocks;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import gregtech.api.enums.ConfigCategories;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Config;
import gregtech.api.util.GT_Utility;
public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_Hatch{
public int mTargetX = 0;
public int mTargetY = 0;
public int mTargetZ = 0;
public int mTargetD = 0;
public int mCharge = 0;
public boolean mDebug = false;
public boolean hasEgg = false;
public static boolean sInterDimensionalTeleportAllowed = true;
public GT_MetaTileEntity_Teleporter(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier, 3, "Teleport long distances with this little device.");
}
public GT_MetaTileEntity_Teleporter(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
super(aName, aTier, 3, aDescription,aTextures);
}
@Override public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {return true;}
@Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_Teleporter(this.mName, this.mTier, this.mDescription, this.mTextures);
}
public String[] getInfoData()
{
return new String[] { "Charge:", this.mCharge + " EU", "Coordinates:", "X: " + this.mTargetX, "Y: " + this.mTargetY, "Z: " + this.mTargetZ, "Dimension: " + this.mTargetD };
}
@Override public ITexture[] getTexturesActive(ITexture aBaseTexture) {return null;}
@Override public ITexture[] getTexturesInactive(ITexture aBaseTexture) {return null;}
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex+1], (aSide !=1) ? null : aActive ? new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE) : new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER) };
}
public void saveNBTData(NBTTagCompound aNBT)
{
aNBT.setInteger("mTargetX", this.mTargetX);
aNBT.setInteger("mTargetY", this.mTargetY);
aNBT.setInteger("mTargetZ", this.mTargetZ);
aNBT.setInteger("mTargetD", this.mTargetD);
aNBT.setInteger("mCharge", this.mCharge);
aNBT.setBoolean("mDebug", this.mDebug);
}
public void loadNBTData(NBTTagCompound aNBT)
{
this.mTargetX = aNBT.getInteger("mTargetX");
this.mTargetY = aNBT.getInteger("mTargetY");
this.mTargetZ = aNBT.getInteger("mTargetZ");
this.mTargetD = aNBT.getInteger("mTargetD");
this.mCharge = aNBT.getInteger("mCharge");
this.mDebug = aNBT.getBoolean("mDebug");
}
public void onConfigLoad(GT_Config aConfig)
{
sInterDimensionalTeleportAllowed = aConfig.get(ConfigCategories.machineconfig, "Teleporter.Interdimensional", true);
}
public void onFirstTick()
{
if (getBaseMetaTileEntity().isServerSide())
{
if ((this.mTargetX == 0) && (this.mTargetY == 0) && (this.mTargetZ == 0) && (this.mTargetD == 0))
{
this.mTargetX = getBaseMetaTileEntity().getXCoord();
this.mTargetY = getBaseMetaTileEntity().getYCoord();
this.mTargetZ = getBaseMetaTileEntity().getZCoord();
this.mTargetD = getBaseMetaTileEntity().getWorld().provider.dimensionId;
}
this.hasEgg = checkForEgg();
}
}
public boolean checkForEgg()
{
for (byte i = -5; i <= 5; i = (byte)(i + 1)) {
for (byte j = -5; j <= 5; j = (byte)(j + 1)) {
for (byte k = -5; k <= 5; k = (byte)(k + 1)) {
if (getBaseMetaTileEntity().getBlockOffset(i, j, k) == Blocks.dragon_egg) {
return true;
}
}
}
}
return false;
}
public boolean hasDimensionalTeleportCapability()
{
return (this.mDebug) || (this.hasEgg);
}
public boolean isDimensionalTeleportAvailable()
{
return (this.mDebug) || ((hasDimensionalTeleportCapability()) && (GT_Utility.isRealDimension(this.mTargetD)) && (GT_Utility.isRealDimension(getBaseMetaTileEntity().getWorld().provider.dimensionId)));
}
public void onPostTick()
{
if (getBaseMetaTileEntity().isServerSide())
{
if (getBaseMetaTileEntity().getTimer() % 100L == 50L) {
this.hasEgg = checkForEgg();
}
if ((getBaseMetaTileEntity().isAllowedToWork()) && (getBaseMetaTileEntity().getRedstone()))
{
this.mCharge -= 8192;
if (this.mCharge < 0) {
this.mCharge = 0;
}
int tDistance = distanceCalculation();int tCost = 0;
for (Object tObject : getBaseMetaTileEntity().getWorld().getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 2) - 1, getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 2) - 1, getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 2) - 1, getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 2) + 2, getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 2) + 2, getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 2) + 2))) {
if (((tObject instanceof Entity)) && (!((Entity)tObject).isDead))
{
Entity tEntity = (Entity)tObject;
if (((this.mCharge >= (tCost = (int)(tDistance * tDistance * weightCalculation(tEntity)))) && (tCost >= 0)) || (this.mDebug))
{
if (!this.mDebug) {
this.mCharge -= tCost;
}
if (tEntity.ridingEntity != null) {
tEntity.mountEntity(null);
}
if (tEntity.riddenByEntity != null) {
tEntity.riddenByEntity.mountEntity(null);
}
if ((this.mTargetD == getBaseMetaTileEntity().getWorld().provider.dimensionId) || (!isDimensionalTeleportAvailable()) || (!GT_Utility.moveEntityToDimensionAtCoords(tEntity, this.mTargetD, this.mTargetX + 0.5D, this.mTargetY + 0.5D, this.mTargetZ + 0.5D))) {
if ((tEntity instanceof EntityLivingBase)) {
((EntityLivingBase)tEntity).setPosition(this.mTargetX + 0.5D, this.mTargetY + 0.5D, this.mTargetZ + 0.5D);
} else {
tEntity.setPosition(this.mTargetX + 0.5D, this.mTargetY + 0.5D, this.mTargetZ + 0.5D);
}
}
}
else
{
long tCharge = getBaseMetaTileEntity().getUniversalEnergyStored();
if ((tCharge > 0) && (this.mCharge + tCharge > 0))
{
this.mCharge += tCharge;
getBaseMetaTileEntity().decreaseStoredEnergyUnits(tCharge, true);
}
}
}
}
getBaseMetaTileEntity().setActive(true);
}
else
{
getBaseMetaTileEntity().setActive(false);
}
}
}
private int distanceCalculation()
{
return Math.abs(((this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId) && (isDimensionalTeleportAvailable()) ? 100 : 1) * (int)Math.sqrt(Math.pow(getBaseMetaTileEntity().getXCoord() - this.mTargetX, 2.0D) + Math.pow(getBaseMetaTileEntity().getYCoord() - this.mTargetY, 2.0D) + Math.pow(getBaseMetaTileEntity().getZCoord() - this.mTargetZ, 2.0D)));
}
private static float weightCalculation(Entity aEntity)
{
try
{
if ((aEntity instanceof EntityFX)) {
return -1.0F;
}
}
catch (Throwable e) {}
if ((aEntity instanceof EntityFishHook)) {
return -1.0F;
}
if ((aEntity instanceof EntityDragonPart)) {
return -1.0F;
}
if ((aEntity instanceof EntityWeatherEffect)) {
return -1.0F;
}
if ((aEntity instanceof EntityPlayer))
{
EntityPlayer tPlayer = (EntityPlayer)aEntity;
int tCount = 64;
for (int i = 0; i < 36; i++) {
if (tPlayer.inventory.getStackInSlot(i) != null) {
tCount += (tPlayer.inventory.getStackInSlot(i).getMaxStackSize() > 1 ? tPlayer.inventory.getStackInSlot(i).stackSize : 64);
}
}
for (int i = 0; i < 4; i++) {
if (tPlayer.inventory.armorInventory[i] != null) {
tCount += 256;
}
}
return Math.min(5.0F, tCount / 666.6F);
}
if (GT_Utility.getClassName(aEntity).equals("EntityItnt")) {
return 5.0F;
}
if (GT_Utility.getClassName(aEntity).equals("EntityNuke")) {
return 50.0F;
}
if ((aEntity instanceof EntityArrow)) {
return 0.001F;
}
if ((aEntity instanceof EntityBoat)) {
return 0.1F;
}
if ((aEntity instanceof EntityEnderCrystal)) {
return 2.0F;
}
if ((aEntity instanceof EntityEnderEye)) {
return 0.001F;
}
if ((aEntity instanceof EntityFireball)) {
return 0.001F;
}
if ((aEntity instanceof EntityFireworkRocket)) {
return 0.001F;
}
if ((aEntity instanceof EntityHanging)) {
return 0.005F;
}
if ((aEntity instanceof EntityItem)) {
return 0.001F;
}
if ((aEntity instanceof EntityLiving)) {
return 0.5F;
}
if ((aEntity instanceof EntityMinecart)) {
return 0.1F;
}
if ((aEntity instanceof EntityThrowable)) {
return 0.001F;
}
if ((aEntity instanceof EntityTNTPrimed)) {
return 5.0F;
}
if ((aEntity instanceof EntityXPOrb)) {
return 0.001F;
}
return -1.0F;
}
@Override public boolean isSimpleMachine() {return false;}
@Override public boolean isOverclockerUpgradable() {return false;}
@Override public boolean isTransformerUpgradable() {return false;}
@Override public boolean isElectric() {return true;}
@Override public boolean isFacingValid(byte aFacing) {return true;}
@Override public boolean isEnetInput() {return true;}
@Override public boolean isInputFacing(byte aSide) {return true;}
@Override public boolean isOutputFacing(byte aSide) {return false;}
@Override public boolean isTeleporterCompatible() {return false;}
@Override public long getMinimumStoredEU() {return V[mTier]*16;}
@Override public long maxEUStore() {return 100000000;}
@Override public long maxEUInput() {return V[mTier];}
@Override public long maxSteamStore() {return maxEUStore();}
@Override public long maxAmperesIn() {return 2;}
@Override public int getStackDisplaySlot() {return 2;}
@Override public boolean isAccessAllowed(EntityPlayer aPlayer) {return true;}
}

View file

@ -249,10 +249,8 @@ public boolean checkRecipe(ItemStack aStack) {
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.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);
@ -268,16 +266,16 @@ public boolean checkRecipe(ItemStack aStack) {
FluidStack tFluid = tRecipe.mFluidInputs[0];
if(tFluid!=null){
for(GT_MetaTileEntity_Hatch_Input tInput : this.mInputHatches){
if(tFluid.fluid !=null&& tInput.getFluid()!=null && tFluid.fluid.getID()==tInput.getFluid().getFluid().getID()&&tFluid.amount<=tInput.getFluid().amount){
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.fluid !=null&& tInput2.getFluid()!=null&&tFluid2.fluid.getID()==tInput2.getFluid().getFluid().getID()&&tFluid2.amount<=tInput2.getFluid().amount&&getMaxInputVoltage()>=tRecipe.mEUt&&this.mEUStore>=tRecipe.mSpecialValue){
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.mEUt = (tRecipe.mEUt*overclock(this.mLastRecipe.mEUt));
this.mMaxProgresstime = tRecipe.mDuration/overclock(this.mLastRecipe.mEUt);
this.mEfficiencyIncrease = 10000;
@ -355,11 +353,7 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
}
if (getRepairStatus() > 0) {
if (mMaxProgresstime > 0 && doRandomMaintenanceDamage()) {
if (aBaseMetaTileEntity.decreaseStoredEnergyUnits(mEUt, false)) {
if (!polluteEnvironment(getPollutionPerTick(mInventory[1]))) {
stopMachine();
}
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);
@ -371,7 +365,6 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
this.mEUStore=(int) aBaseMetaTileEntity.getStoredEU();
if (aBaseMetaTileEntity.isAllowedToWork()) checkRecipe(mInventory[1]);
}
}
} else {
if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity.hasInventoryBeenModified()) {
turnCasingActive(mMaxProgresstime>0);
@ -385,10 +378,12 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
}
}
} else {
this.mLastRecipe=null;
stopMachine();
}
} else {
turnCasingActive(false);
this.mLastRecipe=null;
stopMachine();
}
}
@ -401,6 +396,7 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
public boolean onRunningTick(ItemStack aStack) {
if (mEUt < 0) {
if (!drainEnergyInput(((long)-mEUt * 10000) / Math.max(1000, mEfficiency))) {
this.mLastRecipe=null;
stopMachine();
return false;
}

View file

@ -0,0 +1,179 @@
package gregtech.common.tileentities.machines.multi;
import net.minecraft.item.ItemStack;
import gregtech.api.GregTech_API;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
public class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_MultiBlockBase{
public GT_MetaTileEntity_LargeTurbine(int aID, String aName, String aNameRegional){super(aID, aName, aNameRegional);}
public GT_MetaTileEntity_LargeTurbine(String aName){super(aName);}
@Override
public String[] getDescription() {
return new String[]{"Consumes 1600 Liters of Steam per Tick"};
}
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex+1],new GT_RenderedTexture(Textures.BlockIcons.STEAM_TURBINE_SIDE)};
}
@Override
public boolean isCorrectMachinePart(ItemStack aStack) {
return getMaxEfficiency(aStack) > 0;
}
@Override
public boolean checkRecipe(ItemStack aStack) {
if (depleteInput(GT_ModHandler.getSteam(1600L)))
{
this.mEUt = 800;
this.mMaxProgresstime = 1;
if (ItemList.Component_Turbine_Bronze.isStackEqual(aStack, true, true)) {
this.mEfficiencyIncrease = (this.mMaxProgresstime * 10);
} else if (ItemList.Component_Turbine_Steel.isStackEqual(aStack, true, true)) {
this.mEfficiencyIncrease = (this.mMaxProgresstime * 20);
} else if (ItemList.Component_Turbine_Magnalium.isStackEqual(aStack, true, true)) {
this.mEfficiencyIncrease = (this.mMaxProgresstime * 50);
} else if (ItemList.Component_Turbine_TungstenSteel.isStackEqual(aStack, true, true)) {
this.mEfficiencyIncrease = (this.mMaxProgresstime * 15);
} else if (ItemList.Component_Turbine_Carbon.isStackEqual(aStack, true, true)) {
this.mEfficiencyIncrease = (this.mMaxProgresstime * 100);
} else {
this.mEfficiencyIncrease = (this.mMaxProgresstime * 20);
}
addOutput(GT_ModHandler.getWater(10L));
return true;
}
return false;
}
@Override
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
byte tSide = getBaseMetaTileEntity().getBackFacing();
if ((getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 1)) && (getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 2)))
{
int tAirCount = 0;
for (byte i = -1; i < 2; i = (byte)(i + 1)) {
for (byte j = -1; j < 2; j = (byte)(j + 1)) {
for (byte k = -1; k < 2; k = (byte)(k + 1)) {
if (getBaseMetaTileEntity().getAirOffset(i, j, k)) {
tAirCount++;
}
}
}
}
if (tAirCount != 10) {
return false;
}
for (byte i = 2; i < 6; i = (byte)(i + 1))
{
IGregTechTileEntity tTileEntity;
if ((null != (tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(i, 2))) &&
(tTileEntity.getFrontFacing() == getBaseMetaTileEntity().getFrontFacing()) && (tTileEntity.getMetaTileEntity() != null) &&
((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_LargeTurbine))) {
return false;
}
}
int tX = getBaseMetaTileEntity().getXCoord();int tY = getBaseMetaTileEntity().getYCoord();int tZ = getBaseMetaTileEntity().getZCoord();
for (byte i = -1; i < 2; i = (byte)(i + 1)) {
for (byte j = -1; j < 2; j = (byte)(j + 1)) {
if ((i != 0) || (j != 0)) {
for (byte k = 0; k < 4; k = (byte)(k + 1)) {
if (((i == 0) || (j == 0)) && ((k == 1) || (k == 2)))
{
if (getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide < 4 ? i : -k), tY + j, tZ + (tSide < 4 ? -k : tSide == 3 ? k : i)) == GregTech_API.sBlockCasings4)
{
if (getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide < 4 ? i : -k), tY + j, tZ + (tSide < 4 ? -k : tSide == 3 ? k : i)) == 13) {}
}
else if (!addToMachineList(getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? k : tSide < 4 ? i : -k), tY + j, tZ + (tSide < 4 ? -k : tSide == 3 ? k : i)))) {
return false;
}
}
else if (getBaseMetaTileEntity().getBlock(tX + (tSide == 5 ? k : tSide < 4 ? i : -k), tY + j, tZ + (tSide < 4 ? -k : tSide == 3 ? k : i)) == GregTech_API.sBlockCasings4)
{
if (getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide < 4 ? i : -k), tY + j, tZ + (tSide < 4 ? -k : tSide == 3 ? k : i)) == 13) {}
}
else {
return false;
}
}
}
}
}
this.mDynamoHatches.clear();
IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 3);
if ((tTileEntity != null) && (tTileEntity.getMetaTileEntity() != null)) {
if ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Dynamo)) {
this.mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo)tTileEntity.getMetaTileEntity());
} else {
return false;
}
}
}
else
{
return false;
}
return true;
}
private boolean addToMachineList(IGregTechTileEntity tTileEntity){
return ((!addMaintenanceToMachineList(tTileEntity, 11)) && (!addInputToMachineList(tTileEntity, 11)) && (!addOutputToMachineList(tTileEntity, 11)));
}
@Override
public int getDamageToComponent(ItemStack aStack) {
return GT_Utility.areStacksEqual(GT_ModHandler.getModItem("Railcraft","part.turbine.rotor", 1L, 32767), aStack) ? 2 : 1;
}
public int getMaxEfficiency(ItemStack aStack)
{
if (GT_Utility.isStackInvalid(aStack)) {
return 0;
}
if (ItemList.Component_Turbine_Bronze.isStackEqual(aStack, true, true)) {
return 6000;
}
if (ItemList.Component_Turbine_Steel.isStackEqual(aStack, true, true)) {
return 8000;
}
if (ItemList.Component_Turbine_Magnalium.isStackEqual(aStack, true, true)) {
return 10000;
}
if (ItemList.Component_Turbine_TungstenSteel.isStackEqual(aStack, true, true)) {
return 9000;
}
if (ItemList.Component_Turbine_Carbon.isStackEqual(aStack, true, true)) {
return 12500;
}
if (GT_Utility.areStacksEqual(aStack, GT_ModHandler.getModItem("Railcraft","part.turbine.rotor", 1L, 32767))) {
return 8000;
}
return 0;
}
@Override
public int getPollutionPerTick(ItemStack aStack) {return 0;}
@Override
public int getAmountOfOutputs() {return 0;}
@Override
public boolean explodesOnComponentBreak(ItemStack aStack) {return true;}
@Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {return new GT_MetaTileEntity_LargeTurbine(mName);}
}

View file

@ -117,9 +117,9 @@ public class GT_MetaTileEntity_QuantumChest extends GT_MetaTileEntity_TieredMach
}
if (this.mItemStack == null&&this.mInventory[0]!=null)
{
this.mItemStack = new ItemStack(mInventory[0].getItem());
this.mItemStack = mInventory[0].copy();
}
if ((this.mInventory[0]!=null)&&(this.mItemCount < getMaxItemCount()) && (this.mInventory[0].getItem() == this.mItemStack.getItem()))
if ((this.mInventory[0]!=null)&&(this.mItemCount < getMaxItemCount()) && GT_Utility.areStacksEqual(this.mInventory[0],this.mItemStack))
{
this.mItemCount += this.mInventory[0].stackSize;
if (this.mItemCount > getMaxItemCount())
@ -134,17 +134,18 @@ public class GT_MetaTileEntity_QuantumChest extends GT_MetaTileEntity_TieredMach
}
if (this.mInventory[1] == null)
{
this.mInventory[1] = new ItemStack(mItemStack.getItem(),Math.min(mItemStack.getMaxStackSize(), this.mItemCount));
this.mInventory[1] = mItemStack.copy();
this.mInventory[1].stackSize = Math.min(mItemStack.getMaxStackSize(), this.mItemCount);
this.mItemCount -= this.mInventory[1].stackSize;
}
else if ((this.mItemCount > 0) && (this.mInventory[1].getItem() == this.mItemStack.getItem())&&this.mInventory[1].getMaxStackSize()>this.mInventory[1].stackSize)
else if ((this.mItemCount > 0) && GT_Utility.areStacksEqual(this.mInventory[1],this.mItemStack)&&this.mInventory[1].getMaxStackSize()>this.mInventory[1].stackSize)
{
int tmp = Math.min(this.mItemCount, this.mInventory[1].getMaxStackSize()-this.mInventory[1].stackSize);
this.mInventory[1].stackSize += tmp;
this.mItemCount -= tmp;
}
if(this.mItemStack!=null){
this.mInventory[2]= new ItemStack(this.mItemStack.getItem());
this.mInventory[2]= this.mItemStack.copy();
}else{this.mInventory[2]=null;}
}
}

View file

@ -14,7 +14,7 @@ public class GT_MetaTileEntity_QuantumTank
extends GT_MetaTileEntity_BasicTank
{
public GT_MetaTileEntity_QuantumTank(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier, 3, "Stores "+((int)(Math.pow(6, aTier)*270000))+"L of fluid");
super(aID, aName, aNameRegional, aTier, 3, "Stores "+((int)(Math.pow(6, aTier)*267000))+"L of fluid");
}
public GT_MetaTileEntity_QuantumTank(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
@ -28,7 +28,7 @@ public class GT_MetaTileEntity_QuantumTank
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
return aSide ==1 ? new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex+1],new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SCREEN)} :new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex+1]};//aSide != aFacing ? mMachineBlock != 0 ? new ITexture[] {Textures.BlockIcons.CASING_BLOCKS[mMachineBlock]} : new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex+1]} : mMachineBlock != 0 ? aActive ? getTexturesActive(Textures.BlockIcons.CASING_BLOCKS[mMachineBlock]) : getTexturesInactive(Textures.BlockIcons.CASING_BLOCKS[mMachineBlock]) : aActive ? getTexturesActive(Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex+1]) : getTexturesInactive(Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex+1]);
return aSide ==1 ? new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex+1],new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SCREEN)} :new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex+1]};
}
@Override
@ -79,7 +79,7 @@ public class GT_MetaTileEntity_QuantumTank
@Override
public boolean displaysItemStack() {
return false;
return true;
}
@Override
@ -94,7 +94,7 @@ public class GT_MetaTileEntity_QuantumTank
@Override
public int getCapacity() {
return (int) (Math.pow(6, mTier)*270000);
return (int) (Math.pow(6, mTier)*267000);
}
@Override

View file

@ -51,7 +51,7 @@
/* */
/* 52 */ if (aMaterial.mFuelPower > 0) GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, new Object[] { aStack }), null, aMaterial.mFuelPower, aMaterial.mFuelType);
/* 53 */ GT_Utility.removeSimpleIC2MachineRecipe(GT_Utility.copyAmount(9L, new Object[] { aStack }), GT_ModHandler.getCompressorRecipeList(), GT_OreDictUnificator.get(OrePrefixes.plateDense, aMaterial, 1L));
/* 54 */ GT_ModHandler.addCompressionRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), GT_OreDictUnificator.get(OrePrefixes.compressed, aMaterial, 1L));
/* 54 */ GT_Values.RA.addImplosionRecipe(GT_Utility.copyAmount(2L, new Object[] { aStack }), 2 , GT_OreDictUnificator.get(OrePrefixes.compressed, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny,Materials.DarkAsh,1L));
/* 55 */ if (!aMaterial.contains(gregtech.api.enums.SubTag.NO_WORKING)) { GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, new Object[] { aStack }), GT_OreDictUnificator.get(OrePrefixes.lens, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1L), (int)Math.max(aMaterial.getMass() / 2L, 1L), 16);
/* */ }
/* 57 */ if (aMaterial == Materials.Paper) GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GregTech_API.sRecipeFile.get(gregtech.api.enums.ConfigCategories.Recipes.harderrecipes, aStack, true) ? 2L : 3L, new Object[] { aStack }), new Object[] { "XXX", Character.valueOf('X'), new ItemStack(net.minecraft.init.Items.reeds, 1, 32767) });

View file

@ -388,6 +388,9 @@ public class GT_CraftingRecipeLoader
GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem("Railcraft", "machine.alpha", 1L, 10), tBitMask, new Object[] { " I ", "RTR", " D ", Character.valueOf('I'), new ItemStack(Blocks.iron_bars, 1, 32767), Character.valueOf('T'), GT_ModHandler.getModItem("Railcraft", "machine.beta", 1L, 4), Character.valueOf('D'), new ItemStack(Blocks.dispenser, 1, 32767), Character.valueOf('R'), OrePrefixes.dust.get(Materials.Redstone) });
GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem("Railcraft", "machine.alpha", 1L, 10), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE, new Object[] { "RTR", Character.valueOf('T'), GT_ModHandler.getModItem("Railcraft", "machine.alpha", 1L, 9), Character.valueOf('R'), OrePrefixes.dust.get(Materials.Redstone) });
GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem("Railcraft", "machine.alpha", 1L, 11), tBitMask, new Object[] { "PCP", "CSC", "PCP", Character.valueOf('P'), OrePrefixes.plank.get(Materials.Wood), Character.valueOf('S'), OrePrefixes.plate.get(Materials.Steel), Character.valueOf('C'), new ItemStack(Items.golden_carrot, 1, 0) });
if(GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "DisableRCBlastFurnace", false)){
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getModItem("Railcraft", "machine.alpha", 4L,12));
}
GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem("Railcraft", "machine.alpha", 1L, 13), tBitMask, new Object[] { "TSB", "SCS", "PSP", Character.valueOf('P'), OreDictNames.craftingPiston, Character.valueOf('S'), OrePrefixes.plate.get(Materials.Steel), Character.valueOf('B'), OreDictNames.craftingBook, Character.valueOf('C'), new ItemStack(Blocks.crafting_table, 1, 32767), Character.valueOf('T'), new ItemStack(Items.diamond_pickaxe, 1, 0) });
GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem("Railcraft", "machine.alpha", 6L, 14), tBitMask, new Object[] { "PPP", "ISI", "PPP", Character.valueOf('P'), OrePrefixes.plank.get(Materials.Wood), Character.valueOf('I'), tIngot.get(Materials.AnyIron), Character.valueOf('S'), "slimeball" });
GT_ModHandler.addCraftingRecipe(GT_ModHandler.getModItem("Railcraft", "machine.alpha", 4L, 15), tBitMask, new Object[] { "PDP", "DBD", "PDP", Character.valueOf('P'), OreDictNames.craftingPiston, Character.valueOf('B'), OrePrefixes.block.get(Materials.Steel), Character.valueOf('D'), OrePrefixes.gem.get(Materials.Diamond) });

View file

@ -407,6 +407,15 @@ public class GT_MachineRecipeLoader
GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 3L, new Object[0]), Materials.Oil.getFluid(16L), Materials.Methane.getGas(15L), 32, 16, false);
GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 4L, new Object[0]), Materials.Oil.getFluid(16L), Materials.Lubricant.getFluid(16L), 32, 16, false);
GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 6L, new Object[0]), Materials.Oil.getFluid(16L), Materials.SulfuricAcid.getFluid(16L), 32, 16, false);
if(FluidRegistry.getFluid("oilgc") != null){
GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 1L, new Object[0]), new FluidStack(FluidRegistry.getFluid("oilgc"), 16), Materials.Fuel.getFluid(16L), 32, 16, false);
GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 2L, new Object[0]), new FluidStack(FluidRegistry.getFluid("oilgc"), 16), Materials.Glyceryl.getFluid(1L), 32, 16, false);
GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 3L, new Object[0]), new FluidStack(FluidRegistry.getFluid("oilgc"), 16), Materials.Methane.getGas(15L), 32, 16, false);
GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 4L, new Object[0]), new FluidStack(FluidRegistry.getFluid("oilgc"), 16), Materials.Lubricant.getFluid(16L), 32, 16, false);
GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 6L, new Object[0]), new FluidStack(FluidRegistry.getFluid("oilgc"), 16), Materials.SulfuricAcid.getFluid(16L), 32, 16, false);
GT_Values.RA.addDistillationTowerRecipe(new FluidStack(FluidRegistry.getFluid("oilgc"), 64), new FluidStack[]{Materials.Lubricant.getFluid(16L) , Materials.Fuel.getFluid(64L), Materials.SulfuricAcid.getFluid(64L), Materials.Glyceryl.getFluid(4L), Materials.Methane.getGas(60L)},null, 16, 64);
}
GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 1L, new Object[0]), new FluidStack(ItemList.sOilLight, 32), Materials.Fuel.getFluid(16L), 32, 16, false);
GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 2L, new Object[0]), new FluidStack(ItemList.sOilLight, 32), Materials.Glyceryl.getFluid(1L), 32, 16, false);
GT_Values.RA.addDistilleryRecipe(ItemList.Circuit_Integrated.getWithDamage(0L, 3L, new Object[0]), new FluidStack(ItemList.sOilLight, 32), Materials.Methane.getGas(15L), 32, 16, false);
@ -680,7 +689,7 @@ public class GT_MachineRecipeLoader
GT_Values.RA.addFusionReactorRecipe(Materials.Plutonium.getMolten(9), Materials.Thorium.getMolten(9), Materials.Naquadah.getMolten(9), 64, 32768, 300000000);
GT_Values.RA.addFusionReactorRecipe(Materials.Americium.getMolten(16), Materials.Naquadria.getMolten(16), Materials.Neutronium.getMolten(1), 1200, 98304, 600000000);
GT_Values.RA.addFusionReactorRecipe(Materials.Beryllium.getMolten(9), Materials.Deuterium.getGas(375), Materials.Nitrogen.getPlasma(125), 16, 16384, 180000000);
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));
// GT_Values.RA.addDistillationRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oil, 16L), 32, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Fuel, 16L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.SulfuricAcid, 16L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Glyceryl, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Methane, 15L), 4000, 64);
@ -696,7 +705,8 @@ public class GT_MachineRecipeLoader
GT_Values.RA.addDistillationTowerRecipe(Materials.FishOil.getFluid(24L), new FluidStack[]{Materials.Lubricant.getFluid(12L)}, null, 16, 96);
GT_Values.RA.addDistillationTowerRecipe(Materials.Biomass.getFluid(150L), new FluidStack[]{Materials.Ethanol.getFluid(60L),Materials.Water.getFluid(60L)}, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 1L), 25, 64);
GT_Values.RA.addDistillationTowerRecipe(Materials.Water.getFluid(288L), new FluidStack[]{GT_ModHandler.getDistilledWater(260L)}, null, 16, 64);
GT_Values.RA.addDistillationTowerRecipe(new FluidStack(FluidRegistry.getFluid("ic2biomass"), 250), new FluidStack[]{new FluidStack(FluidRegistry.getFluid("ic2biogas"), 8000),Materials.Water.getFluid(125L)}, ItemList.IC2_Fertilizer.get(1, new Object[0]), 150, 512);
GT_Values.RA.addFuel(GT_ModHandler.getIC2Item("biogasCell", 1L), null, 32, 1);
GT_Values.RA.addElectrolyzerRecipe(GT_Values.NI, ItemList.Cell_Empty.get(1L, new Object[0]), Materials.Water.getFluid(3000L), Materials.Hydrogen.getGas(2000L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 1500, 30);
GT_Values.RA.addElectrolyzerRecipe(GT_Values.NI, ItemList.Cell_Empty.get(1L, new Object[0]), GT_ModHandler.getDistilledWater(3000L), Materials.Hydrogen.getGas(2000L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, null, 1500, 30);
@ -705,7 +715,7 @@ public class GT_MachineRecipeLoader
GT_Values.RA.addElectrolyzerRecipe(ItemList.Dye_Bonemeal.get(3L, new Object[0]), 0, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, 98, 26);
GT_Values.RA.addElectrolyzerRecipe(new ItemStack(Blocks.sand, 8), 0, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.SiliconDioxide, 1L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Values.NI, 500, 25);
GT_ModHandler.removeRecipeByOutput(ItemList.IC2_Fertilizer.get(1L, new Object[0]));
GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.NetherQuartz, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), Materials.Water.getFluid(1000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.NetherQuartz, 3L), 500);
GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.CertusQuartz, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), Materials.Water.getFluid(1000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.CertusQuartz, 3L), 500);
GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Quartzite, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sodium, 1L), Materials.Water.getFluid(1000L), GT_Values.NF, GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Quartzite, 3L), 500);

View file

@ -5,6 +5,7 @@
/* 5: */ import cpw.mods.fml.common.registry.GameRegistry;
/* 6: */ import gregtech.GT_Mod;
/* 7: */ import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
/* 8: */ import gregtech.api.enums.Dyes;
/* 9: */ import gregtech.api.enums.GT_Values;
/* 10: */ import gregtech.api.enums.ItemList;
@ -456,10 +457,30 @@ import ic2.core.item.ItemRadioactive;
/* 406:419 */ GT_OreDictUnificator.set(OrePrefixes.gem, Materials.Mercury, GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1L, 3));
/* 407:420 */ GT_OreDictUnificator.set(OrePrefixes.gem, Materials.Amber, GT_ModHandler.getModItem("Thaumcraft", "ItemResource", 1L, 6));
/* 408:421 */ GT_OreDictUnificator.set(OrePrefixes.gem, Materials.Firestone, GT_ModHandler.getModItem("Railcraft", "firestone.raw", 1L));
/* 409:422 */ GT_OreDictUnificator.set(OrePrefixes.plate, Materials.Iron, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 0));
/* 410:423 */ GT_OreDictUnificator.set(OrePrefixes.plate, Materials.Steel, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 1));
/* 411:424 */ GT_OreDictUnificator.set(OrePrefixes.plate, Materials.TinAlloy, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 2));
/* 412:425 */ GT_OreDictUnificator.set(OrePrefixes.plate, Materials.Copper, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 3));
if(GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + "railcraft", "plateIron", true)){
/* 409:422 */ GT_OreDictUnificator.set(OrePrefixes.plate, Materials.Iron, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 0));}else{
/* 409:422 */ GT_OreDictUnificator.set(OrePrefixes.plate, Materials.Iron, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 0),false,false);}
if(GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + "railcraft", "plateSteel", true)){
/* 410:423 */ GT_OreDictUnificator.set(OrePrefixes.plate, Materials.Steel, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 1));}else{
GT_OreDictUnificator.set(OrePrefixes.plate, Materials.Steel, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 1),false,false);}
if(GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + "railcraft", "plateTinAlloy", true)){
/* 411:424 */ GT_OreDictUnificator.set(OrePrefixes.plate, Materials.TinAlloy, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 2));}else{
GT_OreDictUnificator.set(OrePrefixes.plate, Materials.TinAlloy, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 2),false,false);}
if(GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + "railcraft", "plateCopper", true)){
/* 412:425 */ GT_OreDictUnificator.set(OrePrefixes.plate, Materials.Copper, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 3));}else{
GT_OreDictUnificator.set(OrePrefixes.plate, Materials.Copper, GT_ModHandler.getModItem("Railcraft", "part.plate", 1L, 3),false,false);}
/* 410:423 */
/* 411:424 */
/* 412:425 */
/* 413:426 */ GT_OreDictUnificator.set(OrePrefixes.dust, Materials.Cocoa, GT_ModHandler.getModItem("harvestcraft", "cocoapowderItem", 1L, 0));
/* 414:427 */ GT_OreDictUnificator.set(OrePrefixes.dust, Materials.Coffee, ItemList.IC2_CoffeePowder.get(1L, new Object[0]));
/* 415: */ }

View file

@ -59,9 +59,11 @@ import gregtech.common.tileentities.generators.GT_MetaTileEntity_PlasmaGenerator
/* 54: */ import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Disassembler;
/* 55: */ import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Massfabricator;
/* 56: */ import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_PotionBrewer;
import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Pump;
/* 57: */ import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Replicator;
/* 58: */ import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_RockBreaker;
/* 59: */ import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Scanner;
import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Teleporter;
import gregtech.common.tileentities.machines.multi.*;
/* 69: */ import gregtech.common.tileentities.machines.steam.GT_MetaTileEntity_AlloySmelter_Bronze;
/* 70: */ import gregtech.common.tileentities.machines.steam.GT_MetaTileEntity_AlloySmelter_Steel;
@ -978,6 +980,25 @@ import net.minecraftforge.oredict.OreDictionary;
ItemList.Distillation_Tower.set(new GT_MetaTileEntity_DistillationTower(1126, "multimachine.distillationtower", "Distillation Tower").getStackForm(1L));
GT_ModHandler.addCraftingRecipe(ItemList.Distillation_Tower.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "CBC", "FMF", "CBC", 'M', ItemList.Hull_EV, 'B', OrePrefixes.pipeLarge.get(Materials.StainlessSteel), 'C', OrePrefixes.circuit.get(Materials.Master), 'F', ItemList.Electric_Pump_EV});
ItemList.LargeTurbine.set(new GT_MetaTileEntity_LargeTurbine(1131, "multimachine.largeturbine", "Large Turbine").getStackForm(1L));
ItemList.Pump_LV.set(new GT_MetaTileEntity_Pump(1140, "basicmachine.pump.tier.01", "Basic Pump",1).getStackForm(1L));
ItemList.Pump_MV.set(new GT_MetaTileEntity_Pump(1141, "basicmachine.pump.tier.02", "Advanced Pump",2).getStackForm(1L));
ItemList.Pump_HV.set(new GT_MetaTileEntity_Pump(1142, "basicmachine.pump.tier.03", "Advanced Pump II",3).getStackForm(1L));
ItemList.Pump_EV.set(new GT_MetaTileEntity_Pump(1143, "basicmachine.pump.tier.04", "Advanced Pump III",4).getStackForm(1L));
ItemList.Pump_IV.set(new GT_MetaTileEntity_Pump(1144, "basicmachine.pump.tier.05", "Advanced Pump IV",5).getStackForm(1L));
GT_ModHandler.addCraftingRecipe(ItemList.Pump_LV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "CPC", "PMP", "BPB", 'M', ItemList.Hull_LV, 'B', OrePrefixes.pipeLarge.get(Materials.Bronze), 'C', OrePrefixes.circuit.get(Materials.Basic), 'P', ItemList.Electric_Pump_LV});
GT_ModHandler.addCraftingRecipe(ItemList.Pump_MV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "CPC", "PMP", "BPB", 'M', ItemList.Hull_MV, 'B', OrePrefixes.pipeLarge.get(Materials.Steel), 'C', OrePrefixes.circuit.get(Materials.Good), 'P', ItemList.Electric_Pump_MV});
GT_ModHandler.addCraftingRecipe(ItemList.Pump_HV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "CPC", "PMP", "BPB", 'M', ItemList.Hull_HV, 'B', OrePrefixes.pipeLarge.get(Materials.StainlessSteel), 'C', OrePrefixes.circuit.get(Materials.Advanced), 'P', ItemList.Electric_Pump_HV});
GT_ModHandler.addCraftingRecipe(ItemList.Pump_EV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "CPC", "PMP", "BPB", 'M', ItemList.Hull_EV, 'B', OrePrefixes.pipeLarge.get(Materials.Titanium), 'C', OrePrefixes.circuit.get(Materials.Data), 'P', ItemList.Electric_Pump_EV});
GT_ModHandler.addCraftingRecipe(ItemList.Pump_IV.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "CPC", "PMP", "BPB", 'M', ItemList.Hull_IV, 'B', OrePrefixes.pipeLarge.get(Materials.TungstenSteel), 'C', OrePrefixes.circuit.get(Materials.Elite), 'P', ItemList.Electric_Pump_IV});
ItemList.Teleporter.set(new GT_MetaTileEntity_Teleporter(1145, "basicmachine.teleporter", "Teleporter",6).getStackForm(1L));
// GT_ModHandler.addCraftingRecipe(ItemList.Teleporter.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "CPC", "PMP", "BPB", 'M', ItemList.Hull_LuV, 'B', OrePrefixes.pipeLarge.get(Materials.Bronze), 'C', OrePrefixes.circuit.get(Materials.Basic), 'P', ItemList.Electric_Pump_LV});
}
/* 981: */
/* 982: */ private static void run4()

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B