aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java31
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_Cyclotron.java16
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialMultiMachine.java8
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java28
5 files changed, 49 insertions, 37 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
index 070788ee2b..249141c7f8 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
@@ -122,6 +122,9 @@ public interface IGregtech_RecipeAdder {
public boolean addCyclotronRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs,
FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt, int aSpecialValue);
+ boolean addCyclotronRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput, FluidStack aFluidOutput,
+ int[] aChances, int aDuration, int aEUt, int aSpecialValue);
+
public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4,
FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aDuration, int aEUt);
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java
index a04fa3a1ef..46cb903e0b 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java
@@ -59,8 +59,8 @@ public class GregtechMetaCreativeEnergyBuffer extends GregtechMetaEnergyBuffer {
*/
@Override
public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
- CustomIcon g = TexturesGtBlock.Casing_Machine_Dimensional_Adv;
- CustomIcon h = TexturesGtBlock.Casing_Machine_Dimensional;
+ CustomIcon g = TexturesGtBlock.Casing_Material_RedSteel;
+ CustomIcon h = TexturesGtBlock.Casing_Material_Grisium;
CustomIcon k;
boolean j = MathUtils.isNumberEven(this.mTier);
final ITexture[][][] rTextures = new ITexture[2][17][];
@@ -187,30 +187,35 @@ public class GregtechMetaCreativeEnergyBuffer extends GregtechMetaEnergyBuffer {
else {
this.mTier = 0;
}
- /*this.markDirty();
+ this.markDirty();
try {
- if (this.getBaseMetaTileEntity().isClientSide()) {
- Field field = ReflectionUtils.getField(this.getClass(), "mTextures");
- field.setAccessible(true);
- Field modifiersField = Field.class.getDeclaredField("modifiers");
- modifiersField.setAccessible(true);
- modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL);
- ITexture[][][] V = getTextureSet(null);
- if (V != null) {
+ Field field = ReflectionUtils.getField(this.getClass(), "mTextures");
+ field.setAccessible(true);
+ Field modifiersField = Field.class.getDeclaredField("modifiers");
+ modifiersField.setAccessible(true);
+ modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL);
+ ITexture[][][] V = getTextureSet(null);
+ if (V != null) {
+ Logger.REFLECTION("Got Valid Textures.");
+ if (this.getBaseMetaTileEntity().isClientSide()) {
+ Logger.REFLECTION("Clientside Call.");
Logger.REFLECTION("Refreshing Textures on buffer.");
field.set(this, V);
Logger.REFLECTION("Refreshed Textures on buffer.");
}
else {
- Logger.REFLECTION("Bad mTextures setter.");
+ Logger.REFLECTION("Serverside Call.");
}
}
+ else {
+ Logger.REFLECTION("Bad mTextures setter.");
+ }
}
catch (Throwable t) {
//Bad refresh.
t.printStackTrace();
Logger.REFLECTION("Bad mTextures setter.");
- }*/
+ }
PlayerUtils.messagePlayer(aPlayer, "Now running at "+GT_Values.VOLTAGE_NAMES[this.mTier]+". ["+MathUtils.isNumberEven(this.mTier)+"]");
super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ);
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_Cyclotron.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_Cyclotron.java
index b03c684f3c..6b6d203e1c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_Cyclotron.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_Cyclotron.java
@@ -91,7 +91,7 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
@Override
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- //Utils.LOG_INFO("Checking form of Cyclotron.");
+ Logger.INFO("Checking form of Cyclotron.");
int xCenter = getBaseMetaTileEntity().getXCoord() + ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing()).offsetX * 5;
int yCenter = getBaseMetaTileEntity().getYCoord();
int zCenter = getBaseMetaTileEntity().getZCoord() + ForgeDirection.getOrientation(getBaseMetaTileEntity().getFrontFacing()).offsetZ * 5;
@@ -128,21 +128,21 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
int mEnergyHatches_sS = this.mEnergyHatches.size();
for (int i = 0; i < mEnergyHatches_sS; i++) {
if (this.mEnergyHatches.get(i).mTier < tier()){
- // Utils.LOG_INFO("bad energy hatch");
+ Logger.INFO("bad energy hatch");
return false;
}
}
int mOutputHatches_sS = this.mOutputBusses.size();
for (int i = 0; i < mOutputHatches_sS; i++) {
if (this.mOutputBusses.get(i).mTier < tier()){
- // Utils.LOG_INFO("bad output hatch");
+ Logger.INFO("bad output hatch");
return false;
}
}
int mInputHatches_sS = this.mInputHatches.size();
for (int i = 0; i < mInputHatches_sS; i++) {
if (this.mInputHatches.get(i).mTier < tier()){
- // Utils.LOG_INFO("bad input hatch");
+ Logger.INFO("bad input hatch");
return false;
}
}
@@ -152,11 +152,11 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
mHardHammer = true;
mSolderingTool = true;
mCrowbar = true;
- //Utils.LOG_INFO("Built Cyclotron.");
+ Logger.INFO("Built Cyclotron.");
turnCasingActive(true);
return true;
}
- //Utils.LOG_INFO("Failed building Cyclotron.");
+ Logger.INFO("Failed building Cyclotron.");
return false;
}
@@ -250,7 +250,7 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
"------------------------------------------------------------",
"Consists of the same layout as a Fusion Reactor",
"Cyclotron Machine Casings around Cyclotron Coil Blocks",
- "2-16 Input Busses",
+ "2-16 Input Hatches",
"1-16 Output Busses",
"1-16 Energy Hatches",
"All Hatches must be IV or better",
@@ -289,7 +289,7 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
@Override
public boolean checkRecipe(ItemStack aStack) {
- //Utils.LOG_INFO("Recipe Check.");
+ //Logger.INFO("Recipe Check.");
ArrayList<ItemStack> tItemList = getStoredInputs();
ItemStack[] tItemInputs = tItemList.toArray(new ItemStack[tItemList.size()]);
ArrayList<FluidStack> tInputList = getStoredFluids();
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialMultiMachine.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialMultiMachine.java
index 993ae6d131..ca0604e6ef 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialMultiMachine.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialMultiMachine.java
@@ -106,13 +106,13 @@ extends GregtechMeta_MultiBlockBase {
@Override
public boolean checkRecipe(final ItemStack aStack) {
ArrayList<FluidStack> tFluids = getStoredFluids();
- Logger.INFO("1");
+ //Logger.INFO("1");
for (GT_MetaTileEntity_Hatch_InputBus tBus : mInputBusses) {
ArrayList<ItemStack> tBusItems = new ArrayList<ItemStack>();
tBus.mRecipeMap = getRecipeMap();
- Logger.INFO("2");
+ //Logger.INFO("2");
if (isValidMetaTileEntity(tBus)) {
- Logger.INFO("3");
+ //Logger.INFO("3");
for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) {
if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null)
tBusItems.add(tBus.getBaseMetaTileEntity().getStackInSlot(i));
@@ -123,7 +123,7 @@ extends GregtechMeta_MultiBlockBase {
FluidStack[] properArray;
properArray = ((tempArray != null && tempArray.length > 0) ? (FluidStack[]) tempArray : new FluidStack[] {});
- Logger.INFO("4");
+ //Logger.INFO("4");
if (checkRecipeGeneric(tBusItems.toArray(new ItemStack[]{}), properArray,
(2*Utils.calculateVoltageTier(this.getMaxInputVoltage())), 80, 250, 10000)) return true;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
index cb82f679b7..49b9195bec 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
@@ -438,22 +438,26 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
}
@Override
- public boolean addCyclotronRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs,
+ public boolean addCyclotronRecipe(ItemStack aInputs, FluidStack aFluidInput, ItemStack[] aOutputs,
FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt, int aSpecialValue) {
- if (aOutputs == null) {
+ return addCyclotronRecipe(new ItemStack[] {aInputs}, aFluidInput, aOutputs[0], aFluidOutput, aChances, aDuration, aEUt, aSpecialValue);
+ }
+
+ @Override
+ public boolean addCyclotronRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput,
+ FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt, int aSpecialValue) {
+ if (aOutput == null) {
return false;
}
- for (ItemStack tStack : aOutputs) {
- if (tStack != null) {
- if ((aDuration = GregTech_API.sRecipeFile.get("cyclotron", aInput, aDuration)) <= 0) {
- return false;
- }
- Recipe_GT.Gregtech_Recipe_Map.sCyclotronRecipes.addRecipe(true, new ItemStack[] { aInput }, aOutputs,
- null, aChances, new FluidStack[] { aFluidInput }, new FluidStack[] { aFluidOutput },
- Math.max(1, aDuration), Math.max(1, aEUt), aSpecialValue);
- return true;
- }
+ if ((aDuration = GregTech_API.sRecipeFile.get("cyclotron", aOutput, aDuration)) <= 0) {
+ return false;
}
+ if (Recipe_GT.Gregtech_Recipe_Map.sCyclotronRecipes.addRecipe(true, aInputs, new ItemStack[] { aOutput },
+ null, aChances, new FluidStack[] { aFluidInput }, new FluidStack[] { aFluidOutput },
+ Math.max(1, aDuration), Math.max(1, aEUt), aSpecialValue) != null) {
+ return true;
+ }
+
return false;
}