Update 5.08.16

Monster repellator + large turbine
This commit is contained in:
Blood-Asp 2015-05-19 23:12:36 +02:00
parent 20313127ce
commit a102e63891
14 changed files with 187 additions and 137 deletions

View file

@ -41,6 +41,7 @@ import gregtech.api.enums.*;
/* 47: */ import gregtech.api.util.GT_Recipe;
/* 48: */ import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
/* 49: */ import gregtech.api.util.GT_RecipeRegistrator;
import gregtech.api.util.GT_SpawnEventHandler;
/* 50: */ import gregtech.api.util.GT_Utility;
/* 51: */ import gregtech.common.GT_DummyWorld;
/* 52: */ import gregtech.common.GT_Network;
@ -367,6 +368,7 @@ import net.minecraftforge.common.ForgeVersion;
/* 365:263 */ new GT_Loader_CircuitBehaviors().run();
/* 366:264 */ new GT_CoverBehaviorLoader().run();
/* 367:265 */ new GT_SonictronLoader().run();
new GT_SpawnEventHandler();
/* 368:267 */ if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.gregtechrecipes, "SolarPanel", true)) {
/* 369:267 */ GT_ModHandler.addCraftingRecipe(ItemList.Cover_SolarPanel.get(1L, new Object[0]), GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[] { "SGS", "CPC", Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Basic), Character.valueOf('G'), new ItemStack(Blocks.glass_pane, 1), Character.valueOf('P'), OrePrefixes.plateAlloy.get(Materials.Carbon), Character.valueOf('S'), OrePrefixes.plate.get(Materials.Silicon) });
/* 370: */ }

View file

@ -645,7 +645,14 @@ 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, LargeTurbine, Ingot_Heavy1,Ingot_Heavy2,Ingot_Heavy3, Pump_LV, Pump_MV, Pump_HV, Pump_EV, Pump_IV, Teleporter, Cover_NeedsMaintainance, Casing_Turbine;
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,
Cover_NeedsMaintainance,
Casing_Turbine,
MobRep_LV,MobRep_MV,MobRep_HV,MobRep_EV,MobRep_IV;
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

@ -35,7 +35,7 @@ public class GT_MetaTileEntity_Hatch_Dynamo extends GT_MetaTileEntity_Hatch {
@Override public boolean isValidSlot(int aIndex) {return false;}
@Override public long getMinimumStoredEU() {return 512;}
@Override public long maxEUOutput() {return V[mTier];}
@Override public long maxEUStore() {return 512+V[mTier];}
@Override public long maxEUStore() {return 512+V[mTier+1]*2;}
@Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {

View file

@ -8,11 +8,14 @@ import gregtech.api.gui.GT_Container_MultiMachine;
import gregtech.api.gui.GT_GUIContainer_MultiMachine;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.items.GT_MetaGenerated_Tool;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.objects.GT_ItemStack;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gregtech.api.util.GT_Utility;
import gregtech.common.items.GT_MetaGenerated_Tool_01;
import gregtech.common.tools.GT_Tool_Turbine;
import java.util.ArrayList;
@ -194,10 +197,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
mEfficiencyIncrease = 0;
if (aBaseMetaTileEntity.isAllowedToWork()) checkRecipe(mInventory[1]);
if(mOutputFluids!=null&&mOutputFluids.length>0){
System.out.println("fluids"+mOutputFluids.length);
GT_Mod.instance.achievements.issueAchivementHatchFluid(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), mOutputFluids[0]);
if(mOutputFluids.length>1){GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "oilplant");}
// mOutputFluids = null;
}
}
}
@ -335,15 +336,17 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
}
}
if (mInventory[1] != null && getBaseMetaTileEntity().getRandomNumber(2) == 0 &&!mInventory[1].getUnlocalizedName().startsWith("gt.blockmachines.basicmachine.")) {
mInventory[1].setItemDamage(mInventory[1].getItemDamage() + getDamageToComponent(mInventory[1]));
if (mInventory[1].getItemDamage() >= mInventory[1].getMaxDamage()) {
if (explodesOnComponentBreak(mInventory[1])) {
explodeMultiblock();
} else {
mInventory[1] = null;
}
return false;
if(mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01){
}
// mInventory[1].setItemDamage(mInventory[1].getItemDamage() + getDamageToComponent(mInventory[1]));
// if (mInventory[1].getItemDamage() >= mInventory[1].getMaxDamage()) {
// if (explodesOnComponentBreak(mInventory[1])) {
// explodeMultiblock();
// } else {
// mInventory[1] = null;
// }
// return false;
// }
}
}
return true;

