GT5.08.31

This commit is contained in:
Blood-Asp 2015-10-18 17:28:51 +02:00
parent 6d8abce427
commit 513c6606f2
7 changed files with 44 additions and 16 deletions

View file

@ -603,6 +603,7 @@ public enum Materials implements IColorModulationContainer, ISubTagContainer {
GraniteBlack ( 849, TextureSet.SET_ROUGH , 4.0F, 64, 3, 1 |64|128 , 10, 10, 10, 0, "Black Granite" , 0, 0, -1, 0, F, F, 0, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(SiliconDioxide, 4), new MaterialStack(Biotite, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.TUTAMEN, 1))),
GraniteRed ( 850, TextureSet.SET_ROUGH , 4.0F, 64, 3, 1 |64|128 , 255, 0, 128, 0, "Red Granite" , 0, 0, -1, 0, F, F, 0, 1, 1, Dyes.dyeMagenta , 1, Arrays.asList(new MaterialStack(Aluminium, 2), new MaterialStack(PotassiumFeldspar, 1), new MaterialStack(Oxygen, 3)), Arrays.asList(new TC_AspectStack(TC_Aspects.TUTAMEN, 1))),
Chrysotile ( 912, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 110, 140, 110, 0, "Chrysotile" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Asbestos, 1))),
Realgar ( 555, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 140, 100, 100, 0, "Realgar" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Arsenic, 4), new MaterialStack(Sulfur,4))),
VanadiumMagnetite ( 923, TextureSet.SET_METALLIC , 1.0F, 0, 2, 1 |8 , 35, 35, 60, 0, "Vanadium Magnetite" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Magnetite, 1), new MaterialStack(Vanadium, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))), // Mixture of Fe3O4 and V2O5
BasalticMineralSand ( 935, TextureSet.SET_SAND , 1.0F, 0, 1, 1 |8 , 40, 50, 40, 0, "Basaltic Mineral Sand" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Magnetite, 1), new MaterialStack(Basalt, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))),
GraniticMineralSand ( 936, TextureSet.SET_SAND , 1.0F, 0, 1, 1 |8 , 40, 60, 60, 0, "Granitic Mineral Sand" , 0, 0, -1, 0, F, F, 1, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Magnetite, 1), new MaterialStack(GraniteBlack, 1)), Arrays.asList(new TC_AspectStack(TC_Aspects.METALLUM, 2), new TC_AspectStack(TC_Aspects.MAGNETO, 1))),

View file

@ -10,10 +10,12 @@ import gregtech.api.util.GT_Utility;
public class GT_GUIContainer_FusionReactor extends GT_GUIContainerMetaTile_Machine {
String mName = "";
public String mNEI;
public GT_GUIContainer_FusionReactor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aTextureFile) {
public GT_GUIContainer_FusionReactor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aTextureFile, String aNEI) {
super(new GT_Container_MultiMachine(aInventoryPlayer, aTileEntity, false), RES_PATH_GUI + "multimachines/" + (aTextureFile==null?"MultiblockDisplay":aTextureFile));
mName = aName;
mNEI = aNEI;
}
@Override

View file

@ -139,7 +139,9 @@ public class GT_MetaTileEntity_TypeFilter
{
boolean tAllowPrefix = this.mPrefix.contains(aStack);
if(this.mPrefix==OrePrefixes.ore){
OrePrefixes tFix = GT_OreDictUnificator.getItemData(aStack).mPrefix;
ItemData tData = GT_OreDictUnificator.getItemData(aStack);
if(tData!=null&&tData.mPrefix!=null){
OrePrefixes tFix = tData.mPrefix;
if(tFix==OrePrefixes.oreBlackgranite||
tFix==OrePrefixes.oreDense||
tFix==OrePrefixes.oreEnd||
@ -151,7 +153,7 @@ public class GT_MetaTileEntity_TypeFilter
tFix==OrePrefixes.oreRedgranite||
tFix==OrePrefixes.oreRich||
tFix==OrePrefixes.oreSmall)tAllowPrefix=true;
}
}}
return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && ((this.bNBTAllowed) || (!aStack.hasTagCompound())) && (tAllowPrefix != this.bInvertFilter);
}
}

View file

@ -60,7 +60,7 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity
@Override
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
return new GT_GUIContainer_FusionReactor(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "FusionComputer.png");
return new GT_GUIContainer_FusionReactor(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "FusionComputer.png", GT_Recipe.GT_Recipe_Map.sFusionRecipes.mNEIName);
}
public abstract MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity);
@ -283,7 +283,6 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity
return false;
}
if (mRunningOnLoad||tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[] {})) {
if(mRunningOnLoad)System.out.println("First Recipe!");
this.mLastRecipe = tRecipe;
this.mEUt = (this.mLastRecipe.mEUt * overclock(this.mLastRecipe.mSpecialValue));
this.mMaxProgresstime = this.mLastRecipe.mDuration / overclock(this.mLastRecipe.mSpecialValue);

View file

@ -90,10 +90,12 @@ 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 ? (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);
}
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 ? (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)));
}
}
}

View file

