From 8198a51aeef641fd25d2b77f776c7640dd3f84a9 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Sat, 27 Jun 2015 03:26:08 +0200 Subject: [PATCH] Version 5.08.21 --- .../interfaces/tileentity/IGregTechTileEntity.java | 4 +++- main/java/gregtech/api/items/GT_Spray_Foam_Item.java | 6 +++--- .../gregtech/api/metatileentity/BaseTileEntity.java | 4 ++-- .../GT_MetaTileEntity_MultiBlockBase.java | 5 ++++- main/java/gregtech/api/util/GT_Config.java | 8 ++++++-- main/java/gregtech/api/util/GT_Utility.java | 11 ++++++++--- main/java/gregtech/common/GT_Proxy.java | 6 ++++++ .../gregtech/common/blocks/GT_TileEntity_Ores.java | 2 +- .../gregtech/common/covers/GT_Cover_LiquidMeter.java | 12 +++--------- .../gregtech/common/covers/GT_Cover_SolarPanel.java | 8 +------- .../common/items/GT_MetaGenerated_Item_01.java | 2 +- .../common/items/behaviors/Behaviour_Hoe.java | 2 +- .../common/items/behaviors/Behaviour_Lighter.java | 2 +- .../boilers/GT_MetaTileEntity_Boiler_Solar.java | 4 ++-- .../GT_MetaTileEntity_FluidNaquadahReactor.java | 2 +- .../machines/basic/GT_MetaTileEntity_Pump.java | 12 ++++++++---- .../multi/GT_MetaTileEntity_LargeTurbine.java | 2 +- .../multi/GT_MetaTileEntity_LargeTurbine_Gas.java | 9 ++++++++- .../GT_MetaTileEntity_LargeTurbine_HPSteam.java | 5 ++++- .../multi/GT_MetaTileEntity_LargeTurbine_Plasma.java | 9 ++++++--- .../multi/GT_MetaTileEntity_LargeTurbine_Steam.java | 5 ++++- .../storage/GT_MetaTileEntity_QuantumChest.java | 2 +- main/java/gregtech/common/tools/GT_Tool_Crowbar.java | 2 +- .../loaders/oreprocessing/ProcessingItem.java | 2 +- .../loaders/postload/GT_MachineRecipeLoader.java | 2 +- .../loaders/preload/GT_Loader_MetaTileEntities.java | 2 +- 26 files changed, 79 insertions(+), 51 deletions(-) diff --git a/main/java/gregtech/api/interfaces/tileentity/IGregTechTileEntity.java b/main/java/gregtech/api/interfaces/tileentity/IGregTechTileEntity.java index b7fc797d..7419214d 100644 --- a/main/java/gregtech/api/interfaces/tileentity/IGregTechTileEntity.java +++ b/main/java/gregtech/api/interfaces/tileentity/IGregTechTileEntity.java @@ -113,7 +113,9 @@ public interface IGregTechTileEntity extends ITexturedTileEntity, IGearEnergyTil public ArrayList getDrops(); - + /** + * 255 = 100% + */ public int getLightOpacity(); public void addCollisionBoxesToList(World aWorld, int aX, int aY, int aZ, AxisAlignedBB inputAABB, List outputAABB, Entity collider); diff --git a/main/java/gregtech/api/items/GT_Spray_Foam_Item.java b/main/java/gregtech/api/items/GT_Spray_Foam_Item.java index 3c89d6ca..20f2971e 100644 --- a/main/java/gregtech/api/items/GT_Spray_Foam_Item.java +++ b/main/java/gregtech/api/items/GT_Spray_Foam_Item.java @@ -111,7 +111,7 @@ public class GT_Spray_Foam_Item extends GT_Tool_Item { } switch (0) { case 0: - if (GT_Utility.isAirBlock(aWorld, aX, aY, aZ) && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) { + if (GT_Utility.isBlockAir(aWorld, aX, aY, aZ) && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) { GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(102), 1.0F, -1, aX, aY, aZ); aWorld.setBlock(aX, aY, aZ, GT_Utility.getBlockFromStack(tStack), tStack.getItemDamage(), 3); return true; @@ -119,7 +119,7 @@ public class GT_Spray_Foam_Item extends GT_Tool_Item { break; case 1: for (byte i = 0; i < 4; i++) { - if (GT_Utility.isAirBlock(aWorld, aX, aY, aZ) && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) { + if (GT_Utility.isBlockAir(aWorld, aX, aY, aZ) && GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) { GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(102), 1.0F, -1, aX, aY, aZ); aWorld.setBlock(aX, aY, aZ, GT_Utility.getBlockFromStack(tStack), tStack.getItemDamage(), 3); } else { @@ -142,7 +142,7 @@ public class GT_Spray_Foam_Item extends GT_Tool_Item { aZ -= (tZFactor ? 1 : 0); for (byte i = 0; i < 3; i++) for (byte j = 0; j < 3; j++) { - if (GT_Utility.isAirBlock(aWorld, aX + (tXFactor?i:0), aY + (!tXFactor&&tYFactor?i:0) + (!tZFactor&&tYFactor?j:0), aZ + (tZFactor?j:0))) { + if (GT_Utility.isBlockAir(aWorld, aX + (tXFactor?i:0), aY + (!tXFactor&&tYFactor?i:0) + (!tZFactor&&tYFactor?j:0), aZ + (tZFactor?j:0))) { if (GT_ModHandler.damageOrDechargeItem(aStack, 1, 1000, aPlayer)) { GT_Utility.sendSoundToPlayers(aWorld, GregTech_API.sSoundList.get(102), 1.0F, -1, aX, aY, aZ); aWorld.setBlock(aX + (tXFactor?i:0), aY + (!tXFactor&&tYFactor?i:0) + (!tZFactor&&tYFactor?j:0), aZ + (tZFactor?j:0), GT_Utility.getBlockFromStack(tStack), tStack.getItemDamage(), 3); diff --git a/main/java/gregtech/api/metatileentity/BaseTileEntity.java b/main/java/gregtech/api/metatileentity/BaseTileEntity.java index 169998b5..49e7f4ec 100644 --- a/main/java/gregtech/api/metatileentity/BaseTileEntity.java +++ b/main/java/gregtech/api/metatileentity/BaseTileEntity.java @@ -127,13 +127,13 @@ public abstract class BaseTileEntity extends TileEntity implements IHasWorldObje @Override public final boolean getOpacity(int aX, int aY, int aZ) { if (ignoreUnloadedChunks && crossedChunkBorder(aX, aZ) && !worldObj.blockExists(aX, aY, aZ)) return false; - return GT_Utility.isOpaqueBlock(worldObj, aX, aY, aZ); + return GT_Utility.isBlockOpaque(worldObj, aX, aY, aZ,true,true); } @Override public final boolean getAir(int aX, int aY, int aZ) { if (ignoreUnloadedChunks && crossedChunkBorder(aX, aZ) && !worldObj.blockExists(aX, aY, aZ)) return true; - return GT_Utility.isAirBlock(worldObj, aX, aY, aZ); + return GT_Utility.isBlockAir(worldObj, aX, aY, aZ); } @Override 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 45b9205d..58336d21 100644 --- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java +++ b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java @@ -336,7 +336,10 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } if (mInventory[1] != null && getBaseMetaTileEntity().getRandomNumber(2) == 0 &&!mInventory[1].getUnlocalizedName().startsWith("gt.blockmachines.basicmachine.")) { if(mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01){ - ((GT_MetaGenerated_Tool)mInventory[1].getItem()).doDamage(mInventory[1], mEUt/5); + ((GT_MetaGenerated_Tool)mInventory[1].getItem()).doDamage(mInventory[1], (long) Math.min(mEUt/5, Math.pow(mEUt, 0.7))); + if(mInventory[1]!=null&&mInventory[1].getItem().getDamage(mInventory[1])>mInventory[1].getMaxDamage()){ + mInventory[1]=null; + } } } } diff --git a/main/java/gregtech/api/util/GT_Config.java b/main/java/gregtech/api/util/GT_Config.java index 93b3a51e..9ad2ebab 100644 --- a/main/java/gregtech/api/util/GT_Config.java +++ b/main/java/gregtech/api/util/GT_Config.java @@ -36,11 +36,15 @@ public class GT_Config implements Runnable { Object rName = GT_OreDictUnificator.getAssociation(aStack); if (rName != null) return rName.toString(); try {if (GT_Utility.isStringValid(rName = aStack.getUnlocalizedName())) return rName.toString();} catch (Throwable e) {/*Do nothing*/} - return aStack.getItem() + "." + aStack.getItemDamage(); + String sName = aStack.getItem().toString(); + String[] tmp = sName.split("@"); + if(tmp.length>0)sName=tmp[0]; + return sName + "." + aStack.getItemDamage(); } public boolean get(Object aCategory, ItemStack aStack, boolean aDefault) { - return get(aCategory, getStackConfigName(aStack), aDefault); + String aName = getStackConfigName(aStack); + return get(aCategory, aName , aDefault); } public boolean get(Object aCategory, String aName, boolean aDefault) { diff --git a/main/java/gregtech/api/util/GT_Utility.java b/main/java/gregtech/api/util/GT_Utility.java index 2bfae10f..3285661d 100644 --- a/main/java/gregtech/api/util/GT_Utility.java +++ b/main/java/gregtech/api/util/GT_Utility.java @@ -1149,11 +1149,16 @@ public class GT_Utility { return aStack; } - public static boolean isOpaqueBlock(World aWorld, int aX, int aY, int aZ) { - return aWorld.getBlock(aX, aY, aZ).isOpaqueCube(); + public static boolean isBlockOccluded(World aWorld, int aX, int aY, int aZ, boolean aIgnoreUnloadedChunks, boolean aDefault) { + return isBlockOpaque(aWorld, aX+1, aY, aZ, aIgnoreUnloadedChunks, aDefault) && isBlockOpaque(aWorld, aX-1, aY, aZ, aIgnoreUnloadedChunks, aDefault) && isBlockOpaque(aWorld, aX, aY+1, aZ, T, aDefault) && isBlockOpaque(aWorld, aX, aY-1, aZ, T, aDefault) && isBlockOpaque(aWorld, aX, aY, aZ+1, aIgnoreUnloadedChunks, aDefault) && isBlockOpaque(aWorld, aX, aY, aZ-1, aIgnoreUnloadedChunks, aDefault); } - public static boolean isAirBlock(World aWorld, int aX, int aY, int aZ) { + public static boolean isBlockOpaque(World aWorld, int aX, int aY, int aZ, boolean aIgnoreUnloadedChunks, boolean aDefault) { + if (aIgnoreUnloadedChunks || aWorld.blockExists(aX, aY, aZ)) return aWorld.getBlock(aX, aY, aZ).isOpaqueCube(); + return aDefault; + } + + public static boolean isBlockAir(World aWorld, int aX, int aY, int aZ) { return aWorld.getBlock(aX, aY, aZ).isAir(aWorld, aX, aY, aZ); } diff --git a/main/java/gregtech/common/GT_Proxy.java b/main/java/gregtech/common/GT_Proxy.java index 0d01131a..97edf9f6 100644 --- a/main/java/gregtech/common/GT_Proxy.java +++ b/main/java/gregtech/common/GT_Proxy.java @@ -1822,6 +1822,12 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { }else if(tOre.mModID!=null&&tOre.mModID.toLowerCase().equals("rotarycraft")&&tOre.mPrefix==OrePrefixes.ingot&&tOre.mMaterial==Materials.HSLA){ GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); GT_OreDictUnificator.set(tOre.mPrefix,tOre.mMaterial,tOre.mEvent.Ore,(tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); + }else if(tOre.mModID!=null&&tOre.mModID.toLowerCase().equals("appliedenergistics2")&&tOre.mPrefix==OrePrefixes.gem&&tOre.mMaterial==Materials.CertusQuartz){ + GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); + GT_OreDictUnificator.set(tOre.mPrefix,tOre.mMaterial,tOre.mEvent.Ore,(tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); + }else if(tOre.mModID!=null&&tOre.mModID.toLowerCase().equals("appliedenergistics2")&&tOre.mPrefix==OrePrefixes.dust&&tOre.mMaterial==Materials.CertusQuartz){ + GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); + GT_OreDictUnificator.set(tOre.mPrefix,tOre.mMaterial,tOre.mEvent.Ore,(tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); }else if(GT_OreDictUnificator.isBlacklisted(tOre.mEvent.Ore)) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, true); } else { diff --git a/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java b/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java index ebe64977..07976c8e 100644 --- a/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java +++ b/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java @@ -60,7 +60,7 @@ public class GT_TileEntity_Ores public Packet getDescriptionPacket() { if (!this.worldObj.isRemote) { - if ((this.mBlocked == (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord + 1, this.yCoord, this.zCoord)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord - 1, this.yCoord, this.zCoord)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord + 1, this.zCoord)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord - 1, this.zCoord)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord, this.zCoord + 1)) && (GT_Utility.isOpaqueBlock(this.worldObj, this.xCoord, this.yCoord, this.zCoord - 1)) ? 1 : 0) == 0) { + if (GT_Utility.isBlockOccluded(worldObj, xCoord, yCoord, zCoord, false, true)) { GT_Values.NW.sendPacketToAllPlayersInRange(this.worldObj, new GT_Packet_Ores(this.xCoord, (short)this.yCoord, this.zCoord, this.mMetaData), this.xCoord, this.zCoord); } } diff --git a/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java b/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java index b1694be4..4a910152 100644 --- a/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java +++ b/main/java/gregtech/common/covers/GT_Cover_LiquidMeter.java @@ -33,9 +33,9 @@ public class GT_Cover_LiquidMeter } tAll /= 14L; if (tAll > 0L) { - aTileEntity.setOutputRedstoneSignal(aSide, aCoverVariable == 0 ? 0 : tFull > 0L ? (byte)(int)(tFull / tAll + 1L) : (byte)(int)(15L - (tFull > 0L ? tFull / tAll + 1L : 0L))); + aTileEntity.setOutputRedstoneSignal(aSide, aCoverVariable != 0 ? (byte)(int)(15L - (tFull <= 0L ? 0L : tFull / tAll + 1L)) : tFull <= 0L ? 0 : (byte)(int)(tFull / tAll + 1L)); } else { - aTileEntity.setOutputRedstoneSignal(aSide, (byte)(aCoverVariable == 0 ? 0 : 15)); + aTileEntity.setOutputRedstoneSignal(aSide, ((byte)(aCoverVariable != 0 ? 15 : 0))); } } else @@ -94,10 +94,4 @@ public class GT_Cover_LiquidMeter { return 5; } -} - - -/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar - * Qualified Name: gregtech.common.covers.GT_Cover_LiquidMeter - * JD-Core Version: 0.7.0.1 - */ \ No newline at end of file +} \ No newline at end of file diff --git a/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java b/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java index 38b22778..308df2f1 100644 --- a/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java +++ b/main/java/gregtech/common/covers/GT_Cover_SolarPanel.java @@ -38,10 +38,4 @@ public class GT_Cover_SolarPanel { return 1; } -} - - -/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar - * Qualified Name: gregtech.common.covers.GT_Cover_SolarPanel - * JD-Core Version: 0.7.0.1 - */ \ No newline at end of file +} \ No newline at end of file diff --git a/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java b/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java index 273de13e..5f7ff478 100644 --- a/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java +++ b/main/java/gregtech/common/items/GT_MetaGenerated_Item_01.java @@ -795,7 +795,7 @@ public class GT_MetaGenerated_Item_01 GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneTransmitterExternal.get(1L, new Object[0]), new Object[]{ItemList.Cover_RedstoneTransmitterInternal.get(1L, new Object[0])}); GT_ModHandler.addShapelessCraftingRecipe(ItemList.Cover_RedstoneReceiverExternal.get(1L, new Object[0]), new Object[]{ItemList.Cover_RedstoneReceiverInternal.get(1L, new Object[0])}); - ItemList.Cover_NeedsMaintainance.set(addItem(tLastID = 748, "Needs Maintainance Cover", "Emits Redstone Signal if Multiblock Machine needs Maintainance", new Object[] { new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L) })); + ItemList.Cover_NeedsMaintainance.set(addItem(tLastID = 748, "Needs Maintainance Cover", "Attach to Multiblock Controller. Emits Redstone Signal if needs Maintainance", new Object[] { new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L), new TC_Aspects.TC_AspectStack(TC_Aspects.MACHINA, 1L) })); GregTech_API.registerCover(ItemList.Cover_NeedsMaintainance.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[2][0], new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ACTIVITYDETECTOR) }), new GT_Cover_NeedMaintainance()); GT_Values.RA.addAssemblerRecipe(ItemList.Emitter_MV.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Aluminium, 1L),ItemList.Cover_NeedsMaintainance.get(1L, new Object[0]) , 600, 24); } diff --git a/main/java/gregtech/common/items/behaviors/Behaviour_Hoe.java b/main/java/gregtech/common/items/behaviors/Behaviour_Hoe.java index 08674122..24a22ef3 100644 --- a/main/java/gregtech/common/items/behaviors/Behaviour_Hoe.java +++ b/main/java/gregtech/common/items/behaviors/Behaviour_Hoe.java @@ -43,7 +43,7 @@ public class Behaviour_Hoe return true; } Block aBlock = aWorld.getBlock(aX, aY, aZ); - if ((aSide != 0) && (GT_Utility.isAirBlock(aWorld, aX, aY + 1, aZ)) && ((aBlock == Blocks.grass) || (aBlock == Blocks.dirt))) + if ((aSide != 0) && (GT_Utility.isBlockAir(aWorld, aX, aY + 1, aZ)) && ((aBlock == Blocks.grass) || (aBlock == Blocks.dirt))) { aWorld.playSoundEffect(aX + 0.5F, aY + 0.5F, aZ + 0.5F, Blocks.farmland.stepSound.getStepResourcePath(), (Blocks.farmland.stepSound.getVolume() + 1.0F) / 2.0F, Blocks.farmland.stepSound.getPitch() * 0.8F); if (aWorld.isRemote) { diff --git a/main/java/gregtech/common/items/behaviors/Behaviour_Lighter.java b/main/java/gregtech/common/items/behaviors/Behaviour_Lighter.java index 286048a4..b8ef7d32 100644 --- a/main/java/gregtech/common/items/behaviors/Behaviour_Lighter.java +++ b/main/java/gregtech/common/items/behaviors/Behaviour_Lighter.java @@ -77,7 +77,7 @@ public class Behaviour_Lighter ForgeDirection tDirection = ForgeDirection.getOrientation(aSide); aX += tDirection.offsetX;aY += tDirection.offsetY;aZ += tDirection.offsetZ; - if ((!GT_Utility.isAirBlock(aWorld, aX, aY, aZ)) || (!aPlayer.canPlayerEdit(aX, aY, aZ, aSide, aStack))) { + if ((!GT_Utility.isBlockAir(aWorld, aX, aY, aZ)) || (!aPlayer.canPlayerEdit(aX, aY, aZ, aSide, aStack))) { return false; } prepare(aStack); diff --git a/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java b/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java index da841a59..74450f51 100644 --- a/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java +++ b/main/java/gregtech/common/tileentities/boilers/GT_MetaTileEntity_Boiler_Solar.java @@ -138,8 +138,8 @@ public class GT_MetaTileEntity_Boiler_Solar } if ((this.mProcessingEnergy <= 0) && (aBaseMetaTileEntity.isAllowedToWork()) && (aTick % 256L == 0L) && (!aBaseMetaTileEntity.getWorld().isThundering())) { - boolean bRain = (aBaseMetaTileEntity.getWorld().isRaining()) && (aBaseMetaTileEntity.getBiome().rainfall > 0.0F); - this.mProcessingEnergy += (((!bRain) || (aBaseMetaTileEntity.getWorld().skylightSubtracted < 4)) && (aBaseMetaTileEntity.getSkyAtSide((byte)1)) ? 8 : (bRain) || (!aBaseMetaTileEntity.getWorld().isDaytime()) ? 1 : 0); + boolean bRain = aBaseMetaTileEntity.getWorld().isRaining() && aBaseMetaTileEntity.getBiome().rainfall > 0.0F; + mProcessingEnergy += bRain && aBaseMetaTileEntity.getWorld().skylightSubtracted >= 4 || !aBaseMetaTileEntity.getSkyAtSide((byte)1) ? 0 : !bRain && aBaseMetaTileEntity.getWorld().isDaytime() ? 8 : 1; } if ((this.mTemperature < 500) && (this.mProcessingEnergy > 0) && (aTick % 12L == 0L)) { diff --git a/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java b/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java index c57cdac7..cbc8d1ee 100644 --- a/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java +++ b/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_FluidNaquadahReactor.java @@ -20,7 +20,7 @@ public class GT_MetaTileEntity_FluidNaquadahReactor public GT_MetaTileEntity_FluidNaquadahReactor(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, "Requires Fluid Heavy Naquadah", new ITexture[0]); + super(aID, aName, aNameRegional, aTier, "Requires Enriched Naquadah Cells", new ITexture[0]); } public GT_MetaTileEntity_FluidNaquadahReactor(String aName, int aTier, String aDescription, ITexture[][][] aTextures) diff --git a/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java b/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java index 3c2fc3c7..bdf62625 100644 --- a/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java +++ b/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java @@ -169,8 +169,8 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { if (yHead <= 0) { return false; } - if ((!consumeFluid(getBaseMetaTileEntity().getXCoord(), yHead - 1, getBaseMetaTileEntity().getZCoord())) - && (!getBaseMetaTileEntity().getAir(getBaseMetaTileEntity().getXCoord(), yHead - 1, getBaseMetaTileEntity().getZCoord()))) { + 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))))) { @@ -306,11 +306,15 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { getBaseMetaTileEntity().decreaseStoredEnergyUnits(4*((int)Math.pow(4, this.mTier)), true); } } - if ((aBlock instanceof IFluidBlock)) { + 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 { + }else if(this.mFluid.isFluidEqual(((IFluidBlock) aBlock).drain(getBaseMetaTileEntity().getWorld(), aX, aY, aZ, false))){ + this.getBaseMetaTileEntity().getWorld().setBlockToAir( aX, aY, aZ); + this.mFluid.amount += 1000; + getBaseMetaTileEntity().decreaseStoredEnergyUnits(16*((int)Math.pow(4, this.mTier)), true); + }else { return false; } } 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 d2e527fd..435d9fea 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 @@ -108,7 +108,7 @@ public abstract class GT_MetaTileEntity_LargeTurbine extends GT_MetaTileEntity_M public abstract byte getCasingTextureIndex(); private boolean addToMachineList(IGregTechTileEntity tTileEntity){ - return ((addMaintenanceToMachineList(tTileEntity, getCasingTextureIndex())) || (addInputToMachineList(tTileEntity, getCasingTextureIndex())) || (addOutputToMachineList(tTileEntity, getCasingTextureIndex()))); + return ((addMaintenanceToMachineList(tTileEntity, getCasingTextureIndex())) || (addInputToMachineList(tTileEntity, getCasingTextureIndex())) || (addOutputToMachineList(tTileEntity, getCasingTextureIndex()))|| (addMufflerToMachineList(tTileEntity, getCasingTextureIndex()))); } @Override diff --git a/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java b/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java index abf8458a..8a4014fe 100644 --- a/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java +++ b/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java @@ -37,6 +37,7 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT "1x Input Hatch (side centered)", "1x Dynamo Hatch (back centered)", "1x Maintenance Hatch (side centered)", + "1x Muffler Hatch (side centered)", "Turbine Casings for the rest (24 at least!)", "Needs a Turbine Item (inside controller GUI)"}; } @@ -44,6 +45,9 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT @Override public boolean checkRecipe(ItemStack aStack) { ArrayList steams = getStoredFluids(); + if(this.mMufflerHatches.size()==0){ + return false; + } if (steams.size()>0) {if(baseEff==0 || optFlow == 0 || counter >= 1000 || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled() || this.getBaseMetaTileEntity().hasInventoryBeenModified()){ counter = 0; @@ -62,7 +66,10 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT if(mEUt==0){return false;} return true; } - return false; + if(this.mEfficiency>50){ + this.mEfficiency = this.mEfficiency-50; + return true; + }else{return false;} } public int getFuelValue(FluidStack aLiquid) { diff --git a/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java b/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java index c85e79f5..9e4d31e3 100644 --- a/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java +++ b/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java @@ -67,7 +67,10 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La addOutput(GT_ModHandler.getSteam(distOut)); return true; } - return false; + if(this.mEfficiency>50){ + this.mEfficiency = this.mEfficiency-50; + return true; + }else{return false;} } @Override diff --git a/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java b/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java index 0c4b88b6..25ec018e 100644 --- a/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java +++ b/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java @@ -54,7 +54,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar int tEU=0; for(int i=0;i0&&depleteInput(new FluidStack(steams.get(i),optFlow/(fuelValue*2)))){ + if(fuelValue>0&&depleteInput(new FluidStack(steams.get(i),Math.max(optFlow/(fuelValue*2),1)))){ tEU += optFlow/2;} } this.mEUt = baseEff*tEU/10000; @@ -63,8 +63,11 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar if(mEUt==0){return false;} return true; } - return false; - } + if(this.mEfficiency>50){ + this.mEfficiency = this.mEfficiency-50; + return true; + }else{return false;} + } public int getFuelValue(FluidStack aLiquid) { if (aLiquid == null || GT_Recipe_Map.sTurbineFuels == null) return 0; diff --git a/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java b/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java index 2170cfa5..dc88d453 100644 --- a/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java +++ b/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java @@ -67,7 +67,10 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg addOutput(GT_ModHandler.getDistilledWater(distOut)); return true; } - return false; + if(this.mEfficiency>50){ + this.mEfficiency = this.mEfficiency-50; + return true; + }else{return false;} } @Override diff --git a/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java b/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java index 9b0b1683..dca6a929 100644 --- a/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java +++ b/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_QuantumChest.java @@ -28,7 +28,7 @@ import gregtech.api.util.GT_Utility; import gregtech.common.gui.GT_Container_QuantumChest; import gregtech.common.gui.GT_GUIContainer_QuantumChest; -public class GT_MetaTileEntity_QuantumChest extends GT_MetaTileEntity_TieredMachineBlock { +public class GT_MetaTileEntity_QuantumChest extends GT_MetaTileEntity_TieredMachineBlock{ public GT_MetaTileEntity_QuantumChest(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier, 3, "This Chest stores "+((int)((Math.pow(6, aTier))*270000))+" Blocks"); } diff --git a/main/java/gregtech/common/tools/GT_Tool_Crowbar.java b/main/java/gregtech/common/tools/GT_Tool_Crowbar.java index efbb70ab..1451b05e 100644 --- a/main/java/gregtech/common/tools/GT_Tool_Crowbar.java +++ b/main/java/gregtech/common/tools/GT_Tool_Crowbar.java @@ -111,7 +111,7 @@ public class GT_Tool_Crowbar { for (Iterator i$ = GT_MetaGenerated_Tool_01.INSTANCE.mToolStats.values().iterator(); i$.hasNext(); i$.next()) { - if (((i$ instanceof GT_Tool_Crowbar)) || (!((IToolStats)i$).isMinableBlock(aBlock, aMetaData))) {return false;} + if (((i$ instanceof GT_Tool_Crowbar)) && (!((IToolStats)i$).isMinableBlock(aBlock, aMetaData))) {return false;} } return true; } diff --git a/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java b/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java index 250eeff6..effba804 100644 --- a/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java +++ b/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java @@ -61,7 +61,7 @@ public class ProcessingItem implements gregtech.api.interfaces.IOreRecipeRegistr GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Uranium, 3628800L, new MaterialStack[0])); } else { - System.out.println("Item Name: " + aOreDictName + " !!!Unknown Item detected!!! Please report to GregTech Intergalactical for additional compatiblity. This is not an Error, it's just an Information."); + //System.out.println("Item Name: " + aOreDictName + " !!!Unknown Item detected!!! Please report to GregTech Intergalactical for additional compatiblity. This is not an Error, it's just an Information."); } } } diff --git a/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 8d458486..cac1cd7c 100644 --- a/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -621,7 +621,7 @@ public class GT_MachineRecipeLoader GT_ModHandler.addCompressionRecipe(new ItemStack(Items.quartz, 4, 0), new ItemStack(Blocks.quartz_block, 1, 0)); GT_ModHandler.addCompressionRecipe(new ItemStack(Items.wheat, 9, 0), new ItemStack(Blocks.hay_block, 1, 0)); GT_ModHandler.addCompressionRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 4L), new ItemStack(Blocks.glowstone, 1)); - GT_ModHandler.addCompressionRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Graphite, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Graphite, 1L)); + GT_Values.RA.addCutterRecipe(GT_OreDictUnificator.get(OrePrefixes.block, Materials.Graphite, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Graphite, 9L), GT_Values.NI, 500, 48); GT_ModHandler.addPulverisationRecipe(GT_ModHandler.getModItem("appliedenergistics2", "tile.BlockSkyStone", 1L, 32767), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 45), GT_Values.NI, 0, false); diff --git a/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java b/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java index 33b4d4e9..a96d4a8a 100644 --- a/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java +++ b/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java @@ -932,7 +932,7 @@ public class GT_Loader_MetaTileEntities ItemList.Generator_Naquadah_Mark_I.set(new GT_MetaTileEntity_SolidNaquadahReactor(1190, "basicgenerator.naquadah.tier.04", "Naquadah Reactor Mark I", 4).getStackForm(1L)); ItemList.Generator_Naquadah_Mark_II.set(new GT_MetaTileEntity_SolidNaquadahReactor(1191, "basicgenerator.naquadah.tier.05", "Naquadah Reactor Mark II", 5).getStackForm(1L)); - ItemList.Generator_Naquadah_Fluid.set(new GT_MetaTileEntity_FluidNaquadahReactor(1192, "basicgenerator.naquadah.tier.06", "Fluid Naquadah Reactor", 6).getStackForm(1L)); + ItemList.Generator_Naquadah_Fluid.set(new GT_MetaTileEntity_FluidNaquadahReactor(1192, "basicgenerator.naquadah.tier.06", "Naquadah Reactor Mark III", 6).getStackForm(1L)); GT_ModHandler.addCraftingRecipe(ItemList.Generator_Naquadah_Mark_I.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "UCU", "FMF", "WCW", Character.valueOf('M'), ItemList.Hull_EV, Character.valueOf('F'), ItemList.Field_Generator_EV, Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Master), Character.valueOf('W'), OrePrefixes.cableGt04.get(Materials.Aluminium), Character.valueOf('U'), OrePrefixes.stick.get(Materials.Uranium235) }); GT_ModHandler.addCraftingRecipe(ItemList.Generator_Naquadah_Mark_II.get(1L, new Object[0]), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE | GT_ModHandler.RecipeBits.BUFFERED, new Object[] { "PCP", "FMF", "WCW", Character.valueOf('M'), ItemList.Hull_IV, Character.valueOf('F'), ItemList.Field_Generator_IV, Character.valueOf('C'), OrePrefixes.circuit.get(Materials.Master), Character.valueOf('W'), OrePrefixes.cableGt04.get(Materials.Tungsten), Character.valueOf('P'), OrePrefixes.stick.get(Materials.Plutonium241) });