View file

@ -1011,85 +1011,6 @@ public class GT_ModHandler {
return rReturn;
}
// public static int replaceRecipe(ItemStack aOldItem, ItemStack aNewItem){
// int replaced =0;
// ArrayList<IRecipe> tList = (ArrayList<IRecipe>)CraftingManager.getInstance().getRecipeList();
// System.out.println("tList.size "+tList.size());
// for (int i = 0; i < tList.size(); i++){
// System.out.println(tList.get(i).getClass());
// if(tList.get(i) instanceof ShapedRecipes){
// ShapedRecipes tRecipe = (ShapedRecipes)tList.get(i);
// System.out.println("found recipe!");
// for( int g =0 ; g < tRecipe.recipeItems.length;g++){
// if(GT_Utility.areStacksEqual(aOldItem, tRecipe.recipeItems[g], true)){
// ItemStack[] tItems = tRecipe.recipeItems;
// for(int f = 0; f < tItems.length;f++){
// if(GT_Utility.areStacksEqual(aOldItem, tItems[f], true)){
// tItems[f]=aNewItem;
// }
// }
// ShapedRecipes nRecipe = new ShapedRecipes(tRecipe.recipeWidth,tRecipe.recipeHeight,tItems,tRecipe.getRecipeOutput());
// tList.set(i, nRecipe);
// replaced++;
// }
// }
// }
//
// if(tList.get(i) instanceof AdvRecipe){
// AdvRecipe tRecipe = (AdvRecipe)tList.get(i);
// System.out.println("found recipe!");
// for( int g =0 ; g < tRecipe.input.length;g++){
// if(GT_Utility.areStacksEqual(aOldItem, (ItemStack) tRecipe.input[g], true)){
// ItemStack[] tItems = (ItemStack[]) tRecipe.input;
// for(int f = 0; f < tItems.length;f++){
// if(GT_Utility.areStacksEqual(aOldItem, tItems[f], true)){
// tItems[f]=aNewItem;
// }
// }
// System.out.println("converted Recipe");
// AdvRecipe nRecipe = new AdvRecipe(tRecipe.getRecipeOutput(),tItems);
// tList.set(i, nRecipe);
// replaced++;
// }
// }
// }
//// if(tList.get(i) instanceof GT_Shaped_Recipe){
//// GT_Shaped_Recipe tRecipe = (GT_Shaped_Recipe)tList.get(i);
//// System.out.println("found recipe!");
//// for( int g =0 ; g < tRecipe.getInput().length;g++){
//// if(GT_Utility.areStacksEqual(aOldItem, (ItemStack)tRecipe.getInput()[g], true)){
//// ItemStack[] tItems = (ItemStack[]) tRecipe.getInput();
//// for(int f = 0; f < tItems.length;f++){
//// if(GT_Utility.areStacksEqual(aOldItem, tItems[f], true)){
//// tItems[f]=aNewItem;
//// }
//// }
//// GT_Shaped_Recipe nRecipe = new GT_Shaped_Recipe(tItems,tRecipe.getRecipeOutput());
//// tList.set(i, nRecipe);
//// replaced++;
//// }
//// }
//// }
// if(tList.get(i) instanceof ShapelessRecipes){
// ShapelessRecipes tRecipe = (ShapelessRecipes)tList.get(i);
// System.out.println("found recipe!");
// for( int g =0 ; g < tRecipe.recipeItems.size();g++){
// if(GT_Utility.areStacksEqual(aOldItem, (ItemStack) tRecipe.recipeItems.get(g), true)){
// List tItems = tRecipe.recipeItems;
// for(int f = 0; f < tItems.size();f++){
// if(GT_Utility.areStacksEqual(aOldItem, (ItemStack) tItems.get(f), true)){
// tItems.set(f,aNewItem);
// }
// }
// ShapelessRecipes nRecipe = new ShapelessRecipes(tRecipe.getRecipeOutput(),tItems);
// tList.set(i, nRecipe);
// replaced++;
// }
// }
// }
// }return replaced;
// }
public static boolean removeRecipeByOutput(ItemStack aOutput) {
return removeRecipeByOutput(aOutput, T, F, F);
}