@ -864,6 +864,12 @@ public class GT_MachineRecipeLoader
GT_Values.RA.addVacuumFreezerRecipe(GT_ModHandler.getIC2Item("reactorCoolantSimple", 1L, 32767), GT_ModHandler.getIC2Item("reactorCoolantSimple", 1L,1), 100);
GT_Values.RA.addVacuumFreezerRecipe(GT_ModHandler.getIC2Item("reactorCoolantTriple", 1L, 32767), GT_ModHandler.getIC2Item("reactorCoolantTriple", 1L,1), 300);
GT_Values.RA.addVacuumFreezerRecipe(GT_ModHandler.getIC2Item("reactorCoolantSix", 1L, 32767), GT_ModHandler.getIC2Item("reactorCoolantSix", 1L,1), 600);
GT_Values.RA.addVacuumFreezerRecipe(ItemList.Reactor_Coolant_He_1.getWildcard(1L, new Object[0]), ItemList.Reactor_Coolant_He_1.get(1L, new Object[0]), 600);
GT_Values.RA.addVacuumFreezerRecipe(ItemList.Reactor_Coolant_He_3.getWildcard(1L, new Object[0]), ItemList.Reactor_Coolant_He_3.get(1L, new Object[0]), 1800);
GT_Values.RA.addVacuumFreezerRecipe(ItemList.Reactor_Coolant_He_6.getWildcard(1L, new Object[0]), ItemList.Reactor_Coolant_He_6.get(1L, new Object[0]), 3600);
GT_Values.RA.addVacuumFreezerRecipe(ItemList.Reactor_Coolant_NaK_1.getWildcard(1L, new Object[0]), ItemList.Reactor_Coolant_NaK_1.get(1L, new Object[0]), 600);
GT_Values.RA.addVacuumFreezerRecipe(ItemList.Reactor_Coolant_NaK_3.getWildcard(1L, new Object[0]), ItemList.Reactor_Coolant_NaK_3.get(1L, new Object[0]),1800);
GT_Values.RA.addVacuumFreezerRecipe(ItemList.Reactor_Coolant_NaK_6.getWildcard(1L, new Object[0]), ItemList.Reactor_Coolant_NaK_6.get(1L, new Object[0]),3600);
GT_Values.RA.addVacuumFreezerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ice, 1L), 50);
GT_Values.RA.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lead, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Obsidian, 2L), ItemList.TE_Hardened_Glass.get(2L, new Object[0]), 200, 16);

View file

@ -11,7 +11,9 @@ import codechicken.nei.recipe.GuiUsageRecipe;
import codechicken.nei.recipe.TemplateRecipeHandler;
import codechicken.nei.recipe.TemplateRecipeHandler.CachedRecipe;
import codechicken.nei.recipe.TemplateRecipeHandler.RecipeTransferRect;
import com.google.common.collect.ListMultimap;
import cpw.mods.fml.common.event.FMLInterModComms;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.OrePrefixes;
@ -23,6 +25,8 @@ import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gregtech.api.util.GT_Utility;
import gregtech.common.gui.GT_GUIContainer_FusionReactor;
import java.awt.Point;
import java.awt.Rectangle;
import java.util.ArrayList;
@ -30,6 +34,7 @@ import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.inventory.GuiContainer;
@ -38,6 +43,7 @@ import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData;
import net.minecraftforge.fluids.FluidStack;
import org.lwjgl.opengl.GL11;
public class GT_NEI_DefaultHandler
@ -615,20 +621,30 @@ public class GT_NEI_DefaultHandler
public boolean canHandle(GuiContainer gui)
{
return ((gui instanceof GT_GUIContainer_BasicMachine)) && (GT_Utility.isStringValid(((GT_GUIContainer_BasicMachine)gui).mNEI));
return (((gui instanceof GT_GUIContainer_BasicMachine)) && (GT_Utility.isStringValid(((GT_GUIContainer_BasicMachine)gui).mNEI))||((gui instanceof GT_GUIContainer_FusionReactor)) && (GT_Utility.isStringValid(((GT_GUIContainer_FusionReactor)gui).mNEI)));
}
public List<String> handleTooltip(GuiContainer gui, int mousex, int mousey, List<String> currenttip)
{
if ((canHandle(gui)) && (currenttip.isEmpty()) && (new Rectangle(65, 13, 36, 18).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_BasicMachine)gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_BasicMachine)gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1])))) {
currenttip.add("Recipes");
if ((canHandle(gui)) && (currenttip.isEmpty())){
if(gui instanceof GT_GUIContainer_BasicMachine && new Rectangle(65, 13, 36, 18).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_BasicMachine)gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_BasicMachine)gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1])))
{currenttip.add("Recipes");
}else if(gui instanceof GT_GUIContainer_FusionReactor && new Rectangle(145, 0, 24, 24).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_FusionReactor)gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_FusionReactor)gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1])))
{currenttip.add("Recipes");
}
}
return currenttip;
}
private boolean transferRect(GuiContainer gui, boolean usage)
{
if(gui instanceof GT_GUIContainer_BasicMachine){
return (canHandle(gui)) && (new Rectangle(65, 13, 36, 18).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_BasicMachine)gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_BasicMachine)gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) && (usage ? GuiUsageRecipe.openRecipeGui(((GT_GUIContainer_BasicMachine)gui).mNEI, new Object[0]) : GuiCraftingRecipe.openRecipeGui(((GT_GUIContainer_BasicMachine)gui).mNEI, new Object[0]));
}else if(gui instanceof GT_GUIContainer_FusionReactor){
return (canHandle(gui)) && (new Rectangle(145, 0, 24, 24).contains(new Point(GuiDraw.getMousePosition().x - ((GT_GUIContainer_FusionReactor)gui).getLeft() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[0], GuiDraw.getMousePosition().y - ((GT_GUIContainer_FusionReactor)gui).getTop() - codechicken.nei.recipe.RecipeInfo.getGuiOffset(gui)[1]))) && (usage ? GuiUsageRecipe.openRecipeGui(((GT_GUIContainer_FusionReactor)gui).mNEI, new Object[0]) : GuiCraftingRecipe.openRecipeGui(((GT_GUIContainer_FusionReactor)gui).mNEI, new Object[0]));
}
return false;
}
public List<String> handleItemDisplayName(GuiContainer gui, ItemStack itemstack, List<String> currenttip)