From 3106bfe8a22fc4c8d75875ade21c56c2d0b6f392 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Fri, 4 Dec 2015 22:44:27 +0100 Subject: [PATCH] Fix CarbonDioxide, lower outputstacksize by screwdriver + shift and hide blocks without materials --- src/main/java/gregtech/api/enums/Materials.java | 2 +- .../implementations/GT_MetaTileEntity_Buffer.java | 3 ++- src/main/java/gregtech/common/blocks/GT_Block_Metal.java | 5 +++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index ffca72e0..2ecab18e 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -420,7 +420,7 @@ public enum Materials implements IColorModulationContainer, ISubTagContainer { * First Degree Compounds */ Methane ( 715, TextureSet.SET_FLUID , 1.0F, 0, 1, 16 , 255, 255, 255, 0, "Methane" , 1, 45, -1, 0, false, false, 3, 1, 1, Dyes.dyeMagenta , 1, Arrays.asList(new MaterialStack(Carbon, 1), new MaterialStack(Hydrogen, 4))), - CarbonDioxide ( 497, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 169, 208, 245, 240, "Carbon Dioxide" , 0, 0, 25, 1, false, true, 1, 1, 1, Dyes.dyeLightBlue , 0, Arrays.asList(new MaterialStack(Carbon, 9), new MaterialStack(Oxygen, 3))), + CarbonDioxide ( 497, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 169, 208, 245, 240, "Carbon Dioxide" , 0, 0, 25, 1, false, true, 1, 1, 1, Dyes.dyeLightBlue , 0, Arrays.asList(new MaterialStack(Carbon, 1), new MaterialStack(Oxygen, 2))), NobleGases ( 496, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 169, 208, 245, 240, "Noble Gases" , 0, 0, 4, 0, false, true, 1, 1, 1, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(CarbonDioxide,21),new MaterialStack(Helium, 9), new MaterialStack(Methane, 3), new MaterialStack(Deuterium, 1))), Air ( -1, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 169, 208, 245, 240, "Air" , 0, 0, -1, 0, false, true, 1, 1, 1, Dyes.dyeLightBlue , 0, Arrays.asList(new MaterialStack(Nitrogen, 40), new MaterialStack(Oxygen, 11), new MaterialStack(Argon, 1),new MaterialStack(NobleGases,1))), LiquidAir ( 495, TextureSet.SET_FLUID , 1.0F, 0, 2, 16|32 , 169, 208, 245, 240, "Liquid Air" , 0, 0, 4, 0, false, true, 1, 1, 1, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Nitrogen, 40), new MaterialStack(Oxygen, 11), new MaterialStack(Argon, 1),new MaterialStack(NobleGases,1))), diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java index d631cf41..70086be2 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java @@ -204,7 +204,8 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { if (aSide == getBaseMetaTileEntity().getBackFacing()) { - mTargetStackSize = (byte) ((mTargetStackSize + 1) % 65); + + mTargetStackSize = (byte) ((mTargetStackSize + (aPlayer.isSneaking()? -1 : 1)) % 65); if (mTargetStackSize == 0) { GT_Utility.sendChatToPlayer(aPlayer, "Do not regulate Item Stack Size"); } else { diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Metal.java b/src/main/java/gregtech/common/blocks/GT_Block_Metal.java index 53eec284..58e1996b 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Metal.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Metal.java @@ -1,9 +1,11 @@ package gregtech.common.blocks; +import cpw.mods.fml.common.Loader; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.interfaces.IIconContainer; import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import net.minecraft.block.material.Material; import net.minecraft.item.ItemStack; @@ -23,6 +25,9 @@ public class GT_Block_Metal extends GT_Block_Storage { GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + i + ".name", "Block of " + aMats[i].mDefaultLocalName); GT_OreDictUnificator.registerOre(aPrefix, aMats[i], new ItemStack(this, 1, i)); } + if(aMats.length<16 && Loader.isModLoaded("NotEnoughItems")){ + for( int i = aMats.length;i<16;i++)codechicken.nei.api.API.hideItem(new ItemStack(this, 1, i)); + } } public IIcon getIcon(int aSide, int aMeta) {