View file

@ -0,0 +1,46 @@
package gregtech.api.util;
import gregtech.api.metatileentity.BaseMetaTileEntity;
import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_MonsterRepellent;
import java.util.ArrayList;
import java.util.List;
import cpw.mods.fml.common.eventhandler.Event;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.living.LivingSpawnEvent.CheckSpawn;
public class GT_SpawnEventHandler {
public static volatile List <int[]> mobReps = new ArrayList();
public GT_SpawnEventHandler(){
MinecraftForge.EVENT_BUS.register(this);
}
@SubscribeEvent
public void denyMobSpawn(CheckSpawn event)
{
if (event.getResult() == Event.Result.ALLOW) {return;}
if (event.entityLiving.isCreatureType(EnumCreatureType.monster, false))
{
for(int[] rep : mobReps){
if(rep[3] == event.entity.worldObj.provider.dimensionId){
TileEntity tTile = event.entity.worldObj.getTileEntity(rep[0], rep[1], rep[2]);
if(tTile instanceof BaseMetaTileEntity && ((BaseMetaTileEntity)tTile).getMetaTileEntity() instanceof GT_MetaTileEntity_MonsterRepellent){
int r = ((GT_MetaTileEntity_MonsterRepellent)((BaseMetaTileEntity)tTile).getMetaTileEntity()).mRange;
double dx = rep[0] + 0.5F - event.entity.posX;
double dy = rep[1] + 0.5F - event.entity.posY;
double dz = rep[2] + 0.5F - event.entity.posZ;
if ((dx * dx + dz * dz + dy * dy) <= Math.pow(r, 2)) {
event.setResult(Event.Result.DENY);
}
}
}
}
}
}
}

View file

@ -297,12 +297,6 @@ label0:
drawGrid(aEvent);
return;
}
// for(Iterator it = GregTech_API.sWrenchList.getMap().keySet().iterator();it.hasNext();){
// GT_ItemStack tmp = (GT_ItemStack) it.next();
// System.out.println("nameinlist: "+(tmp.isStackEqual(aEvent.currentItem)));
// }
// System.out.println("Contains: "+GregTech_API.sWrenchList.contains(aEvent.currentItem));
// System.out.println("contains2: "+GregTech_API.sWrenchList.getMap().containsKey(aEvent.currentItem));
if ((((aTileEntity instanceof ITurnable)) || (ROTATABLE_VANILLA_BLOCKS.contains(aBlock)) || ((aTileEntity instanceof IWrenchable))) && (GT_Utility.isStackInList(aEvent.currentItem, GregTech_API.sWrenchList)))
{
drawGrid(aEvent);

View file

@ -0,0 +1,79 @@
package gregtech.common.tileentities.machines.basic;
import static gregtech.api.enums.GT_Values.V;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.eventhandler.Event;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.living.LivingSpawnEvent;
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_TieredMachineBlock;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_SpawnEventHandler;
public class GT_MetaTileEntity_MonsterRepellent extends GT_MetaTileEntity_TieredMachineBlock {
public int mRange = 16;
public GT_MetaTileEntity_MonsterRepellent(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier, 0, "Reprells nasty Creatures. Range: "+(4 + (12*aTier))+" unpowered / "+(16 + (48*aTier))+" powered");
}
public GT_MetaTileEntity_MonsterRepellent(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) {
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
}
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_MonsterRepellent(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures);
}
@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) };
}
@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) {
if (aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.isServerSide()) {
int[] tCoords = new int[]{aBaseMetaTileEntity.getXCoord(),aBaseMetaTileEntity.getYCoord(),aBaseMetaTileEntity.getZCoord(),aBaseMetaTileEntity.getWorld().provider.dimensionId};
if((aTimer%600 == 0)&&!GT_SpawnEventHandler.mobReps.contains(tCoords)){
GT_SpawnEventHandler.mobReps.add(tCoords);
}
if(aBaseMetaTileEntity.isUniversalEnergyStored(getMinimumStoredEU()) && aBaseMetaTileEntity.decreaseStoredEnergyUnits(1 << (this.mTier*2), false)){
mRange = 16 + (48*mTier);
}else{
mRange = 4 + (12*mTier);
}}
}
@Override
public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) {
int[] tCoords = new int[]{aBaseMetaTileEntity.getXCoord(),aBaseMetaTileEntity.getYCoord(),aBaseMetaTileEntity.getZCoord(),aBaseMetaTileEntity.getWorld().provider.dimensionId};
GT_SpawnEventHandler.mobReps.add(tCoords);
}
@Override
public void onRemoval() {
int[] tCoords = new int[]{this.getBaseMetaTileEntity().getXCoord(),this.getBaseMetaTileEntity().getYCoord(),this.getBaseMetaTileEntity().getZCoord(),this.getBaseMetaTileEntity().getWorld().provider.dimensionId};
GT_SpawnEventHandler.mobReps.remove(tCoords);
}
@Override public boolean isSimpleMachine() {return false;}
@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 isTeleporterCompatible() {return false;}
@Override public long getMinimumStoredEU() {return 512;}
@Override public long maxEUStore() {return 512+V[mTier]*50;}
@Override public long maxEUInput() {return V[mTier];}
@Override public long maxAmperesIn() {return 2;}
@Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {return false;}
@Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {return false;}
@Override public ITexture[][][] getTextureSet(ITexture[] aTextures) {return null;}
@Override public void saveNBTData(NBTTagCompound aNBT) {}
@Override public void loadNBTData(NBTTagCompound aNBT) {}
}

