aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-02-05 04:22:53 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-02-05 04:22:53 +0000
commit918d763dabd82d47db739a1b0a51c01f0803adc0 (patch)
tree80c1da5b41a79191a7eb63184b2bcc98960aa69c /src/Java/gtPlusPlus/xmod
parent746384b3e3e193558f8506f91f75f5c2df5dec29 (diff)
downloadGT5-Unofficial-918d763dabd82d47db739a1b0a51c01f0803adc0.tar.gz
GT5-Unofficial-918d763dabd82d47db739a1b0a51c01f0803adc0.tar.bz2
GT5-Unofficial-918d763dabd82d47db739a1b0a51c01f0803adc0.zip
+ Added Charge Packs, which can be worn in the Bauble belt slot.
+ Added more recipes for particle related content. + Added recipe for Hydrogen Plasma. + Added Plasma Tanks. + Added Alternative Fusion Reactor. + Added recipe for the Super Jukebox. % Updated Locale files. $ Hopefully made calls to possibly invalid ItemList values safer. $ Fixed Large Mixer not working with fluids correctly. $ Fixed ABS and Adv. EBF not allowing a muffler in the center of the top layer. $ Fixed Fusion bug, making all recipes take 4x longer than originally required. $ Fixed recipes using Redstone Alloy as a material in tiered recipes. (Makes ULV Energy Cores craftable again) $ Fixed Nano Healing Bauble. $ Fixed annoying low transfer rate of Railcraft. (This should be higher when playing with GT anyway, it's now 4x, disabled in ASM config). $ Fixed the fact that Portable tanks were still portable in GTNH.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java38
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/BaseCustomTileEntity.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/BaseCustomPower_MTE.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/MetaTileEntityCustomPower.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GTPP_Recipe.java38
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java220
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java16
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java53
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java17
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java385
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java14
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java11
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java99
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechHiAmpTransformer.java7
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechMiniRaFusion.java22
18 files changed, 865 insertions, 76 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
index 068f47e0c4..c228364149 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
@@ -544,6 +544,9 @@ public enum GregtechItemList implements GregtechItemContainer {
//GT RTG
RTG,
+ //Plasma Tank
+ Plasma_Tank,
+
//----------------------------------------------------------------------------
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 621918b370..d5b484e314 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
@@ -198,4 +198,42 @@ public interface IGregtech_RecipeAdder {
public boolean addBrewingRecipe(int aCircuit, FluidStack aInput, FluidStack aOutput, int aTime, int aEu, boolean aHidden);
public boolean addSmeltingAndAlloySmeltingRecipe(ItemStack aDust, ItemStack aOutput);
+
+ public void addFluidExtractionRecipe(ItemStack input, Object input2, FluidStack output, int aTime, int aEu, int aSpecial);
+
+ /**
+ * Adds a Fusion reactor Recipe
+ *
+ * @param aInput1 = first Input (not null, and respects StackSize)
+ * @param aInput2 = second Input (not null, and respects StackSize)
+ * @param plasma = Output of the Fusion (can be null, and respects StackSize)
+ * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0)
+ * @param aEu = The EU generated per Tick (can even be negative!)
+ * @param aSpecial = EU needed for heating the Reactor up (must be >= 0)
+ */
+ public boolean addFusionReactorRecipe(ItemStack aInputStackA, ItemStack aInputStackB, FluidStack plasma, int aFusionDurationInTicks, int aEu, int aSpecial);
+ /**
+ * Adds a Fusion reactor Recipe
+ *
+ * @param aInput1 = first Input (not null, and respects StackSize)
+ * @param aInput2 = second Input (not null, and respects StackSize)
+ * @param plasma = Output of the Fusion (can be null, and respects StackSize)
+ * @param aOutputChance = chance to output plasma (can be 0)
+ * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0)
+ * @param aEu = The EU generated per Tick (can even be negative!)
+ * @param aSpecial = EU needed for heating the Reactor up (must be >= 0)
+ */
+ public boolean addFusionReactorRecipe(FluidStack aInputStackA, FluidStack aInputStackB, FluidStack plasma, int aOutputChance, int aFusionDurationInTicks, int aEu, int aSpecial);
+ /**
+ * Adds a Fusion reactor Recipe
+ *
+ * @param aInput1 = first Input (not null, and respects StackSize)
+ * @param aInput2 = second Input (not null, and respects StackSize)
+ * @param plasma = Output of the Fusion (can be null, and respects StackSize)
+ * @param aOutputChance = chance to output plasma (can be 0)
+ * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0)
+ * @param aEu = The EU generated per Tick (can even be negative!)
+ * @param aSpecial = EU needed for heating the Reactor up (must be >= 0)
+ */
+ public boolean addFusionReactorRecipe(ItemStack aInputStackA, ItemStack aInputStackB, FluidStack plasma, int aOutputChance, int aFusionDurationInTicks, int aEu, int aSpecial);
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/BaseCustomTileEntity.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/BaseCustomTileEntity.java
index 939cac2779..47e4a7ae53 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/BaseCustomTileEntity.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/BaseCustomTileEntity.java
@@ -23,7 +23,7 @@ public class BaseCustomTileEntity extends BaseMetaTileEntity {
public BaseCustomTileEntity() {
super();
- Logger.INFO("Created new BaseCustomTileEntity");
+ Logger.MACHINE_INFO("Created new BaseCustomTileEntity");
}
public void writeToNBT(NBTTagCompound aNBT) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/BaseCustomPower_MTE.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/BaseCustomPower_MTE.java
index 0b8cb10606..a4440114e8 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/BaseCustomPower_MTE.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/BaseCustomPower_MTE.java
@@ -10,7 +10,7 @@ public class BaseCustomPower_MTE extends BaseCustomTileEntity {
public BaseCustomPower_MTE() {
super();
- Logger.INFO("Created new BaseCustomPower_MTE");
+ Logger.MACHINE_INFO("Created new BaseCustomPower_MTE");
}
public long injectEnergyUnits(byte aSide, long aVoltage, long aAmperage) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/MetaTileEntityCustomPower.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/MetaTileEntityCustomPower.java
index ba98af25f7..8b7ccc202a 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/MetaTileEntityCustomPower.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/custom/power/MetaTileEntityCustomPower.java
@@ -29,7 +29,7 @@ public abstract class MetaTileEntityCustomPower extends CustomMetaTileBase {
public void doExplosion(long aExplosionPower) {
if (MathUtils.randInt(1, 10) > 0) {
- Logger.INFO("Machine tried to explode, let's stop that. xo");
+ //Logger.INFO("Machine tried to explode, let's stop that. xo");
return;
}
@@ -70,7 +70,7 @@ public abstract class MetaTileEntityCustomPower extends CustomMetaTileBase {
public void onExplosion() {
if (MathUtils.randInt(1, 10) > 0) {
- Logger.INFO("Machine tried to explode, let's stop that. xo");
+ //Logger.INFO("Machine tried to explode, let's stop that. xo");
return;
}
// TODO Auto-generated method stub
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GTPP_Recipe.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GTPP_Recipe.java
new file mode 100644
index 0000000000..d5180ef4e1
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GTPP_Recipe.java
@@ -0,0 +1,38 @@
+package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations;
+
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_GT_Recipe;
+import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
+
+public class GT_MetaTileEntity_BasicMachine_GTPP_Recipe extends GT_MetaTileEntity_BasicMachine_GT_Recipe {
+
+ public GT_MetaTileEntity_BasicMachine_GTPP_Recipe(int aID, String aName, String aNameRegional, int aTier,
+ String aDescription, GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int aTankCapacity,
+ int aGUIParameterA, int aGUIParameterB, String aGUIName, String aSound, boolean aSharedTank,
+ boolean aRequiresFluidForFiltering, int aSpecialEffect, String aOverlays, Object[] aRecipe) {
+ super(aID, aName, aNameRegional, aTier, aDescription, aRecipes, aInputSlots, aOutputSlots, aTankCapacity,
+ aGUIParameterA, aGUIParameterB, aGUIName, aSound, aSharedTank, aRequiresFluidForFiltering, aSpecialEffect,
+ aOverlays, aRecipe);
+ }
+
+ public GT_MetaTileEntity_BasicMachine_GTPP_Recipe(String aName, int aTier, String aDescription,
+ GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int aTankCapacity, int aAmperage,
+ int aGUIParameterA, int aGUIParameterB, ITexture[][][] aTextures, String aGUIName, String aNEIName,
+ String aSound, boolean aSharedTank, boolean aRequiresFluidForFiltering, int aSpecialEffect) {
+ super(aName, aTier, aDescription, aRecipes, aInputSlots, aOutputSlots, aTankCapacity, aAmperage, aGUIParameterA,
+ aGUIParameterB, aTextures, aGUIName, aNEIName, aSound, aSharedTank, aRequiresFluidForFiltering, aSpecialEffect);
+ }
+
+ public GT_MetaTileEntity_BasicMachine_GTPP_Recipe(String aName, int aTier, String[] aDescription,
+ GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int aTankCapacity, int aAmperage,
+ int aGUIParameterA, int aGUIParameterB, ITexture[][][] aTextures, String aGUIName, String aNEIName,
+ String aSound, boolean aSharedTank, boolean aRequiresFluidForFiltering, int aSpecialEffect) {
+ super(aName, aTier, aDescription, aRecipes, aInputSlots, aOutputSlots, aTankCapacity, aAmperage, aGUIParameterA,
+ aGUIParameterB, aTextures, aGUIName, aNEIName, aSound, aSharedTank, aRequiresFluidForFiltering, aSpecialEffect);
+ }
+
+
+
+
+
+}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java
new file mode 100644
index 0000000000..aeae474fb7
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java
@@ -0,0 +1,220 @@
+package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations;
+
+import java.lang.reflect.Field;
+
+import com.google.common.collect.BiMap;
+
+import gregtech.api.enums.Textures.BlockIcons;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
+import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.data.AutoMap;
+import gtPlusPlus.core.util.reflect.ReflectionUtils;
+import gtPlusPlus.xmod.gregtech.common.StaticFields59;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
+public class GT_MetaTileEntity_Hatch_Plasma extends GT_MetaTileEntity_Hatch_Input {
+
+ public final AutoMap<Fluid> mFluidsToUse = new AutoMap<Fluid>();
+ public final int mFluidCapacity;
+ private int mTotalPlasmaSupported = -1;
+
+ public GT_MetaTileEntity_Hatch_Plasma(final int aID, final String aName, final String aNameRegional) {
+ super(aID, aName, aNameRegional, 6);
+ mFluidCapacity = 256000;
+ initHatch();
+ }
+
+ public GT_MetaTileEntity_Hatch_Plasma(final String aName, final String aDescription,
+ final ITexture[][][] aTextures) {
+ super(aName, 6, aDescription, aTextures);
+ mFluidCapacity = 256000;
+ initHatch();
+ }
+
+ public GT_MetaTileEntity_Hatch_Plasma(final String aName, final String[] aDescription,
+ final ITexture[][][] aTextures) {
+ super(aName, 6, aDescription[0], aTextures);
+ mFluidCapacity = 256000;
+ initHatch();
+ }
+
+ private void initHatch() {
+
+ //Get all Plasmas, but the easiest way to do this is to just ask the Fluid Registry what exists and filter through them lazily.
+ Field fluidNameCache;
+ try {
+ fluidNameCache = ReflectionUtils.getField(FluidRegistry.class, "fluidNames");
+ } catch (NoSuchFieldException e) {
+ fluidNameCache = null;
+ }
+ AutoMap<String> mValidPlasmaNameCache = new AutoMap<String>();
+ if (fluidNameCache != null) {
+ try {
+ Object fluidNames = fluidNameCache.get(null);
+ if (fluidNames != null) {
+ try {
+ @SuppressWarnings("unchecked")
+ BiMap<Integer, String> fluidNamesMap = (BiMap<Integer, String>) fluidNames;
+ if (fluidNamesMap != null) {
+ for (String g : fluidNamesMap.values()) {
+ if (g.toLowerCase().contains("plasma")) {
+ mValidPlasmaNameCache.put(g);
+ }
+ }
+ }
+ } catch (ClassCastException e) {
+ }
+ }
+ } catch (IllegalArgumentException | IllegalAccessException e) {
+ }
+ }
+
+ AutoMap<Fluid> mPlasmaCache = new AutoMap<Fluid>();
+ if (!mValidPlasmaNameCache.isEmpty()) {
+ for (String y : mValidPlasmaNameCache) {
+ Fluid t = FluidRegistry.getFluid(y);
+ if (t != null) {
+ if (t.getTemperature() > 1000) {
+ mPlasmaCache.put(t);
+ }
+ }
+ }
+ }
+
+ if (!mPlasmaCache.isEmpty()) {
+ for (Fluid w : mPlasmaCache) {
+ mFluidsToUse.put(w);
+ }
+ }
+
+
+
+
+
+ }
+
+ public ITexture[] getTexturesActive(final ITexture aBaseTexture) {
+ return new ITexture[] { aBaseTexture };
+ }
+
+ public ITexture[] getTexturesInactive(final ITexture aBaseTexture) {
+ return new ITexture[] { aBaseTexture };
+ }
+
+ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide,
+ final ItemStack aStack) {
+ if (aSide == aBaseMetaTileEntity.getFrontFacing() && aIndex == 0) {
+ for (Fluid f : mFluidsToUse) {
+ if (f != null) {
+ if (GT_Utility.getFluidForFilledItem(aStack, true).getFluid() == f) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ public boolean isFluidInputAllowed(final FluidStack aFluid) {
+ for (Fluid f : mFluidsToUse) {
+ if (f != null) {
+ if (aFluid.getFluid() == f) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ public int getCapacity() {
+ return this.mFluidCapacity;
+ }
+
+ public MetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return (MetaTileEntity) new GT_MetaTileEntity_Hatch_Plasma(this.mName, this.mDescription, this.mTextures);
+ }
+
+ @Override
+ public String[] getDescription() {
+
+ if (mTotalPlasmaSupported < 0) {
+ if (mFluidsToUse.isEmpty()) {
+ mTotalPlasmaSupported = 0;
+ }
+ else {
+ mTotalPlasmaSupported = mFluidsToUse.size();
+ }
+ }
+
+ String aX = EnumChatFormatting.GRAY+"";
+ String a1 = EnumChatFormatting.GOLD+"Refined containment"+aX;
+ String a2 = EnumChatFormatting.GOLD+"Capacity: "+EnumChatFormatting.DARK_AQUA+getCapacity()+"L"+aX;
+ String a3 = EnumChatFormatting.GOLD+"Supports "+EnumChatFormatting.DARK_RED+mTotalPlasmaSupported+EnumChatFormatting.GOLD+" types of plasma"+aX;
+
+
+
+ String[] s2 = new String[]{
+ a1, a2, a3
+ };
+ return s2;
+ }
+
+ @Override
+ public boolean doesFillContainers() {
+ return true;
+ }
+
+ @Override
+ public ITexture[][][] getTextureSet(ITexture[] aTextures) {
+ // TODO Auto-generated method stub
+ return super.getTextureSet(aTextures);
+ }
+
+ private Field F1, F2;
+
+
+ @Override
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ byte a1 = 0, a2 = 0;
+ try {
+ if (F1 == null) {
+ F1 = ReflectionUtils.getField(getClass(), "actualTexture");
+ }
+ if (F2 == null) {
+ F2 = ReflectionUtils.getField(getClass(), "mTexturePage");
+ }
+
+ if (F1 != null) {
+ a1 = F1.getByte(this);
+ }
+ if (F2 != null) {
+ a2 = F2.getByte(this);
+ }
+ }
+ catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException n) {}
+
+ int textureIndex = a1 | a2 << 7;
+ byte texturePointer = (byte) (a1 & 127);
+
+
+
+ if (aSide == 1 || aSide == 0) {
+ ITexture g = textureIndex > 0 ? StaticFields59.getCasingTexturePages(a2, texturePointer) : BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1];
+
+ return new ITexture[] {g};
+ }
+
+ return aSide != aFacing ?
+ (textureIndex > 0 ? new ITexture[] { StaticFields59.getCasingTexturePages(a2, texturePointer) } : new ITexture[] { BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1] })
+ : (textureIndex > 0 ? (aActive ? this.getTexturesActive(StaticFields59.getCasingTexturePages(a2, texturePointer)) : this.getTexturesInactive(StaticFields59.getCasingTexturePages(a2, texturePointer)))
+ : (aActive ? this.getTexturesActive(BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]) : this.getTexturesInactive(BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1])));
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
index 892f8f332a..04c1cf34cc 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
@@ -74,8 +74,8 @@ GT_MetaTileEntity_MultiBlockBase {
Method a08 = findRecipe08 = ReflectionUtils.getMethod(GT_Recipe_Map.class, "findRecipe", IHasWorldObjectAndCoords.class, GT_Recipe.class, boolean.class, long.class, FluidStack[].class, ItemStack.class, ItemStack[].class);
Method a09 = findRecipe09 = ReflectionUtils.getMethod(GT_Recipe_Map.class, "findRecipe", IHasWorldObjectAndCoords.class, GT_Recipe.class, boolean.class, boolean.class, long.class, FluidStack[].class, ItemStack.class, ItemStack[].class);
- Logger.INFO("Found .08 findRecipe method? "+(a08 != null));
- Logger.INFO("Found .09 findRecipe method? "+(a09 != null));
+ Logger.MACHINE_INFO("Found .08 findRecipe method? "+(a08 != null));
+ Logger.MACHINE_INFO("Found .09 findRecipe method? "+(a09 != null));
//gregtech.api.util.GT_Recipe.GT_Recipe_Map.findRecipe(IHasWorldObjectAndCoords, GT_Recipe, boolean, long, FluidStack[], ItemStack, ItemStack...)
@@ -709,7 +709,7 @@ GT_MetaTileEntity_MultiBlockBase {
public boolean isMachineRunning() {
boolean aRunning = this.getBaseMetaTileEntity().isActive();
- Logger.INFO("Queried Multiblock is currently running: "+aRunning);
+ log("Queried Multiblock is currently running: "+aRunning);
return aRunning;
}
@@ -1552,7 +1552,7 @@ GT_MetaTileEntity_MultiBlockBase {
return true;
}
else {
- Logger.INFO("Found meta Tile: "+aMetaTileID);
+ log("Found meta Tile: "+aMetaTileID);
}
}
}
@@ -1561,17 +1561,17 @@ GT_MetaTileEntity_MultiBlockBase {
return true;
}
else if (aFoundBlock != aExpectedBlock) {
- Logger.INFO("A1 - Found: "+aFoundBlock.getLocalizedName()+":"+aFoundMeta+", Expected: "+aExpectedBlock.getLocalizedName()+":"+aExpectedMeta);
- Logger.INFO("Loc: "+(new BlockPos(aBaseMetaTileEntity).getLocationString()));
+ log("A1 - Found: "+aFoundBlock.getLocalizedName()+":"+aFoundMeta+", Expected: "+aExpectedBlock.getLocalizedName()+":"+aExpectedMeta);
+ log("Loc: "+(new BlockPos(aBaseMetaTileEntity).getLocationString()));
return false;
}
else if (aFoundMeta != aExpectedMeta) {
- Logger.INFO("A2");
+ log("A2");
return false;
}
}
- Logger.INFO("A3");
+ log("A3");
return false;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java
index bc067a5e53..0178bac4da 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/ChargingHelper.java
@@ -406,7 +406,7 @@ public class ChargingHelper {
return mEntity.getEUVar();
}
- public boolean isItemValid(final ItemStack itemstack) {
+ public static boolean isItemValid(final ItemStack itemstack) {
if (itemstack == null){
return false;
}
@@ -419,7 +419,7 @@ public class ChargingHelper {
return false;
}
- public boolean accepts(final ItemStack stack) {
+ public static boolean accepts(final ItemStack stack) {
if (stack == null) {
return false;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java
index c4ef545b09..e721761d82 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java
@@ -12,6 +12,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
@@ -111,20 +112,7 @@ extends GregtechMeta_MultiBlockBase {
@Override
public boolean checkRecipe(final ItemStack aStack) {
- for (GT_MetaTileEntity_Hatch_InputBus tBus : mInputBusses) {
- ArrayList<ItemStack> tBusItems = new ArrayList<ItemStack>();
- tBus.mRecipeMap = getRecipeMap();
- if (isValidMetaTileEntity(tBus)) {
- for (int i = tBus.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) {
- if (tBus.getBaseMetaTileEntity().getStackInSlot(i) != null)
- tBusItems.add(tBus.getBaseMetaTileEntity().getStackInSlot(i));
- }
- }
-
- if (checkRecipeGeneric(tBusItems.toArray(new ItemStack[]{}), new FluidStack[]{},
- (8 * GT_Utility.getTier(this.getMaxInputVoltage())), 100, 250, 10000)) return true;
- }
- return false;
+ return checkRecipeGeneric(getMaxParallelRecipes(), getEuDiscountForParallelism(), 250);
}
@Override
@@ -152,31 +140,40 @@ extends GregtechMeta_MultiBlockBase {
for (int j = -1; j < 2; j++) {
for (int h = -1; h < 3; h++) {
if ((h != 0) || ((((xDir + i) != 0) || ((zDir + j) != 0)) && ((i != 0) || (j != 0)))) {
+
final IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h, zDir + j);
- if ((!this.addToMachineList(tTileEntity, CASING_TEXTURE_ID)) && (!this.addMufflerToMachineList(tTileEntity, CASING_TEXTURE_ID)) && (!this.addInputToMachineList(tTileEntity, CASING_TEXTURE_ID)) && (!this.addOutputToMachineList(tTileEntity, CASING_TEXTURE_ID)) && (!this.addEnergyInputToMachineList(tTileEntity, CASING_TEXTURE_ID))) {
- final Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j);
- final byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j);
- if (h == 0 || h == 1){
- if (i == 0 && j == 0){
- if (((tBlock != GregTech_API.sBlockCasings4) || (tMeta != 11))) {
- return false;
- }
- tAmount++;
+ final Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j);
+ final byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j);
+
+ if (h == 0 || h == 1) {
+ if (i == 0 && j == 0){
+ if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, false, tBlock, tMeta, GregTech_API.sBlockCasings4, 11)) {
+ Logger.INFO("Inner casings missing");
+ return false;
}
else {
- if (((tBlock != ModBlocks.blockCasings3Misc) || (tMeta != 2))) {
- return false;
- }
tAmount++;
}
}
else {
- if (((tBlock != ModBlocks.blockCasings3Misc) || (tMeta != 2))) {
+ if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, true, tBlock, tMeta, ModBlocks.blockCasings3Misc, 2)) {
+ Logger.INFO("Middle layer casings missing");
return false;
}
- tAmount++;
+ else {
+ tAmount++;
+ }
}
}
+ else {
+ if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, true, tBlock, tMeta, ModBlocks.blockCasings3Misc, 2)) {
+ Logger.INFO("Top Or Bottom casings missing");
+ return false;
+ }
+ else {
+ tAmount++;
+ }
+ }
}
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java
index 7fdabceebb..e4f984ee18 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java
@@ -254,15 +254,14 @@ public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase
if (!isValidBlockForStructure(null, CASING_TEXTURE_ID, false, aBaseMetaTileEntity.getBlockOffset(xDir + i, 2, zDir + j), (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 2, zDir + j), StaticFields59.getBlockCasings5(), tUsedMeta)) {
Logger.INFO("Heating Coils missing.");
return false;
- }
-
- //Top Layer
- final IGregTechTileEntity tTileEntity2 = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 3, zDir + j);
- if (!isValidBlockForStructure(tTileEntity2, CASING_TEXTURE_ID, true, aBaseMetaTileEntity.getBlockOffset(xDir + i, 3, zDir + j), (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 3, zDir + j), ModBlocks.blockCasings3Misc, 11)) {
- Logger.INFO("Top Layer missing.");
- return false;
- }
-
+ }
+ }
+
+ //Top Layer
+ final IGregTechTileEntity tTileEntity2 = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 3, zDir + j);
+ if (!isValidBlockForStructure(tTileEntity2, CASING_TEXTURE_ID, true, aBaseMetaTileEntity.getBlockOffset(xDir + i, 3, zDir + j), (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 3, zDir + j), ModBlocks.blockCasings3Misc, 11)) {
+ Logger.INFO("Top Layer missing.");
+ return false;
}
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java
new file mode 100644
index 0000000000..6ec95ff16b
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_MiniFusionPlant.java
@@ -0,0 +1,385 @@
+package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production;
+
+import java.util.ArrayList;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.TAE;
+import gregtech.api.enums.Textures;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
+import gregtech.api.util.Recipe_GT;
+import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.api.objects.data.AutoMap;
+import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_ControlCore;
+import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Plasma;
+import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+
+public class GregtechMTE_MiniFusionPlant extends GregtechMeta_MultiBlockBase {
+
+ public long currentVoltage = GT_Values.V[7];
+ public byte currentTier = 8;
+
+ public void upvolt() {
+ byte f = currentTier;
+ if ((f+1) > 10) {
+ f = 8;
+ }
+ else {
+ f++;
+ }
+ this.currentTier = f;
+ updateVoltage();
+ }
+
+ public void downvolt() {
+ byte f = currentTier;
+ if ((f-1) < 8) {
+ f = 10;
+ }
+ else {
+ f--;
+ }
+ this.currentTier = f;
+ updateVoltage();
+ }
+
+ private long updateVoltage() {
+ this.currentVoltage = GT_Values.V[this.currentTier-1];
+ return currentVoltage;
+ }
+
+ public GregtechMTE_MiniFusionPlant(String aName) {
+ super(aName);
+ }
+
+ public GregtechMTE_MiniFusionPlant(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ @Override
+ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GregtechMTE_MiniFusionPlant(this.mName);
+ }
+
+ @Override
+ public boolean isCorrectMachinePart(ItemStack aStack) {
+ return true;
+ }
+
+ @Override
+ public int getDamageToComponent(ItemStack aStack) {
+ return 0;
+ }
+
+ @Override
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing,
+ fi