Crops, bugfixes.

This commit is contained in:
Dragon2488 2017-02-11 19:29:29 +07:00
parent e14e381ffc
commit c5cab28bfa
213 changed files with 79 additions and 134 deletions
build.gradlebuild.properties
src/main
java/gregtech
resources/assets/gregtech/textures/blocks/crop
blockCrop.Argentia.1.pngblockCrop.Argentia.2.pngblockCrop.Argentia.3.pngblockCrop.Argentia.4.pngblockCrop.Bauxia.1.pngblockCrop.Bauxia.2.pngblockCrop.Bauxia.3.pngblockCrop.Blazereed.1.pngblockCrop.Blazereed.2.pngblockCrop.Blazereed.3.pngblockCrop.Blazereed.4.pngblockCrop.Bobsyeruncleranks.1.pngblockCrop.Bobsyeruncleranks.2.pngblockCrop.Bobsyeruncleranks.3.pngblockCrop.Bobsyeruncleranks.4.pngblockCrop.Brown Mushrooms.1.pngblockCrop.Brown Mushrooms.2.pngblockCrop.Brown Mushrooms.3.pngblockCrop.Chilly.1.pngblockCrop.Chilly.2.pngblockCrop.Chilly.3.pngblockCrop.Chilly.4.pngblockCrop.Coppon.1.pngblockCrop.Coppon.2.pngblockCrop.Coppon.3.pngblockCrop.Corium.1.pngblockCrop.Corium.2.pngblockCrop.Corium.3.pngblockCrop.Corium.4.pngblockCrop.Corpseplant.1.pngblockCrop.Corpseplant.2.pngblockCrop.Corpseplant.3.pngblockCrop.Corpseplant.4.pngblockCrop.Creeperweed.1.pngblockCrop.Creeperweed.2.pngblockCrop.Creeperweed.3.pngblockCrop.Creeperweed.4.pngblockCrop.Cucumber.1.pngblockCrop.Cucumber.2.pngblockCrop.Cucumber.3.pngblockCrop.Cucumber.4.pngblockCrop.Diareed.1.pngblockCrop.Diareed.2.pngblockCrop.Diareed.3.pngblockCrop.Diareed.4.pngblockCrop.Eggplant.1.pngblockCrop.Eggplant.2.pngblockCrop.Eggplant.3.pngblockCrop.Enderbloom.1.pngblockCrop.Enderbloom.2.pngblockCrop.Enderbloom.3.pngblockCrop.Enderbloom.4.pngblockCrop.Evil Ore.1.pngblockCrop.Evil Ore.2.pngblockCrop.Evil Ore.3.pngblockCrop.Evil Ore.4.pngblockCrop.Fertilia.1.pngblockCrop.Fertilia.2.pngblockCrop.Fertilia.3.pngblockCrop.Fertilia.4.pngblockCrop.Flax.1.pngblockCrop.Flax.2.pngblockCrop.Flax.3.pngblockCrop.Flax.4.pngblockCrop.Galvania.1.pngblockCrop.Galvania.2.pngblockCrop.Galvania.3.pngblockCrop.Glowheat.1.pngblockCrop.Glowheat.2.pngblockCrop.Glowheat.3.pngblockCrop.Glowheat.4.pngblockCrop.Glowheat.5.pngblockCrop.Glowheat.6.pngblockCrop.Glowheat.7.pngblockCrop.God of Thunder.1.pngblockCrop.God of Thunder.2.pngblockCrop.God of Thunder.3.pngblockCrop.God of Thunder.4.pngblockCrop.Grape.1.pngblockCrop.Grape.2.pngblockCrop.Grape.3.pngblockCrop.Grape.4.pngblockCrop.Indigo.1.pngblockCrop.Indigo.2.pngblockCrop.Indigo.3.pngblockCrop.Indigo.4.pngblockCrop.Lazulia.1.pngblockCrop.Lazulia.2.pngblockCrop.Lazulia.3.pngblockCrop.Lazulia.4.pngblockCrop.Lemon.1.png

View file

