From a102e63891d2af3452dc9b25d9fd97bc266582b7 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Tue, 19 May 2015 23:12:36 +0200 Subject: [PATCH] Update 5.08.16 Monster repellator + large turbine --- main/java/gregtech/GT_Mod.java | 2 + main/java/gregtech/api/enums/ItemList.java | 9 +- .../GT_MetaTileEntity_Hatch_Dynamo.java | 2 +- .../GT_MetaTileEntity_MultiBlockBase.java | 23 ++--- .../java/gregtech/api/util/GT_ModHandler.java | 79 ------------------ .../api/util/GT_SpawnEventHandler.java | 46 ++++++++++ main/java/gregtech/common/GT_Client.java | 6 -- .../GT_MetaTileEntity_MonsterRepellent.java | 79 ++++++++++++++++++ .../multi/GT_MetaTileEntity_LargeTurbine.java | 63 ++++++-------- .../preload/GT_Loader_MetaTileEntities.java | 15 +++- .../assets/gregtech/textures/blocks/Thumbs.db | 0 .../assets/gregtech/textures/gui/Thumbs.db | 0 .../assets/ic2/textures/blocks/crop/Thumbs.db | 0 .../minecraft/textures/models/armor/Thumbs.db | Bin 8704 -> 0 bytes 14 files changed, 187 insertions(+), 137 deletions(-) create mode 100644 main/java/gregtech/api/util/GT_SpawnEventHandler.java create mode 100644 main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java delete mode 100644 main/resources/assets/gregtech/textures/blocks/Thumbs.db delete mode 100644 main/resources/assets/gregtech/textures/gui/Thumbs.db delete mode 100644 main/resources/assets/ic2/textures/blocks/crop/Thumbs.db delete mode 100644 main/resources/assets/minecraft/textures/models/armor/Thumbs.db diff --git a/main/java/gregtech/GT_Mod.java b/main/java/gregtech/GT_Mod.java index 3b79b8ad..1dba0f37 100644 --- a/main/java/gregtech/GT_Mod.java +++ b/main/java/gregtech/GT_Mod.java @@ -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: */ } diff --git a/main/java/gregtech/api/enums/ItemList.java b/main/java/gregtech/api/enums/ItemList.java index 4ce75cd7..1bb7c9ec 100644 --- a/main/java/gregtech/api/enums/ItemList.java +++ b/main/java/gregtech/api/enums/ItemList.java @@ -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} diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Dynamo.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Dynamo.java index 39a9cb3b..caeec17b 100644 --- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Dynamo.java +++ b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Dynamo.java @@ -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) { diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java index d0722f66..2bcb4ec1 100644 --- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java +++ b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java @@ -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; diff --git a/main/java/gregtech/api/util/GT_ModHandler.java b/main/java/gregtech/api/util/GT_ModHandler.java index 72ba214b..93aba7cf 100644 --- a/main/java/gregtech/api/util/GT_ModHandler.java +++ b/main/java/gregtech/api/util/GT_ModHandler.java @@ -1011,85 +1011,6 @@ public class GT_ModHandler { return rReturn; } -// public static int replaceRecipe(ItemStack aOldItem, ItemStack aNewItem){ -// int replaced =0; -// ArrayList tList = (ArrayList)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); } diff --git a/main/java/gregtech/api/util/GT_SpawnEventHandler.java b/main/java/gregtech/api/util/GT_SpawnEventHandler.java new file mode 100644 index 00000000..d4d4c65d --- /dev/null +++ b/main/java/gregtech/api/util/GT_SpawnEventHandler.java @@ -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 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); + } + } + } + } + } + } +} diff --git a/main/java/gregtech/common/GT_Client.java b/main/java/gregtech/common/GT_Client.java index 695c7784..013dc3fa 100644 --- a/main/java/gregtech/common/GT_Client.java +++ b/main/java/gregtech/common/GT_Client.java @@ -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); diff --git a/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java b/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java new file mode 100644 index 00000000..87183502 --- /dev/null +++ b/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java @@ -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) {} + } diff --git a/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java b/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java index 5dfee91f..1d5f18d9 100644 --- a/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java +++ b/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java @@ -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,15 +104,15 @@ 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; + 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) {} + 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; } diff --git a/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java b/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java index 871d9e69..58285338 100644 --- a/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java +++ b/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java @@ -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() diff --git a/main/resources/assets/gregtech/textures/blocks/Thumbs.db b/main/resources/assets/gregtech/textures/blocks/Thumbs.db deleted file mode 100644 index e69de29b..00000000 diff --git a/main/resources/assets/gregtech/textures/gui/Thumbs.db b/main/resources/assets/gregtech/textures/gui/Thumbs.db deleted file mode 100644 index e69de29b..00000000 diff --git a/main/resources/assets/ic2/textures/blocks/crop/Thumbs.db b/main/resources/assets/ic2/textures/blocks/crop/Thumbs.db deleted file mode 100644 index e69de29b..00000000 diff --git a/main/resources/assets/minecraft/textures/models/armor/Thumbs.db b/main/resources/assets/minecraft/textures/models/armor/Thumbs.db deleted file mode 100644 index 92a9fbfc6a9d7ead5eb9a014ddca229a7393b538..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8704 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 ZpY)uHOuECY4uW$xNI#EQ{%7L9{{oMHlW_n5