aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2017-07-04 22:01:50 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2017-07-04 22:01:50 +1000
commit237f99ded74e392f3571c3d7c090224c68588cea (patch)
tree7ad3c0d14dd978bb1b47b72cc3bc81cb78b09b49
parent8492772516898efed17f7384c63ef7d049fbd24a (diff)
downloadGT5-Unofficial-237f99ded74e392f3571c3d7c090224c68588cea.tar.gz
GT5-Unofficial-237f99ded74e392f3571c3d7c090224c68588cea.tar.bz2
GT5-Unofficial-237f99ded74e392f3571c3d7c090224c68588cea.zip
+ Added the ULV Simple Washer [For Dusts]
+ Added a recipe for every impure dust -> clean dust to simple washer.
-rw-r--r--src/Java/gregtech/api/util/Recipe_GT.java4
-rw-r--r--src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java1
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java5
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_BasicWasher.java71
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSimpleWasher.java42
5 files changed, 122 insertions, 1 deletions
diff --git a/src/Java/gregtech/api/util/Recipe_GT.java b/src/Java/gregtech/api/util/Recipe_GT.java
index b073d264df..112ac3d693 100644
--- a/src/Java/gregtech/api/util/Recipe_GT.java
+++ b/src/Java/gregtech/api/util/Recipe_GT.java
@@ -248,6 +248,10 @@ public class Recipe_GT extends GT_Recipe{
//Fission Fuel Plant Recipes
//public static final GT_Recipe_Map sFissionFuelProcessing = new GT_Recipe_Map(new HashSet<GT_Recipe>(50), "gt.recipe.fissionfuel", "Fission Fuel Processing", null, RES_PATH_GUI + "basicmachines/LFTR", 0, 0, 0, 9, 1, E, 1, E, true, true);
+ //Basic Washer Map
+ public static final GT_Recipe_Map sSimpleWasherRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(3), "gt.recipe.simplewasher", "Simple Dust Washer", null, RES_PATH_GUI + "basicmachines/PotionBrewer", 1, 1, 0, 0, 1, E, 1, E, true, true);
+
+
/**
* HashMap of Recipes based on their Items
*/
diff --git a/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java b/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java
index 65469bb457..1bba89c7a4 100644
--- a/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java
+++ b/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java
@@ -70,6 +70,7 @@ public class COMPAT_HANDLER {
GregtechTreeFarmerTE.run();
GregtechIndustrialTreeFarm.run();
GregtechIndustrialSifter.run();
+ GregtechSimpleWasher.run();
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
index 384fe995a4..dc53b32700 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
@@ -170,7 +170,10 @@ public enum GregtechItemList implements GregtechItemContainer {
Pollution_Cleaner_IV, Pollution_Cleaner_LuV, Pollution_Cleaner_ZPM, Pollution_Cleaner_UV, Pollution_Cleaner_MAX,
//Debug machine
- Pollution_Creator
+ Pollution_Creator,
+
+ //Basically is an automatic Cauldron
+ SimpleDustWasher
;
public static final GregtechItemList[]
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_BasicWasher.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_BasicWasher.java
new file mode 100644
index 0000000000..c2c4f874d8
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_BasicWasher.java
@@ -0,0 +1,71 @@
+package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic;
+
+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_BasicMachine;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.Recipe_GT;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
+public class GregtechMetaTileEntity_BasicWasher extends GT_MetaTileEntity_BasicMachine {
+
+ public GregtechMetaTileEntity_BasicWasher(int aID, String aName, String aNameRegional, int aTier) {
+ super(aID, aName, aNameRegional, aTier, 1,
+ "It's like an automatic Cauldron for washing dusts.", 1, 1, "PotionBrewer.png", "",
+ new ITexture[]{
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER_ACTIVE),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER_ACTIVE),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_ACTIVE),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE),
+ new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER)
+ }
+ );
+ }
+
+ public GregtechMetaTileEntity_BasicWasher(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
+ super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
+ }
+
+ public GregtechMetaTileEntity_BasicWasher(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
+ super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
+ }
+
+ @Override
+ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntity_BasicWasher(this.mName, this.mTier, this.mDescriptionArray, this.mTextures, this.mGUIName, this.mNEIName);
+ }
+
+ @Override
+ public GT_Recipe.GT_Recipe_Map getRecipeList() {
+ return Recipe_GT.Gregtech_Recipe_Map.sSimpleWasherRecipes;
+ }
+
+ @Override
+ public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (getRecipeList().containsInput(aStack));
+ }
+
+ @Override
+ public boolean isFluidInputAllowed(FluidStack aFluid) {
+ return (aFluid.getFluid().getName().equals("water")) || (super.isFluidInputAllowed(aFluid));
+ }
+
+ @Override
+ public int getCapacity() {
+ return 8000;
+ }
+
+ @Override
+ public int checkRecipe() {
+ int sr = super.checkRecipe();
+ System.out.println(""+sr);
+ return super.checkRecipe();
+ }
+}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSimpleWasher.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSimpleWasher.java
new file mode 100644
index 0000000000..7057513df7
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechSimpleWasher.java
@@ -0,0 +1,42 @@
+package gtPlusPlus.xmod.gregtech.registration.gregtech;
+
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.Recipe_GT;
+import gtPlusPlus.core.util.fluid.FluidUtils;
+import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
+import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaTileEntity_BasicWasher;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
+public class GregtechSimpleWasher {
+
+ public static void run(){
+
+
+ //Generate Recipe Map for the Dust Washer.
+ ItemStack dustClean;
+ ItemStack dustDirty;
+ for (Materials v : Materials.values()){
+ dustClean = GT_OreDictUnificator.get(OrePrefixes.dust, v, 1L);
+ dustDirty = GT_OreDictUnificator.get(OrePrefixes.dustImpure, v, 1L);
+ if (dustClean != null && dustDirty != null){
+ Recipe_GT.Gregtech_Recipe_Map.sSimpleWasherRecipes.addRecipe(
+ false,
+ new ItemStack[]{dustDirty},
+ new ItemStack[]{dustClean},
+ null,
+ new FluidStack[]{FluidUtils.getFluidStack("water", 100)},
+ null,
+ 5,
+ 8,
+ 0);
+ }
+ }
+
+
+ //Register the Simple Washer Entity.
+ GregtechItemList.SimpleDustWasher.set(new GregtechMetaTileEntity_BasicWasher(767, "simplewasher.01.tier.00", "Simple Washer", 0).getStackForm(1L));
+ }
+}