@ -132,26 +132,11 @@ processResources
task source(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
manifest {
attributes 'FMLCorePlugin': 'gregtech.asm.ASM'
attributes 'FMLCorePluginContainsFMLMod': 'true'
}
}
jar {
manifest {
attributes 'FMLCorePlugin': 'gregtech.asm.ASM'
attributes 'FMLCorePluginContainsFMLMod': 'true'
}
}
task dev(type: Jar) {
from sourceSets.main.output
classifier = 'dev'
manifest {
attributes 'FMLCorePlugin': 'gregtech.asm.ASM'
attributes 'FMLCorePluginContainsFMLMod': 'true'
}
}
artifacts {

View file

@ -1,10 +1,10 @@
minecraft.version=1.10.2
forge.version=12.18.1.2079
gt.version=5.10.34
gt.version=5.10.40
forestry.version=5.2.7.220
ic2.version=2.6.151-ex110
ic2.version=2.6.99-ex110
jei.version=3.7.10.237
codechickenlib.version=2.4.3.162

View file

@ -279,7 +279,7 @@ public class Materials implements IColorModulationContainer, ISubTagContainer {
public static Materials Inolashite = new Materials(954, TextureSet.SET_NONE, 8.0F, 2304, 3, 1 | 2 | 8 | 16 | 64, 148, 216, 187, 0, "Inolashite", "Inolashite", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL);
public static Materials Invisium = new Materials(-1, TextureSet.SET_NONE, 1.0F, 0, 2, 1, 255, 255, 255, 0, "Invisium", "Invisium", 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL);
public static Materials Jade = new Materials(537, TextureSet.SET_SHINY, 1.0F, 0, 2, 1, 0, 100, 0, 0, "Jade", "Jade", 0, 0, -1, 0, false, false, 5, 1, 1, Dyes.dyeGreen, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 6), new TC_AspectStack(TC_Aspects.VITREUS, 3)));
public static Materials Jasper = new Materials(511, TextureSet.SET_EMERALD, 1.0F, 0, 2, 1|4, 200, 80, 80, 100, "Jasper", "Jasper", 0, 0, -1, 0, false, true, 3, 1, 1, Dyes.dyeRed, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 4), new TC_AspectStack(TC_Aspects.VITREUS, 2)));
public static Materials Jasper = new Materials(511, TextureSet.SET_EMERALD, 1.0F, 0, 2, 1|4|8, 200, 80, 80, 100, "Jasper", "Jasper", 0, 0, -1, 0, false, true, 3, 1, 1, Dyes.dyeRed, Arrays.asList(new TC_Aspects.TC_AspectStack(TC_Aspects.LUCRUM, 4), new TC_AspectStack(TC_Aspects.VITREUS, 2)));
public static Materials Kalendrite = new Materials(953, TextureSet.SET_METALLIC,5.0F, 2560, 3, 1 | 2 | 16, 170, 91, 189, 0, "Kalendrite", "Kalendrite", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes._NULL);
public static Materials Komatiite = new Materials(869, TextureSet.SET_DULL, 1.0F, 0, 1, 1, 255, 255, 255, 0, "Komatiite", "Komatiite", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow);
public static Materials Lava = new Materials(700, TextureSet.SET_FLUID, 1.0F, 0, 1, 16, 255, 64, 0, 0, "Lava", "Lava", 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeOrange);

View file