View file

@ -7,11 +7,14 @@ 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.items.GT_MetaGenerated_Tool;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
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;
import gregtech.common.items.GT_MetaGenerated_Tool_01;
public class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_MultiBlockBase{
@ -20,7 +23,7 @@ public class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_MultiBlock
@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], aFacing == aSide ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE5) : Textures.BlockIcons.CASING_BLOCKS[57]};
return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex+1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ACTIVE5):new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE5) : Textures.BlockIcons.CASING_BLOCKS[57]};
}
@ -42,25 +45,24 @@ public class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_MultiBlock
@Override
public boolean checkRecipe(ItemStack aStack) {
if (depleteInput(GT_ModHandler.getSteam(1600L)))
{
this.mEUt = 800;
this.mEUt = 1000;
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)) {
// 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);
} 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));
// }
addOutput(GT_ModHandler.getDistilledWater(10L));
return true;
}
return false;
@ -68,7 +70,6 @@ public class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_MultiBlock
@Override
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
byte tSide = getBaseMetaTileEntity().getBackFacing();
if ((getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 1)) && (getBaseMetaTileEntity().getAirAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 2)))
{
@ -103,7 +104,7 @@ public class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_MultiBlock
{
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) {}
if (getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide < 4 ? i : -k), tY + j, tZ + (tSide < 4 ? -k : tSide == 3 ? k : i)) == 9) {}
}
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;
@ -111,7 +112,7 @@ public class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_MultiBlock
}
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) {}
if (getBaseMetaTileEntity().getMetaID(tX + (tSide == 5 ? k : tSide < 4 ? i : -k), tY + j, tZ + (tSide < 4 ? -k : tSide == 3 ? k : i)) == 9) {}
}
else {
return false;
@ -125,6 +126,7 @@ public class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_MultiBlock
if ((tTileEntity != null) && (tTileEntity.getMetaTileEntity() != null)) {
if ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Dynamo)) {
this.mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo)tTileEntity.getMetaTileEntity());
((GT_MetaTileEntity_Hatch)tTileEntity.getMetaTileEntity()).mMachineBlock = (byte)46;
} else {
return false;
}
@ -138,12 +140,12 @@ public class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_MultiBlock
}
private boolean addToMachineList(IGregTechTileEntity tTileEntity){
return ((!addMaintenanceToMachineList(tTileEntity, 11)) && (!addInputToMachineList(tTileEntity, 11)) && (!addOutputToMachineList(tTileEntity, 11)));
return ((addMaintenanceToMachineList(tTileEntity, 46)) || (addInputToMachineList(tTileEntity, 46)) || (addOutputToMachineList(tTileEntity, 46)));
}
@Override
public int getDamageToComponent(ItemStack aStack) {
return GT_Utility.areStacksEqual(GT_ModHandler.getModItem("Railcraft","part.turbine.rotor", 1L, 32767), aStack) ? 2 : 1;
return 1;//GT_Utility.areStacksEqual(GT_ModHandler.getModItem("Railcraft","part.turbine.rotor", 1L, 32767), aStack) ? 2 : 1;
}
@ -152,24 +154,9 @@ public class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_MultiBlock
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)) {
if (aStack.getItem() instanceof GT_MetaGenerated_Tool_01) {
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;
}

View file

@ -58,6 +58,7 @@ import gregtech.common.tileentities.generators.GT_MetaTileEntity_PlasmaGenerator
/* 53: */ import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Boxinator;
/* 54: */ import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Disassembler;
/* 55: */ import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Massfabricator;
import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_MonsterRepellent;
/* 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;
@ -983,8 +984,6 @@ import net.minecraftforge.oredict.OreDictionary;
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));
@ -1000,6 +999,18 @@ import net.minecraftforge.oredict.OreDictionary;
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", "BCB", 'M', ItemList.Hull_LuV, 'B', ItemList.Tool_DataOrb, 'C', OrePrefixes.circuit.get(Materials.Master), 'P', ItemList.Field_Generator_EV});
ItemList.MobRep_LV.set(new GT_MetaTileEntity_MonsterRepellent(1146, "basicmachine.mobrep.tier.01", "Basic Monster Repellator",1).getStackForm(1L));
ItemList.MobRep_MV.set(new GT_MetaTileEntity_MonsterRepellent(1147, "basicmachine.mobrep.tier.02", "Advanced Monster Repellator",2).getStackForm(1L));
ItemList.MobRep_HV.set(new GT_MetaTileEntity_MonsterRepellent(1148, "basicmachine.mobrep.tier.03", "Advanced Monster Repellator II",3).getStackForm(1L));
ItemList.MobRep_EV.set(new GT_MetaTileEntity_MonsterRepellent(1149, "basicmachine.mobrep.tier.04", "Advanced Monster Repellator III",4).getStackForm(1L));
ItemList.MobRep_IV.set(new GT_MetaTileEntity_MonsterRepellent(1150, "basicmachine.mobrep.tier.05", "Advanced Monster Repellator IV",5).getStackForm(1L));
GT_ModHandler.addCraftingRecipe(ItemList.MobRep_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[] { "EEE", " M ", "CCC", 'M', ItemList.Hull_LV, 'E', ItemList.Emitter_LV.get(1L, new Object[0]), 'C', OrePrefixes.circuit.get(Materials.Basic)});
GT_ModHandler.addCraftingRecipe(ItemList.MobRep_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[] { "EEE", " M ", "CCC", 'M', ItemList.Hull_MV, 'E', ItemList.Emitter_MV.get(1L, new Object[0]), 'C', OrePrefixes.circuit.get(Materials.Good)});
GT_ModHandler.addCraftingRecipe(ItemList.MobRep_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[] { "EEE", " M ", "CCC", 'M', ItemList.Hull_HV, 'E', ItemList.Emitter_HV.get(1L, new Object[0]), 'C', OrePrefixes.circuit.get(Materials.Advanced)});
GT_ModHandler.addCraftingRecipe(ItemList.MobRep_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[] { "EEE", " M ", "CCC", 'M', ItemList.Hull_EV, 'E', ItemList.Emitter_EV.get(1L, new Object[0]), 'C', OrePrefixes.circuit.get(Materials.Data)});
GT_ModHandler.addCraftingRecipe(ItemList.MobRep_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[] { "EEE", " M ", "CCC", 'M', ItemList.Hull_IV, 'E', ItemList.Emitter_IV.get(1L, new Object[0]), 'C', OrePrefixes.circuit.get(Materials.Elite)});
}
/* 981: */
/* 982: */ private static void run4()