@ -18,16 +18,18 @@ import net.minecraftforge.fml.common.Loader;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import static gregtech.api.enums.GT_Values.E;
public class GT_BaseCrop extends CropCard {
public static ArrayList<GT_BaseCrop> sCropList = new ArrayList<GT_BaseCrop>();
private String mName = E, mDiscoveredBy = "Gregorius Techneticies", mAttributes[];
private String mName = E, mDiscoveredBy = "Gregorius Techneticies";
private int mTier = 0, mMaxSize = 0, mAfterHarvestSize = 0, mHarvestSize = 0, mStats[] = new int[5], mGrowthSpeed = 0;
private String[] mAttributes = new String[0];
private ItemStack mDrop = null, mSpecialDrops[] = null;
private Materials mBlock = null;
private static boolean bIc2NeiLoaded = Loader.isModLoaded("Ic2Nei");
/**
* To create new Crops
@ -76,18 +78,14 @@ public class GT_BaseCrop extends CropCard {
mStats[2] = aStatDefensive;
mStats[3] = aStatColor;
mStats[4] = aStatWeed;
mGrowthSpeed = aGrowthSpeed;
mAttributes = aAttributes;
mBlock = aBlock;
if(GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.crops, aCropName, true)){
Crops.instance.registerCrop(this);
if (aBaseSeed != null) Crops.instance.registerBaseSeed(aBaseSeed, this, 1, 1, 1, 1);
sCropList.add(this);}
}
if (bIc2NeiLoaded) {
try {
Class.forName("speiger.src.crops.api.CropPluginAPI").getMethod("registerCropInfo", Class.forName("speiger.src.crops.api.ICropCardInfo")).invoke(Class.forName("speiger.src.crops.api.CropPluginAPI").getField("instance"), this);
} catch (IllegalAccessException | IllegalArgumentException | NoSuchFieldException | java.lang.reflect.InvocationTargetException | ClassNotFoundException | NoSuchMethodException | SecurityException ex) {
bIc2NeiLoaded = false;
if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.crops, aCropName, true)) {
GT_LanguageManager.addStringLocalization(getUnlocalizedName(), aCropName);
Crops.instance.registerCrop(this);
if (aBaseSeed != null) Crops.instance.registerBaseSeed(aBaseSeed, this, 1, 1, 1, 1);
sCropList.add(this);
}
}
}
@ -103,7 +101,8 @@ public class GT_BaseCrop extends CropCard {
return getTier() * mGrowthSpeed;
}
public int getrootslength(ICropTile crop) {
@Override
public int getRootsLength(ICropTile cropTile) {
return 5;
}
@ -140,19 +139,37 @@ public class GT_BaseCrop extends CropCard {
}
@Override
public String getOwner() {
public String getDiscoveredBy() {
return mDiscoveredBy;
}
@Override
public CropProperties getProperties() {
return new CropProperties(getTier(), 0, 0, 1, 0, 1);
public String getOwner() {
return "gregtech";
}
@Override
public CropProperties getProperties() {
return new CropProperties(getTier(), mStats[0], mStats[1], mStats[2], mStats[3], mStats[4]);
}
@Override
public String[] getAttributes() {
return mAttributes;
}
/*@Override
public String getCropInformation() {
if(mBlock != null) {
return String.format("Requires %s Ore or Block of %s as soil block to reach full growth.", mBlock.mName, mBlock.mName);
}
return "";
}*/
@Override
public ItemStack getGain(ICropTile aCrop) {
int tDrop = 0;
if (mSpecialDrops != null && (tDrop = java.util.concurrent.ThreadLocalRandom.current().nextInt(0, (mSpecialDrops.length*2) + 2)) < mSpecialDrops.length && mSpecialDrops[tDrop] != null) {
int tDrop;
if (mSpecialDrops != null && (tDrop = aCrop.getWorld().rand.nextInt((mSpecialDrops.length*2) + 2)) < mSpecialDrops.length && mSpecialDrops[tDrop] != null) {
return GT_Utility.copy(mSpecialDrops[tDrop]);
}
return GT_Utility.copy(mDrop);
@ -164,10 +181,10 @@ public class GT_BaseCrop extends CropCard {
}
@Override
public List<ResourceLocation> getTexturesLocation() {
List<ResourceLocation> list = new ArrayList<ResourceLocation>();
public List<ResourceLocation> getModelLocation() {
List<ResourceLocation> list = new ArrayList<>();
for (int size = 1; size <= getMaxSize(); size++) {
list.add(new ResourceLocation("ic2", "blocks/crop/blockCrop." + getId() + "." + size));
list.add(new ResourceLocation(getOwner(), "blocks/crop/blockCrop." + getId() + "." + size));
}
return list;
}
@ -177,54 +194,18 @@ public class GT_BaseCrop extends CropCard {
if (aCrop == null) {
return false;
}
for (int i = 1; i < this.getrootslength(aCrop); i++) {
Block tBlock = aCrop.getWorld().getBlockState(aCrop.getLocation().down()).getBlock();
/*if ((tBlock instanceof GT_Block_Ores_Abstract)) {
TileEntity tTileEntity = aCrop.getWorld().getTileEntity(aCrop.getLocation().down());
if ((tTileEntity instanceof GT_TileEntity_Ores)) {
Materials tMaterial = GregTech_API.sGeneratedMaterials[(((GT_TileEntity_Ores) tTileEntity).mMetaData % 1000)];
if ((tMaterial != null) && (tMaterial != Materials._NULL)) {
return tMaterial == mBlock;
}
}
} else*/ {
IBlockState downState = aCrop.getWorld().getBlockState(aCrop.getLocation().down());
int tMetaID = downState.getBlock().getMetaFromState(downState);
ItemData tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(tBlock, 1, tMetaID));
if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore")) && (tAssotiation.mMaterial.mMaterial == mBlock)) {
return true;
}
if ((tAssotiation != null) && (tAssotiation.mPrefix == OrePrefixes.block) && (tAssotiation.mMaterial.mMaterial == mBlock)) {
return true;
}
for (int i = 1; i < this.getRootsLength(aCrop); i++) {
IBlockState downState = aCrop.getWorld().getBlockState(aCrop.getLocation().down());
int tMetaID = downState.getBlock().getMetaFromState(downState);
ItemData tAssotiation = GT_OreDictUnificator.getAssociation(new ItemStack(downState.getBlock(), 1, tMetaID));
if ((tAssotiation != null) && (tAssotiation.mPrefix.toString().startsWith("ore")) && (tAssotiation.mMaterial.mMaterial == mBlock)) {
return true;
}
if ((tAssotiation != null) && (tAssotiation.mPrefix == OrePrefixes.block) && (tAssotiation.mMaterial.mMaterial == mBlock)) {
return true;
}
// Block block = aCrop.getWorld().getBlock(aCrop.getLocation().posX, aCrop.getLocation().posY - i, aCrop.getLocation().posZ);
// if (block.isAir(aCrop.getWorld(), aCrop.getLocation().posX, aCrop.getLocation().posY - i, aCrop.getLocation().posZ)) {
// return false;
// }
// if (block == mBlock) {
// int tMeta = aCrop.getWorld().getBlockMetadata(aCrop.getLocation().posX, aCrop.getLocation().posY - i, aCrop.getLocation().posZ);
// if(mMeta < 0 || tMeta == mMeta){
// return true;}
// }
}
return false;
}
public List<String> getCropInformation() {
if (mBlock != null) {
ArrayList<String> result = new ArrayList<String>(1);
result.add(String.format("Requires %s Ore or Block of %s as soil block to reach full growth.", mBlock.mName, mBlock.mName));
return result;
}
return null;
}
public ItemStack getDisplayItem() {
if (mSpecialDrops != null && mSpecialDrops[mSpecialDrops.length - 1] != null) {
return GT_Utility.copy(mSpecialDrops[mSpecialDrops.length - 1]);
}
return GT_Utility.copy(mDrop);
}
}

View file

@ -11,12 +11,12 @@ import gregtech.api.objects.GT_ItemStack;
import gregtech.api.objects.ItemData;
import ic2.api.item.ElectricItem;
import ic2.api.item.IBoxable;
import ic2.api.item.IC2Items;
import ic2.api.item.IElectricItem;
import ic2.api.item.ISpecialElectricItem;
import ic2.api.reactor.IReactorComponent;
import ic2.api.recipe.*;
import ic2.core.block.state.IIdProvider;
import ic2.core.init.OreValues;
import ic2.core.ref.BlockName;
import ic2.core.ref.FluidName;
import ic2.core.ref.ItemName;
@ -393,34 +393,13 @@ public class GT_ModHandler {
return rStack;
}
/**
* OUT OF ORDER
*/
public static boolean getModeKeyDown(EntityPlayer aPlayer) {
return false;
}
/**
* OUT OF ORDER
*/
public static boolean getBoostKeyDown(EntityPlayer aPlayer) {
return false;
}
/**
* OUT OF ORDER
*/
public static boolean getJumpKeyDown(EntityPlayer aPlayer) {
return false;
}
/**
* Adds a Valuable Ore to the Miner
*/
public static boolean addValuableOre(Block aBlock, int aMeta, int aValue) {
if (aValue <= 0) return false;
try {
Class.forName("ic2.core.init.OreValues").getMethod("add", ItemStack.class, int.class).invoke(null, new ItemStack(aBlock, 1, aMeta), aValue);
OreValues.add(new ItemStack(aBlock, 1, aMeta), aValue);
} catch (Throwable e) {/*Do nothing*/}
return true;
}
@ -436,8 +415,7 @@ public class GT_ModHandler {
aChance = (float) GregTech_API.sRecipeFile.get(ConfigCategories.Machines.scrapboxdrops, aOutput, aChance);
if (aChance <= 0) return false;
try {
GT_Utility.callMethod(GT_Utility.getFieldContent("ic2.api.recipe.Recipes", "scrapboxDrops", true, true), "addDrop", true, false, true, GT_Utility.copy(aOutput), aChance);
GT_Utility.callMethod(GT_Utility.getFieldContent("ic2.api.recipe.Recipes", "scrapboxDrops", true, true), "addRecipe", true, true, false, GT_Utility.copy(aOutput), aChance);
Recipes.scrapboxDrops.addDrop(GT_Utility.copy(aOutput), aChance);
} catch (Throwable e) {/*Do nothing*/}
return true;
}
@ -448,7 +426,7 @@ public class GT_ModHandler {
public static boolean addToRecyclerBlackList(ItemStack aRecycledStack) {
if (aRecycledStack == null) return false;
try {
ic2.api.recipe.Recipes.recyclerBlacklist.add(new RecipeInputItemStack(aRecycledStack));
Recipes.recyclerBlacklist.add(new RecipeInputItemStack(aRecycledStack));
} catch (Throwable e) {/*Do nothing*/}
return true;
}

View file

@ -1705,14 +1705,14 @@ public class GT_Utility {
+ " Gain: " + cropTile.getCrop().getGain(cropTile)
+ " Resistance: " + properties.getDefensive()
);
tList.add("Plant -- Fertilizer: " + cropTile.getTerrainNutrients()
+ " Water: " + cropTile.getTerrainHumidity()
tList.add("Plant -- Fertilizer: " + cropTile.getNutrients()
+ " Water: " + cropTile.getHumidity()
+ " Weed-Ex: " + cropTile.getStorageWeedEX()
+ " Scan-Level: " + cropTile.getScanLevel()
);
tList.add("Environment -- Nutrients: " + cropTile.getTerrainNutrients()
+ " Humidity: " + cropTile.getTerrainHumidity()
+ " Air-Quality: " + cropTile.getTerrainAirQuality()
tList.add("Environment -- Nutrients: " + cropTile.getNutrients()
+ " Humidity: " + cropTile.getHumidity()
+ " Air-Quality: " + cropTile.getAirQuality()
);
tList.add("Discovered by: " + cropTile.getCrop().getDiscoveredBy());
}

View file

@ -351,7 +351,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
ItemList.IC2_ForgeHammer.set(GT_ModHandler.getIC2Item(ItemName.forge_hammer, 1));
ItemList.IC2_WireCutter.set(GT_ModHandler.getIC2Item(ItemName.cutter, 1));
ItemList.Credit_Iron.set(GT_ModHandler.getIC2Item(ItemName.crafting, CraftingItemType.iron_shaft, 1));
ItemList.Credit_Iron.set(GT_ModHandler.getIC2Item(ItemName.crafting, CraftingItemType.coin, 1));
ItemList.Circuit_Basic.set(GT_ModHandler.getIC2Item(ItemName.crafting, CraftingItemType.circuit, 1));
ItemList.Circuit_Advanced.set(GT_ModHandler.getIC2Item(ItemName.crafting, CraftingItemType.advanced_circuit, 1));

View file

@ -1,6 +1,8 @@
package gregtech.common.blocks;
import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.StoneTypes;
@ -8,6 +10,7 @@ import gregtech.api.items.GT_Generic_Block;
import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
import gregtech.common.GT_Proxy;
import gregtech.common.render.RenderGeneratedOres;
import net.minecraft.block.Block;
import net.minecraft.block.SoundType;
@ -184,7 +187,7 @@ public class GT_Block_GeneratedOres extends GT_Generic_Block {
@Override
public int getHarvestLevel(IBlockState state) {
return Math.max(0, getMaterialSafe(state).mToolQuality - 1);
return GT_Mod.gregtechproxy.mHarvestLevel[getMaterialSafe(state).mMetaItemSubID];
}
@Override

View file

@ -26,12 +26,11 @@ public class ProcessingCell
case cell:
if (aMaterial == Materials.Empty) {
GT_ModHandler.removeRecipeByOutput(aStack);
if (aModName.equalsIgnoreCase("AtomicScience")) {
GT_ModHandler.addExtractionRecipe(ItemList.Cell_Empty.get(1L, new Object[0]), aStack);
}
} else if(aMaterial == Materials.Air) {
GT_ModHandler.addCompressionRecipe(ItemList.Cell_Empty.get(1L), GT_Utility.copyAmount(1L, aStack));
} else {
if (aMaterial.mFuelPower > 0) {
GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Utility.getFluidForFilledItem(aStack, true) == null ? GT_Utility.getContainerItem(aStack, true) : null, aMaterial.mFuelPower, aMaterial.mFuelType);
GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aStack), GT_Utility.getFluidForFilledItem(aStack, true) == null ? GT_Utility.getContainerItem(aStack, true) : null, aMaterial.mFuelPower, aMaterial.mFuelType);
}
if ((aMaterial.mMaterialList.size() > 0) && ((aMaterial.mExtraData & 0x3) != 0)) {
int tAllAmount = 0;
@ -40,14 +39,14 @@ public class ProcessingCell
tMat2 = (MaterialStack) i$.next();
}
long tItemAmount = 0L;
long tCapsuleCount = GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{aStack}) * -tAllAmount;
long tCapsuleCount = GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(aStack) * -tAllAmount;
long tDensityMultiplier = aMaterial.getDensity() > 3628800L ? aMaterial.getDensity() / 3628800L : 1L;
ArrayList<ItemStack> tList = new ArrayList();
ArrayList<ItemStack> tList = new ArrayList<>();
for (MaterialStack tMat : aMaterial.mMaterialList) {
if (tMat.mAmount > 0L) {
ItemStack tStack;
if (tMat.mMaterial == Materials.Air) {
tStack = ItemList.Cell_Air.get(tMat.mAmount * tDensityMultiplier / 2L, new Object[0]);
tStack = ItemList.Cell_Air.get(tMat.mAmount * tDensityMultiplier / 2L);
} else {
tStack = GT_OreDictUnificator.get(OrePrefixes.dust, tMat.mMaterial, tMat.mAmount);
if (tStack == null) {
@ -57,16 +56,15 @@ public class ProcessingCell
if (tItemAmount + tMat.mAmount * 3628800L <= aStack.getMaxStackSize() * aMaterial.getDensity()) {
tItemAmount += tMat.mAmount * 3628800L;
if (tStack != null) {
ItemStack tmp397_395 = tStack;
tmp397_395.stackSize = ((int) (tmp397_395.stackSize * tDensityMultiplier));
tStack.stackSize = ((int) (tStack.stackSize * tDensityMultiplier));
while ((tStack.stackSize > 64) && (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCount(tStack) * 64 < 0L ? tList.size() < 5 : tList.size() < 6) && (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCount(tStack) * 64 <= 64L)) {
tCapsuleCount += GT_ModHandler.getCapsuleCellContainerCount(tStack) * 64;
tList.add(GT_Utility.copyAmount(64L, new Object[]{tStack}));
tList.add(GT_Utility.copyAmount(64L, tStack));
tStack.stackSize -= 64;
}
if ((tStack.stackSize > 0) && tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack}) <= 64L) {
if (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack}) < 0L ? tList.size() < 5 : tList.size() < 6) {
tCapsuleCount += GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack});
if ((tStack.stackSize > 0) && tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(tStack) <= 64L) {
if (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(tStack) < 0L ? tList.size() < 5 : tList.size() < 6) {
tCapsuleCount += GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(tStack);
tList.add(tStack);
}
}
@ -78,11 +76,11 @@ public class ProcessingCell
if (tList.size() > 0) {
if ((aMaterial.mExtraData & 0x1) != 0) {
//GT_Values.RA.addElectrolyzerRecipe(GT_Utility.copyAmount(tItemAmount, new Object[] { aStack }), tCapsuleCount > 0L ? (int)tCapsuleCount : 0, (ItemStack)tList.get(0), tList.size() < 2 ? null : (ItemStack)tList.get(1), tList.size() < 3 ? null : (ItemStack)tList.get(2), tList.size() < 4 ? null : (ItemStack)tList.get(3), tList.size() < 5 ? null : (ItemStack)tList.get(4), tList.size() < 6 ? null : tCapsuleCount < 0L ? ItemList.Cell_Empty.get(-tCapsuleCount, new Object[0]) : (ItemStack)tList.get(5), (int)Math.max(1L, Math.abs(aMaterial.getProtons() * 8L * tItemAmount)), Math.min(4, tList.size()) * 30);
GT_Values.RA.addElectrolyzerRecipe(GT_Utility.copyAmount(tItemAmount, new Object[]{aStack}), tCapsuleCount <= 0L ? 0 : (int) tCapsuleCount, (ItemStack) tList.get(0), tList.size() >= 2 ? (ItemStack) tList.get(1) : null, tList.size() >= 3 ? (ItemStack) tList.get(2) : null, tList.size() >= 4 ? (ItemStack) tList.get(3) : null, tList.size() >= 5 ? (ItemStack) tList.get(4) : null, tCapsuleCount >= 0L ? tList.size() >= 6 ? (ItemStack) tList.get(5) : null : ItemList.Cell_Empty.get(-tCapsuleCount, new Object[0]), (int) Math.max(1L, Math.abs(aMaterial.getProtons() * 8L * tItemAmount)), Math.min(4, tList.size()) * 30);
GT_Values.RA.addElectrolyzerRecipe(GT_Utility.copyAmount(tItemAmount, aStack), tCapsuleCount <= 0L ? 0 : (int) tCapsuleCount, tList.get(0), tList.size() >= 2 ? tList.get(1) : null, tList.size() >= 3 ? tList.get(2) : null, tList.size() >= 4 ? tList.get(3) : null, tList.size() >= 5 ? tList.get(4) : null, tCapsuleCount >= 0L ? tList.size() >= 6 ? tList.get(5) : null : ItemList.Cell_Empty.get(-tCapsuleCount), (int) Math.max(1L, Math.abs(aMaterial.getProtons() * 8L * tItemAmount)), Math.min(4, tList.size()) * 30);
}
if ((aMaterial.mExtraData & 0x2) != 0) {
//GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(tItemAmount, new Object[] { aStack }), tCapsuleCount > 0L ? (int)tCapsuleCount : 0, (ItemStack)tList.get(0), tList.size() < 2 ? null : (ItemStack)tList.get(1), tList.size() < 3 ? null : (ItemStack)tList.get(2), tList.size() < 4 ? null : (ItemStack)tList.get(3), tList.size() < 5 ? null : (ItemStack)tList.get(4), tList.size() < 6 ? null : tCapsuleCount < 0L ? ItemList.Cell_Empty.get(-tCapsuleCount, new Object[0]) : (ItemStack)tList.get(5), (int)Math.max(1L, Math.abs(aMaterial.getMass() * 2L * tItemAmount)));
GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(tItemAmount, new Object[]{aStack}), tCapsuleCount <= 0L ? 0 : (int) tCapsuleCount, (ItemStack) tList.get(0), tList.size() >= 2 ? (ItemStack) tList.get(1) : null, tList.size() >= 3 ? (ItemStack) tList.get(2) : null, tList.size() >= 4 ? (ItemStack) tList.get(3) : null, tList.size() >= 5 ? (ItemStack) tList.get(4) : null, tCapsuleCount >= 0L ? tList.size() >= 6 ? (ItemStack) tList.get(5) : null : ItemList.Cell_Empty.get(-tCapsuleCount, new Object[0]), (int) Math.max(1L, Math.abs(aMaterial.getMass() * 2L * tItemAmount)));
GT_Values.RA.addCentrifugeRecipe(GT_Utility.copyAmount(tItemAmount, aStack), tCapsuleCount <= 0L ? 0 : (int) tCapsuleCount, tList.get(0), tList.size() >= 2 ? tList.get(1) : null, tList.size() >= 3 ? tList.get(2) : null, tList.size() >= 4 ? tList.get(3) : null, tList.size() >= 5 ? tList.get(4) : null, tCapsuleCount >= 0L ? tList.size() >= 6 ? tList.get(5) : null : ItemList.Cell_Empty.get(-tCapsuleCount), (int) Math.max(1L, Math.abs(aMaterial.getMass() * 2L * tItemAmount)));
}
}
}
@ -92,8 +90,8 @@ public class ProcessingCell
if (aMaterial == Materials.Empty) {
GT_ModHandler.removeRecipeByOutput(aStack);
} else {
GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Utility.getFluidForFilledItem(aStack, true) == null ? GT_Utility.getContainerItem(aStack, true) : null, (int) Math.max(1024L, 1024L * aMaterial.getMass()), 4);
GT_Values.RA.addVacuumFreezerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), gregtech.api.util.GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), (int) Math.max(aMaterial.getMass() * 2L, 1L));
GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aStack), GT_Utility.getFluidForFilledItem(aStack, true) == null ? GT_Utility.getContainerItem(aStack, true) : null, (int) Math.max(1024L, 1024L * aMaterial.getMass()), 4);
GT_Values.RA.addVacuumFreezerRecipe(GT_Utility.copyAmount(1L, aStack), gregtech.api.util.GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L), (int) Math.max(aMaterial.getMass() * 2L, 1L));
}
break;
}

Some files were not shown because too many files have changed in this diff Show more