aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/API/AcidGenFuelAdder.java42
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java1
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java4
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java75
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java3
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java8
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java62
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_AcidGenerator.java113
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_Windmill.java50
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_CircuitProgrammer.java10
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java427
-rw-r--r--src/main/resources/assets/bartworks/lang/en_US.lang1
-rw-r--r--src/main/resources/assets/bartworks/textures/items/BW_SimpleWindMeter.pngbin0 -> 448 bytes
13 files changed, 572 insertions, 224 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/AcidGenFuelAdder.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/AcidGenFuelAdder.java
new file mode 100644
index 0000000000..0f181a3559
--- /dev/null
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/AcidGenFuelAdder.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2019 bartimaeusnek
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package com.github.bartimaeusnek.bartworks.API;
+
+import com.github.bartimaeusnek.bartworks.util.BWRecipes;
+import gregtech.api.enums.Materials;
+import net.minecraftforge.fluids.FluidStack;
+
+public final class AcidGenFuelAdder {
+
+ public static boolean addLiquidFuel(Materials M, int burn) {
+ return ((BWRecipes.BW_Recipe_Map_LiquidFuel) BWRecipes.instance.getMappingsFor((byte) 2)).addLiquidFuel(M, burn) != null;
+ }
+
+ public static boolean addLiquidFuel(FluidStack fluidStack, int burn) {
+ return ((BWRecipes.BW_Recipe_Map_LiquidFuel) BWRecipes.instance.getMappingsFor((byte) 2)).addLiquidFuel(fluidStack, burn) != null;
+ }
+
+ public static boolean addMoltenFuel(Materials M, int burn) {
+ return ((BWRecipes.BW_Recipe_Map_LiquidFuel) BWRecipes.instance.getMappingsFor((byte) 2)).addMoltenFuel(M, burn) != null;
+ }
+}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
index c2a42579df..3f3fc8d9a5 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
@@ -91,5 +91,4 @@ public final class MainMod {
new GTNHBlocks().run();
}
-
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java
index 69621bc1b5..b4f28fd33a 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java
@@ -32,10 +32,10 @@ import javax.annotation.Nonnull;
import java.io.File;
public class ConfigHandler {
- private static final int IDU = GT_Values.VN.length * 8 - 3;
+ private static final int IDU = GT_Values.VN.length * 8 + 1;
public static int IDOffset = 12600;
public static boolean teslastaff = false;
- public static long energyPerCell = 100000L;
+ public static long energyPerCell = 1000000L;
public static boolean newStuff = true;
public static boolean BioLab = true;
public static Configuration c;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java
new file mode 100644
index 0000000000..f526e5a601
--- /dev/null
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_SimpleWindMeter.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2019 bartimaeusnek
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package com.github.bartimaeusnek.bartworks.common.items;
+
+import com.github.bartimaeusnek.bartworks.MainMod;
+import com.github.bartimaeusnek.bartworks.util.ChatColorHelper;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import ic2.core.WorldData;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.ChatComponentText;
+import net.minecraft.world.World;
+
+import java.util.List;
+
+public class BW_SimpleWindMeter extends Item {
+
+ public BW_SimpleWindMeter() {
+ this.maxStackSize = 1;
+ this.setMaxDamage(15);
+ this.setCreativeTab(MainMod.BWT);
+ this.hasSubtypes = false;
+ this.setUnlocalizedName("BW_SimpleWindMeter");
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerIcons(IIconRegister p_94581_1_) {
+ this.itemIcon = p_94581_1_.registerIcon(MainMod.modID + ":BW_SimpleWindMeter");
+ }
+
+ @Override
+ public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List list, boolean p_77624_4_) {
+ super.addInformation(itemStack, entityPlayer, list, p_77624_4_);
+ list.add("A simple Windmeter to choose a place for the Windmill.");
+ list.add("Uses left: " + (this.getMaxDamage() - this.getDamage(itemStack)) + "/" + this.getMaxDamage());
+ list.add("Added by" + ChatColorHelper.DARKGREEN + " BartWorks");
+ }
+
+ @Override
+ public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer entityPlayer) {
+ if (entityPlayer.worldObj.isRemote || world == null || WorldData.get(world) == null || WorldData.get(world).windSim == null)
+ return itemStack;
+
+ float windStrength = (float) WorldData.get(world).windSim.getWindAt(entityPlayer.posY);
+ String windS = windStrength < 1f ? "non existant" : windStrength < 10f ? "pretty low" : windStrength < 20f ? "common" : windStrength < 30f ? "rather strong" : windStrength < 50f ? "very strong" : "too strong";
+ entityPlayer.addChatMessage(new ChatComponentText("The wind here seems to be " + windS + "."));
+ itemStack.damageItem(1, entityPlayer);
+ return itemStack;
+ }
+
+}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java
index edb2f32e77..2227cae93e 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/BW_Stonage_Rotors.java
@@ -76,6 +76,9 @@ public class BW_Stonage_Rotors extends Item implements IKineticRotor {
} else if (Minecraft.getMinecraft().currentScreen instanceof GuiWindKineticGenerator) {
type = WIND;
}
+ info.add("Diameter: " + this.DiaMinMax[0]);
+ info.add("Durability: " + (this.getMaxDamage() - this.getDamage(itemStack)) + "/" + this.getMaxDamage());
+ info.add("Efficiency: " + this.eff);
if (type != null) {
info.add(StatCollector.translateToLocal(("ic2.itemrotor.fitsin." + this.isAcceptedType(itemStack, type))));
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java
index fffcf974de..d90b99029d 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java
@@ -28,6 +28,7 @@ import com.github.bartimaeusnek.bartworks.common.blocks.BW_TileEntityContainer;
import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
import com.github.bartimaeusnek.bartworks.common.items.*;
import com.github.bartimaeusnek.bartworks.common.tileentities.BW_RotorBlock;
+import com.github.bartimaeusnek.bartworks.common.tileentities.GT_MetaTileEntity_AcidGenerator;
import com.github.bartimaeusnek.bartworks.common.tileentities.GT_MetaTileEntity_Diode;
import com.github.bartimaeusnek.bartworks.common.tileentities.GT_MetaTileEntity_EnergyDistributor;
import cpw.mods.fml.common.registry.GameRegistry;
@@ -61,6 +62,7 @@ public class ItemRegistry implements Runnable {
public static final Item CombinedRotor = new BW_Stonage_Rotors(11, 0.22f, 1, 50, 5800, IKineticRotor.GearboxType.WIND, new ResourceLocation(MainMod.modID, "textures/items/rotors/rotorCombined.png"), "BW_CombinedRotor", "rotors/itemRotorCombined");
public static final Item craftingParts = new SimpleSubItemClass(new String[]{"grindstone_top", "grindstone_bottom", "completed_grindstone", "rotors/leatherParts", "rotors/woolParts", "rotors/paperParts", "rotors/combinedParts"});
public static final Item tab = new SimpleIconItem("GT2Coin");
+ public static final Item WINDMETER = new BW_SimpleWindMeter();
public static final Block[] BW_BLOCKS = {
new BW_Blocks("BW_ItemBlocks", new String[]
{
@@ -86,6 +88,7 @@ public class ItemRegistry implements Runnable {
public static ItemStack[] Diode12A = new ItemStack[GT_Values.VN.length];
public static ItemStack[] Diode16A = new ItemStack[GT_Values.VN.length];
public static ItemStack[] EnergyDistributor = new ItemStack[GT_Values.VN.length];
+ public static ItemStack[] AcidGens = new ItemStack[3];
@Override
public void run() {
@@ -100,6 +103,7 @@ public class ItemRegistry implements Runnable {
GameRegistry.registerItem(craftingParts, "craftingParts");
GameRegistry.registerTileEntity(BW_RotorBlock.class, "BWRotorBlockTE");
GameRegistry.registerBlock(ROTORBLOCK, "BWRotorBlock");
+ GameRegistry.registerItem(WINDMETER, "BW_SimpleWindMeter");
for (int i = 0; i < GT_Values.VN.length; i++) {
ItemRegistry.Diode2A[i] = new GT_MetaTileEntity_Diode(ConfigHandler.IDOffset + GT_Values.VN.length + 1 + i, "Cable Diode 2A " + GT_Values.VN[i], "Cable Diode 2A " + GT_Values.VN[i], i, 2).getStackForm(1L);
@@ -110,6 +114,10 @@ public class ItemRegistry implements Runnable {
ItemRegistry.EnergyDistributor[i] = new GT_MetaTileEntity_EnergyDistributor(ConfigHandler.IDOffset + 1 + i, "Energy Distributor " + GT_Values.VN[i], "Energy Distributor " + GT_Values.VN[i], i, "Splits Amperage into several Sides").getStackForm(1L);
}
+ for (int i = 0; i < 3; i++) {
+ ItemRegistry.AcidGens[i] = new GT_MetaTileEntity_AcidGenerator(ConfigHandler.IDOffset + GT_Values.VN.length * 8 - 2 + i, "Acid Generator " + GT_Values.VN[i + 2], "Acid Generator " + GT_Values.VN[i + 2], i + 2, new String[]{"An Acid Generator", "Creates Power from Chemical Energy Potentials."}).getStackForm(1);
+ }
+
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java
index 271f59c4c6..6a651b3c2b 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java
@@ -182,9 +182,42 @@ public class RecipeLoader implements Runnable {
});
if (newStuff) {
+
+ GT_ModHandler.addCraftingRecipe(
+ new ItemStack(ItemRegistry.WINDMETER),
+ GT_ModHandler.RecipeBits.NOT_REMOVABLE,
+ new Object[]{
+ "SWF",
+ "Sf ",
+ "Ss ",
+ 'S', "stickWood",
+ 'W', new ItemStack(Blocks.wool, 1, Short.MAX_VALUE),
+ 'F', new ItemStack(Items.string),
+ }
+ );
+
Materials[] cables = {Materials.Lead, Materials.Tin, Materials.AnnealedCopper, Materials.Gold, Materials.Aluminium, Materials.Tungsten, Materials.VanadiumGallium, Materials.Naquadah, Materials.NaquadahAlloy, Materials.Superconductor};
Materials[] hulls = {Materials.WroughtIron, Materials.Steel, Materials.Aluminium, Materials.StainlessSteel, Materials.Titanium, Materials.TungstenSteel, Materials.Chrome, Materials.Iridium, Materials.Osmium, Materials.Naquadah};
+ ItemStack[] bats = {ItemList.Battery_Hull_LV.get(1L), ItemList.Battery_Hull_MV.get(1L), ItemList.Battery_Hull_HV.get(1L)};
+ ItemStack[] chreac = {ItemList.Machine_MV_ChemicalReactor.get(1L), ItemList.Machine_HV_ChemicalReactor.get(1L), ItemList.Machine_EV_ChemicalReactor.get(1L)};
+ for (int i = 0; i < 3; i++) {
+ Materials cable = cables[i + 2];
+ ItemStack machinehull = ItemList.MACHINE_HULLS[i + 2].get(1L);
+ GT_ModHandler.addCraftingRecipe(
+ ItemRegistry.AcidGens[i],
+ RecipeLoader.BITSD,
+ new Object[]{
+ "HRH",
+ "HCH",
+ "HKH",
+ 'H', bats[i],
+ 'K', GT_OreDictUnificator.get(OrePrefixes.cableGt01, cable, 1L),
+ 'C', machinehull,
+ 'R', chreac[i]
+ }
+ );
+ }
for (int i = 0; i < GT_Values.VN.length; i++) {
try {
@@ -385,7 +418,7 @@ public class RecipeLoader implements Runnable {
for (String stone : stones) {
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.craftingParts, 1, 0),
- RecipeLoader.BITSD,
+ GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"SSS",
"DfD",
@@ -396,7 +429,7 @@ public class RecipeLoader implements Runnable {
);
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.craftingParts, 1, 1),
- RecipeLoader.BITSD,
+ GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"hDf",
"SSS",
@@ -406,7 +439,7 @@ public class RecipeLoader implements Runnable {
);
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.craftingParts, 1, 0),
- RecipeLoader.BITSD,
+ GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"SSS",
"DfD",
@@ -417,7 +450,7 @@ public class RecipeLoader implements Runnable {
);
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.craftingParts, 1, 1),
- RecipeLoader.BITSD,
+ GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"hDf",
"SSS",
@@ -428,7 +461,7 @@ public class RecipeLoader implements Runnable {
}
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.craftingParts, 1, 2),
- RecipeLoader.BITSD,
+ GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"STS",
"h f",
@@ -441,7 +474,7 @@ public class RecipeLoader implements Runnable {
}
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.craftingParts, 1, 2),
- RecipeLoader.BITSD,
+ GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"STS",
"h f",
@@ -453,7 +486,7 @@ public class RecipeLoader implements Runnable {
);
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.craftingParts, 1, 3),
- RecipeLoader.BITSD,
+ GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"WLs",
"WLh",
@@ -464,7 +497,7 @@ public class RecipeLoader implements Runnable {
);
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.craftingParts, 1, 4),
- RecipeLoader.BITSD,
+ GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"WLs",
"WLh",
@@ -475,7 +508,7 @@ public class RecipeLoader implements Runnable {
);
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.craftingParts, 1, 5),
- RecipeLoader.BITSD,
+ GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"WLs",
"WLh",
@@ -486,7 +519,7 @@ public class RecipeLoader implements Runnable {
);
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.craftingParts, 1, 6),
- RecipeLoader.BITSD,
+ GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"WEs",
"WZh",
@@ -499,7 +532,7 @@ public class RecipeLoader implements Runnable {
);
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.LeatherRotor),
- RecipeLoader.BITSD,
+ GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"hPf",
"PWP",
@@ -510,7 +543,7 @@ public class RecipeLoader implements Runnable {
);
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.WoolRotor),
- RecipeLoader.BITSD,
+ GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"hPf",
"PWP",
@@ -521,7 +554,7 @@ public class RecipeLoader implements Runnable {
);
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.PaperRotor),
- RecipeLoader.BITSD,
+ GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"hPf",
"PWP",
@@ -532,7 +565,7 @@ public class RecipeLoader implements Runnable {
);
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.CombinedRotor),
- RecipeLoader.BITSD,
+ GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"hPf",
"PWP",
@@ -553,7 +586,6 @@ public class RecipeLoader implements Runnable {
'G', GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Iron, 1L),
}
);
- //next free ID: ConfigHandler.IDOffset+GT_Values.VN.length*6+3
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_AcidGenerator.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_AcidGenerator.java
new file mode 100644
index 0000000000..f893779b81
--- /dev/null
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_AcidGenerator.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 2019 bartimaeusnek
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+package com.github.bartimaeusnek.bartworks.common.tileentities;
+
+import com.github.bartimaeusnek.bartworks.util.BWRecipes;
+import com.github.bartimaeusnek.bartworks.util.ChatColorHelper;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.Textures;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_Recipe;
+
+public class GT_MetaTileEntity_AcidGenerator extends GT_MetaTileEntity_BasicGenerator {
+
+ public GT_MetaTileEntity_AcidGenerator(int aID, String aName, String aNameRegional, int aTier, String[] aDescription, ITexture... aTextures) {
+ super(aID, aName, aNameRegional, aTier, aDescription, aTextures);
+ }
+
+ public GT_MetaTileEntity_AcidGenerator(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
+ super(aName, aTier, aDescription, aTextures);
+ }
+
+ @Override
+ public int getPollution() {
+ return 0;
+ }
+
+ @Override
+ public GT_Recipe.GT_Recipe_Map getRecipes() {
+ return BWRecipes.instance.getMappingsFor((byte) 2);
+ }
+
+ @Override
+ public int getEfficiency() {
+ return 100 - 3 * mTier;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
+ return new GT_MetaTileEntity_AcidGenerator(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
+ }
+
+ public ITexture[] getFront(byte aColor) {
+ return new ITexture[]{super.getFront(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]};
+ }
+
+ public ITexture[] getBack(byte aColor) {
+ return new ITexture[]{super.getBack(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD)};
+ }
+
+ public ITexture[] getBottom(byte aColor) {
+ return new ITexture[]{super.getBottom(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD)};
+ }
+
+ public ITexture[] getTop(byte aColor) {
+ return new ITexture[]{super.getTop(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/chemical_reactor/OVERLAY_FRONT"))};
+ }
+
+ public ITexture[] getSides(byte aColor) {
+ return new ITexture[]{super.getSides(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD)};
+ }
+
+ public ITexture[] getFrontActive(byte aColor) {
+ return new ITexture[]{super.getFrontActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL), Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mTier]};
+ }
+
+ public ITexture[] getBackActive(byte aColor) {
+ return new ITexture[]{super.getBackActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD)};
+ }
+
+ public ITexture[] getBottomActive(byte aColor) {
+ return new ITexture[]{super.getBottomActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD)};
+ }
+
+ public ITexture[] getTopActive(byte aColor) {
+ return new ITexture[]{super.getTopActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/chemical_reactor/OVERLAY_FRONT_ACTIVE"))};
+ }
+
+ public ITexture[] getSidesActive(byte aColor) {
+ return new ITexture[]{super.getSidesActive(aColor)[0], new GT_RenderedTexture(Textures.BlockIcons.MACHINE_CASING_ACIDHAZARD)};
+ }
+
+ public boolean isOutputFacing(byte aSide) {
+ return aSide == this.getBaseMetaTileEntity().getFrontFacing();
+ }
+
+ public String[] getDescription() {
+ return new String[]{mDescription, "Voltage: " + ChatColorHelper.YELLOW + GT_Values.V[this.mTier], "Efficiency: " + ChatColorHelper.YELLOW + getEfficiency(), "Amperage OUT: " + ChatColorHelper.YELLOW + maxAmperesOut(), "Added by bartimaeusnek via " + ChatColorHelper.DARKGREEN + "BartWorks"};
+ }
+}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_Windmill.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_Windmill.java
index 31018d73f7..555d9f4511 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_Windmill.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_Windmill.java
@@ -24,14 +24,15 @@ package com.github.bartimaeusnek.bartworks.common.tileentities;
import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.client.gui.BW_GUIContainer_Windmill;
+import com.github.bartimaeusnek.bartworks.util.BW_Util;
import com.github.bartimaeusnek.bartworks.util.ChatColorHelper;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.enums.Dyes;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.SubTag;
+import gregtech.api.enums.Textures;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -53,6 +54,7 @@ import net.minecraft.tileentity.TileEntityDispenser;
import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.util.ForgeDirection;
+import scala.actors.threadpool.Arrays;
import java.util.ArrayList;
@@ -91,6 +93,11 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_MultiBlockBase {
return true;
}
+ @Override
+ public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ return true;
+ }
+
public boolean recipe_fallback(ItemStack aStack) {
//sight... fallback to the macerator recipes
GT_Recipe.GT_Recipe_Map tMap = GT_Recipe.GT_Recipe_Map.sMaceratorRecipes;
@@ -106,7 +113,18 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_MultiBlockBase {
if (new XSTR().nextInt(2) == 0) {
if (tRecipe.getOutput(1) != null)
mOutputItems[1] = tRecipe.getOutput(1);
- else if (GT_OreDictUnificator.getAssociation(aStack) == null || GT_OreDictUnificator.getAssociation(aStack).mMaterial == null || GT_OreDictUnificator.getAssociation(aStack).mMaterial.mMaterial == null)
+ else if (GT_OreDictUnificator.getAssociation(aStack) == null || GT_OreDictUnificator.getAssociation(aStack).mMaterial == null || GT_OreDictUnificator.getAssociation(aStack).mMaterial.mMaterial == null ||
+ BW_Util.checkStackAndPrefix(mOutputItems[0]) && GT_OreDictUnificator.getAssociation(mOutputItems[0]).mMaterial.mMaterial == Materials.Flint ||
+ BW_Util.checkStackAndPrefix(mOutputItems[0]) && GT_OreDictUnificator.getAssociation(mOutputItems[0]).mMaterial.mMaterial == Materials.Sugar ||
+ BW_Util.checkStackAndPrefix(mOutputItems[0]) && GT_OreDictUnificator.getAssociation(mOutputItems[0]).mMaterial.mMaterial == Materials.Wheat ||
+ BW_Util.checkStackAndPrefix(mOutputItems[0]) && GT_OreDictUnificator.getAssociation(mOutputItems[0]).mMaterial.mMaterial == Materials.Wood ||
+ BW_Util.checkStackAndPrefix(mOutputItems[0]) && GT_OreDictUnificator.getAssociation(mOutputItems[0]).mMaterial.mMaterial == Materials.Clay ||
+ BW_Util.checkStackAndPrefix(mOutputItems[0]) && GT_OreDictUnificator.getAssociation(mOutputItems[0]).mMaterial.mMaterial == Materials.Ash ||
+ BW_Util.checkStackAndPrefix(mOutputItems[0]) && GT_OreDictUnificator.getAssociation(mOutputItems[0]).mMaterial.mMaterial == Materials.Snow ||
+ BW_Util.checkStackAndPrefix(mOutputItems[0]) && GT_OreDictUnificator.getAssociation(mOutputItems[0]).mMaterial.mMaterial == Materials.Stone ||
+ BW_Util.checkStackAndPrefix(mOutputItems[0]) && GT_OreDictUnificator.getAssociation(mOutputItems[0]).mMaterial.mMaterial == Materials.MeatRaw||
+ BW_Util.checkStackAndPrefix(mOutputItems[0]) && GT_OreDictUnificator.getAssociation(mOutputItems[0]).mMaterial.mMaterial == Materials.MeatCooked
+ )
mOutputItems[1] = tRecipe.getOutput(0);
}
}
@@ -168,7 +186,10 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_MultiBlockBase {
} else if (Block.getBlockFromItem(itemStack.getItem()).equals(Blocks.clay) || Block.getBlockFromItem(itemStack.getItem()).equals(Blocks.hardened_clay) || Block.getBlockFromItem(itemStack.getItem()).equals(Blocks.stained_hardened_clay)) {
itemStack.stackSize -= 1;
this.mMaxProgresstime = 60 * 20 * 100;
- this.mOutputItems[0] = Materials.Clay.getDust(1);
+ if (new XSTR().nextInt(2) == 0)
+ this.mOutputItems[0] = Materials.Clay.getDust(2);
+ else
+ this.mOutputItems[0] = Materials.Clay.getDust(1);
return true;
} else if (Block.getBlockFromItem(itemStack.getItem()).equals(Blocks.redstone_block)) {
itemStack.stackSize -= 1;
@@ -349,14 +370,12 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_MultiBlockBase {
@Override
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack itemStack) {
-
/*
* offset x1 = 3x3
* offset x2 = 5x5
* offset x3 = 7x7
* etc.
*/
-
int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 3;
int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 3;
@@ -541,7 +560,7 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_MultiBlockBase {
"WxHxL: 7x12x7",
"Layer 1: 7x7 Bricks, corners are air, controller at front centered.",
"Layer 2-5: 5x5 Hardened Clay, corners are air, can contain one door,",
- "hollow, must contain at least one Dispenser",
+ "hollow, Wall must contain at least one Dispenser",
"Layer 6: 5x5 Wood Planks. Corners are filled, hollow.",
"Layer 7: 7x7 Wood Planks. Corners are air, hollow.",
"Layer 8: 7x7 Wood Planks. Corners are air, hollow,",
@@ -605,17 +624,22 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_MultiBlockBase {
@Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- ITexture[] ret = new ITexture[0];
+ ITexture[] ret = new ITexture[6];
if (isClientSide()) {
- iTextures[0] = new GT_RenderedTexture(iIconContainers[0], Dyes.getModulation(0, Dyes.MACHINE_METAL.mRGBa));
- ret = new ITexture[6];
- for (int i = 0; i < 6; i++) {
- ret[i] = iTextures[0];
+ Arrays.fill(ret, new GT_RenderedTexture(Textures.BlockIcons.COVER_WOOD_PLATE));
+
+ if (aFacing == aSide || aSide == 0) {
+ iTextures[0] = new GT_RenderedTexture(iIconContainers[0]);
+
+ ret = new ITexture[6];
+ for (int i = 0; i < 6; i++) {
+ ret[i] = iTextures[0];
+ }
}
if (aSide == 1) {
- iTextures[1] = new GT_RenderedTexture(iIconContainers[1], Dyes.getModulation(0, Dyes.MACHINE_METAL.mRGBa));
+ iTextures[1] = new GT_RenderedTexture(iIconContainers[1]);
ret = new ITexture[6];
for (int i = 0; i < 6; i++) {
@@ -624,8 +648,6 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_MultiBlockBase {
}
}
-
-
return ret;
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_CircuitProgrammer.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_CircuitProgrammer.java
index 53c009e973..2ba88bf4ee 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_CircuitProgrammer.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_CircuitProgrammer.java
@@ -72,7 +72,9 @@ public class GT_Container_CircuitProgrammer extends Container {
@Override
public ItemStack slotClick(int slot, int button, int aShifthold, EntityPlayer entityPlayer) {
if (slot > 0 && slot < 25 && ((Slot) this.inventorySlots.get(0)).getStack() != null) {
- ((Slot) this.inventorySlots.get(0)).putStack(GT_Utility.getIntegratedCircuit(slot));
+ ItemStack iCircuit = GT_Utility.getIntegratedCircuit(slot);
+ iCircuit.stackSize = 1;
+ ((Slot) this.inventorySlots.get(0)).putStack(iCircuit);
detectAndSendChanges();
return ((Slot) this.inventorySlots.get(0)).getStack();
}
@@ -92,7 +94,7 @@ public class GT_Container_CircuitProgrammer extends Container {
Slot slot = (Slot) this.inventorySlots.get(SlotNR);
if (slot != null && slot.getStack() != null && slot.getStack().getItem().equals(GT_Utility.getIntegratedCircuit(0).getItem())) {
if (chipslot.getStack() == null) {
- chipslot.putStack(slot.getStack());
+ chipslot.putStack(slot.getStack().copy());
slot.decrStackSize(1);
}
}
@@ -100,7 +102,7 @@ public class GT_Container_CircuitProgrammer extends Container {
for (int i = 25; i < this.inventorySlots.size(); i++) {
if (((Slot) this.inventorySlots.get(i)).getStack() == null) {
Slot empty = ((Slot) this.inventorySlots.get(i));
- empty.putStack(chipslot.getStack());
+ empty.putStack(chipslot.getStack().copy());
chipslot.decrStackSize(1);
break;
}
@@ -124,6 +126,7 @@ public class GT_Container_CircuitProgrammer extends Container {
tag = this.toBind.getTagCompound();
if (tag.getBoolean("HasChip")) {
Slot = GT_Utility.getIntegratedCircuit(tag.getByte("ChipConfig"));
+ Slot.stackSize = 1;
}
}
@@ -168,6 +171,7 @@ public class GT_Container_CircuitProgrammer extends Container {
} else if (BW_Util.checkStackAndPrefix(itemStack) && GT_OreDictUnificator.getAssociation(itemStack).mPrefix.equals(OrePrefixes.circuit) && GT_OreDictUnificator.getAssociation(itemStack).mMaterial.mMaterial.equals(Materials.Basic)) {
Slot = GT_Utility.getIntegratedCircuit(0);
+ Slot.stackSize = 1;
itemStack.stackSize--;
tag = toBind.getTagCompound();
tag.setBoolean("HasChip", true);
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java
index f5f837cd0f..0dec15b274 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java
@@ -22,6 +22,7 @@
package com.github.bartimaeusnek.bartworks.util;
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
import com.github.bartimaeusnek.bartworks.common.loaders.BioCultureLoader;
import com.github.bartimaeusnek.bartworks.common.loaders.BioItemList;
import com.github.bartimaeusnek.bartworks.common.loaders.FluidLoader;
@@ -37,6 +38,7 @@ import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gregtech.common.items.behaviors.Behaviour_DataOrb;
+import ic2.core.Ic2Items;
import ic2.core.item.ItemFluidCell;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
@@ -56,7 +58,8 @@ public class BWRecipes {
public static final BWRecipes instance = new BWRecipes();
public static final byte BIOLABBYTE = 0;
public static final byte BACTERIALVATBYTE = 1;
- private GT_Recipe.GT_Recipe_Map sBiolab = new GT_Recipe.GT_Recipe_Map(
+ public static final byte ACIDGENMAPBYTE = 2;
+ private final GT_Recipe.GT_Recipe_Map sBiolab = new GT_Recipe.GT_Recipe_Map(
new HashSet<GT_Recipe>(150),
"bw.recipe.biolab",
"Bio Lab",
@@ -64,7 +67,7 @@ public class BWRecipes {
"gregtech:textures/gui/basicmachines/BW.GUI.BioLab",
6, 2, 1, 1, 1,
"", 1, "", true, true);
- private BacteriaVatRecipeMap sBacteriaVat = new BacteriaVatRecipeMap(
+ private final BacteriaVatRecipeMap sBacteriaVat = new BacteriaVatRecipeMap(
new HashSet<GT_Recipe>(50),
"bw.recipe.BacteriaVat",
"Bacterial Vat",
@@ -72,208 +75,232 @@ public class BWRecipes {
"gregtech:textures/gui/basicmachines/Default",
6, 2, 0, 1, 1,
"Need Sievert: ", 1, " Sv", true, true);
+ private final BW_Recipe_Map_LiquidFuel sAcidGenFuels = new BW_Recipe_Map_LiquidFuel(
+ new HashSet<GT_Recipe>(10),
+ "bw.fuels.acidgens",
+ "Acid Generator",
+ null,
+ "gregtech:textures/gui/basicmachines/Default",
+ 1, 1, 1, 1, 1,
+ "EU generated: ", 1000, "", false, true
+ );
public BWRecipes() {
- FluidStack[] dnaFluid = {Loader.isModLoaded("gendustry") ? FluidRegistry.getFluidStack("liquiddna", 1000) : Materials.Biomass.getFluid(1000L)};
-
- for (ItemStack stack : BioItemList.getAllPetriDishes()) {
- BioData DNA = BioData.getBioDataFromNBTTag(stack.getTagCompound().getCompoundTag("DNA"));
- if (DNA != null) {
- ItemStack Detergent = BioItemList.getOther(1);
- ItemStack DNAFlask = BioItemList.getDNASampleFlask(null);
- ItemStack EthanolCell = Materials.Ethanol.getCells(1);
- sBiolab.addFakeRecipe(false,
- new ItemStack[]{
- stack,
- DNAFlask,
- Detergent,
- EthanolCell
- },
- new ItemStack[]{
- BioItemList.getDNASampleFlask(BioDNA.convertDataToDNA(DNA)),
- GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L)
- },
- BioItemList.mBioLabParts[0],
- new int[]{DNA.getChance(), 10000},
- new FluidStack[]{
- FluidRegistry.getFluidStack("ic2distilledwater", 1000)
- },
- null,
- 500,
- BW_Util.getMachineVoltageFromTier(3 + DNA.getTier()),
- BW_Util.STANDART
- );
+ if (ConfigHandler.BioLab) {
+ FluidStack[] dnaFluid = {Loader.isModLoaded("gendustry") ? FluidRegistry.getFluidStack("liquiddna", 1000) : Materials.Biomass.getFluid(1000L)};
+
+ for (ItemStack stack : BioItemList.getAllPetriDishes()) {
+ BioData DNA = BioData.getBioDataFromNBTTag(stack.getTagCompound().getCompoundTag("DNA"));
+ if (DNA != null) {
+ ItemStack Detergent = BioItemList.getOther(1);
+ ItemStack DNAFlask = BioItemList.getDNASampleFlask(null);
+ ItemStack EthanolCell = Materials.Ethanol.getCells(1);
+ sBiolab.addFakeRecipe(false,
+ new ItemStack[]{
+ stack,
+ DNAFlask,
+ Detergent,
+ EthanolCell
+ },
+ new ItemStack[]{
+ BioItemList.getDNASampleFlask(BioDNA.convertDataToDNA(DNA)),
+ GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L)
+ },
+ BioItemList.mBioLabParts[0],
+ new int[]{DNA.getChance(), 10000},
+ new FluidStack[]{
+ FluidRegistry.getFluidStack("ic2distilledwater", 1000)
+ },
+ null,
+ 500,
+ BW_Util.getMachineVoltageFromTier(3 + DNA.getTier()),
+ BW_Util.STANDART
+ );
+ }
}
- }
- for (ItemStack stack : BioItemList.getAllDNASampleFlasks()) {
- BioData DNA = BioData.getBioDataFromNBTTag(stack.getTagCompound());
-
- if (DNA != null) {
- ItemStack Outp = ItemList.Tool_DataOrb.get(1L);
- Behaviour_DataOrb.setDataTitle(Outp, "DNA Sample");
- Behaviour_DataOrb.setDataName(Outp, DNA.getName());
-
- sBiolab.addFakeRecipe(false,
- new ItemStack[]{
- stack,
- FluidLoader.BioLabFluidCells[0],
- FluidLoader.BioLabFluidCells[3],
- ItemList.Tool_DataOrb.get(1L)
- },
- new ItemStack[]{
- Outp,
- ItemList.Cell_Universal_Fluid.get(2L)
- },
- BioItemList.mBioLabParts[1],
- new int[]{DNA.getChance(), 10000},
- dnaFluid,
- null,
- 500,
- BW_Util.getMachineVoltageFromTier(4 + DNA.getTier()),
- BW_Util.STANDART
- );
+ for (ItemStack stack : BioItemList.getAllDNASampleFlasks()) {
+ BioData DNA = BioData.getBioDataFromNBTTag(stack.getTagCompound());
+
+ if (DNA != null) {
+ ItemStack Outp = ItemList.Tool_DataOrb.get(1L);
+ Behaviour_DataOrb.setDataTitle(Outp, "DNA Sample");
+ Behaviour_DataOrb.setDataName(Outp, DNA.getName());
+
+ sBiolab.addFakeRecipe(false,
+ new ItemStack[]{
+ stack,
+ FluidLoader.BioLabFluidCells[0],
+ FluidLoader.BioLabFluidCells[3],
+ ItemList.Tool_DataOrb.get(1L)
+ },
+ new ItemStack[]{
+ Outp,
+ ItemList.Cell_Universal_Fluid.get(2L)
+ },
+ BioItemList.mBioLabParts[1],
+ new int[]{DNA.getChance(), 10000},
+ dnaFluid,
+ null,
+ 500,
+ BW_Util.getMachineVoltageFromTier(4 + DNA.getTier()),
+ BW_Util.STANDART
+ );
+ }
}
- }
- for (ItemStack stack : BioItemList.getAllPlasmidCells()) {
- BioData DNA = BioData.getBioDataFromNBTTag(stack.getTagCompound());
-
- if (DNA != null) {
- ItemStack inp = ItemList.Tool_DataOrb.get(0L);
- Behaviour_DataOrb.setDataTitle(inp, "DNA Sample");
- Behaviour_DataOrb.setDataName(inp, DNA.getName());
- ItemStack inp2 = ItemList.Tool_DataOrb.get(0L);
- Behaviour_DataOrb.setDataTitle(inp2, "DNA Sample");
- Behaviour_DataOrb.setDataName(inp2, BioCultureLoader.BIO_DATA_BETA_LACMATASE.getName());
-
- sBiolab.addFakeRecipe(false,
- new ItemStack[]{
- FluidLoader.BioLabFluidCells[1],
- BioItemList.getPlasmidCell(null),
- inp,
- inp2
- },
- new ItemStack[]{
- stack,
- ItemList.Cell_Universal_Fluid.get(1L)
- },
- BioItemList.mBioLabParts[2],
- new int[]{DNA.getChance(), 10000},
- dnaFluid,
- null,
- 500,
- BW_Util.getMachineVoltageFromTier(4 + DNA.getTier()),
- BW_Util.STANDART
- );
+ for (ItemStack stack : BioItemList.getAllPlasmidCells()) {
+ BioData DNA = BioData.getBioDataFromNBTTag(stack.getTagCompound());
+
+ if (DNA != null) {
+ ItemStack inp = ItemList.Tool_DataOrb.get(0L);
+ Behaviour_DataOrb.setDataTitle(inp, "DNA Sample");
+ Behaviour_DataOrb.setDataName(inp, DNA.getName());
+ ItemStack inp2 = ItemList.Tool_DataOrb.get(0L);
+ Behaviour_DataOrb.setDataTitle(inp2, "DNA Sample");
+ Behaviour_DataOrb.setDataName(inp2, BioCultureLoader.BIO_DATA_BETA_LACMATASE.getName());
+
+ sBiolab.addFakeRecipe(false,
+ new ItemStack[]{
+ FluidLoader.BioLabFluidCells[1],
+ BioItemList.getPlasmidCell(null),
+ inp,
+ inp2
+ },
+ new ItemStack[]{
+ stack,
+ ItemList.Cell_Universal_Fluid.get(1L)
+ },
+ BioItemList.mBioLabParts[2],
+ new int[]{DNA.getChance(), 10000},
+ dnaFluid,
+ null,
+ 500,
+ BW_Util.getMachineVoltageFromTier(4 + DNA.getTier()),
+ BW_Util.STANDART
+ );
+ }
}
- }
- //Transformation- [Distilled Water] + Culture () + Plasmids (Gene) Cell + Penicillin Cell= Culture (Gene) + Empty Cells
- sBiolab.addFakeRecipe(false,
- new ItemStack[]{
- BioItemList.getPetriDish(null).setStackDisplayName("The Culture to change"),
- BioItemList.getPlasmidCell(null).setStackDisplayName("The Plasmids to Inject"),
- FluidLoader.BioLabFluidCells[2],
- },
- new ItemStack[]{
- BioItemList.getPetriDish(null).setStackDisplayName("The changed Culture"),
- ItemList.Cell_Universal_Fluid.get(1L)
- },
- BioItemList.mBioLabParts[3],
- new int[]{7500, 10000},
- new FluidStack[]{
- FluidRegistry.getFluidStack("ic2distilledwater", 1000)
- },
- null,
- 500,
- BW_Util.getMachineVoltageFromTier(6),
- BW_Util.STANDART
- );
-
-
- ItemStack Outp = ItemList.Tool_DataOrb.get(1L);
- Behaviour_DataOrb.setDataTitle(Outp, "DNA Sample");
- Behaviour_DataOrb.setDataName(Outp, "Any DNA");
- //Clonal Cellular Synthesis- [Liquid DNA] + Medium Petri Dish + Plasma Membrane + Stem Cells + Genome Data
- sBiolab.addFakeRecipe(false,
- new ItemStack[]{
- BioItemList.getPetriDish(null),
- BioItemList.getOther(4),
- ItemList.Circuit_Chip_Stemcell.get(2L),
- Outp
- },
- new ItemStack[]{
- BioItemList.getPetriDish(null).setStackDisplayName("The Culture made from DNA"),
- },
- BioItemList.mBioLabParts[4],
- new int[]{7500, 10000},
- new FluidStack[]{new FluidStack(dnaFluid[0].getFluid(), 9000)},
- null,
- 500,
- BW_Util.getMachineVoltageFromTier(6),
- BW_Util.STANDART
- );
-
- FluidStack[] easyFluids = {Materials.Water.getFluid(1000L), FluidRegistry.getFluidStack("ic2distilledwater", 1000)};
- for (FluidStack fluidStack : easyFluids) {
- for (BioCulture bioCulture : BioCulture.BIO_CULTURE_ARRAY_LIST) {
- if (bioCulture.isBreedable() && bioCulture.getTier() == 0) {
- sBacteriaVat.addRecipe(
- //boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecialItems, int[] aChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue
- new BacteriaVatRecipe(
- true,
- new ItemStack[]{
- GT_Utility.getIntegratedCircuit(0),
- new ItemStack(Items.sugar, 64)
- },
- null,
- BioItemList.getPetriDish(bioCulture),
- null,
- new FluidStack[]{
- fluidStack
- },
- new FluidStack[]{
- new FluidStack(bioCulture.getFluid(), 10)
- },
- 1000,
- BW_Util.getMachineVoltageFromTier(3),
- BW_Util.STANDART
- ), true
- );
- //aOptimize, aInputs, aOutputs, aSpecialItems, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue
- sBiolab.addRecipe(
- new BioLabRecipe(
- false,
- new ItemStack[]{
- BioItemList.getPetriDish(null),
- fluidStack.equals(Materials.Water.getFluid(1000L)) ? Materials.Water.getCells(1) : ItemFluidCell.getUniversalFluidCell(FluidRegistry.getFluidStack("ic2distilledwater", 1000))
- },
- new ItemStack[]{
- BioItemList.getPetriDish(bioCulture),
- fluidStack.equals(Materials.Water.getFluid(1000L)) ? Materials.Empty.getCells(1) : ItemList.Cell_Universal_Fluid.get(1L)
- },
- null,
- new int[]{
- bioCulture.getChance(),
- 10000
- },
- new FluidStack[]{
- new FluidStack(bioCulture.getFluid(), 1000)
- },
- null,
- 500,
- BW_Util.getMachineVoltageFromTier(3),
- BW_Util.STANDART
- ));
+ //Transformation- [Distilled Water] + Culture () + Plasmids (Gene) Cell + Penicillin Cell= Culture (Gene) + Empty Cells
+ sBiolab.addFakeRecipe(false,
+ new ItemStack[]{
+ BioItemList.getPetriDish(null).setStackDisplayName("The Culture to change"),
+ BioItemList.getPlasmidCell(null).setStackDisplayName("The Plasmids to Inject"),
+ FluidLoader.BioLabFluidCells[2],
+ },
+ new ItemStack[]{
+ BioItemList.getPetriDish(null).setStackDisplayName("The changed Culture"),
+ ItemList.Cell_Universal_Fluid.get(1L)
+ },
+ BioItemList.mBioLabParts[3],
+ new int[]{7500, 10000},
+ new FluidStack[]{
+ FluidRegistry.getFluidStack("ic2distilledwater", 1000)
+ },
+ null,
+ 500,
+ BW_Util.getMachineVoltageFromTier(6),
+ BW_Util.STANDART
+ );
+
+
+ ItemStack Outp = ItemList.Tool_DataOrb.get(1L);
+ Behaviour_DataOrb.setDataTitle(Outp, "DNA Sample");
+ Behaviour_DataOrb.setDataName(Outp, "Any DNA");
+ //Clonal Cellular Synthesis- [Liquid DNA] + Medium Petri Dish + Plasma Membrane + Stem Cells + Genome Data
+ sBiolab.addFakeRecipe(false,
+ new ItemStack[]{
+ BioItemList.getPetriDish(null),
+ BioItemList.getOther(4),
+ ItemList.Circuit_Chip_Stemcell.get(2L),
+ Outp
+ },
+ new ItemStack[]{
+ BioItemList.getPetriDish(null).setStackDisplayName("The Culture made from DNA"),
+ },
+ BioItemList.mBioLabParts[4],
+ new int[]{7500, 10000},
+ new FluidStack[]{new FluidStack(dnaFluid[0].getFluid(), 9000)},
+ null,
+ 500,
+ BW_Util.getMachineVoltageFromTier(6),
+ BW_Util.STANDART
+ );
+
+ FluidStack[] easyFluids = {Materials.Water.getFluid(1000L), FluidRegistry.getFluidStack("ic2distilledwater", 1000)};
+ for (FluidStack fluidStack : easyFluids) {
+ for (BioCulture bioCulture : BioCulture.BIO_CULTURE_ARRAY_LIST) {
+ if (bioCulture.isBreedable() && bioCulture.getTier() == 0) {
+ sBacteriaVat.addRecipe(
+ //boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecialItems, int[] aChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue
+ new BacteriaVatRecipe(
+ true,
+ new ItemStack[]{
+ GT_Utility.getIntegratedCircuit(0),
+ new ItemStack(Items.sugar, 64)
+ },
+ null,
+ BioItemList.getPetriDish(bioCulture),
+ null,
+ new FluidStack[]{
+ fluidStack
+ },
+ new FluidStack[]{
+ new FluidStack(bioCulture.getFluid(), 10)
+ },
+ 1000,
+ BW_Util.getMachineVoltageFromTier(3),
+ BW_Util.STANDART
+ ), true
+ );
+ //aOptimize, aInputs, aOutputs, aSpecialItems, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue
+ sBiolab.addRecipe(
+ new BioLabRecipe(
+ false,
+ new ItemStack[]{
+ BioItemList.getPetriDish(null),
+ fluidStack.equals(Materials.Water.getFluid(1000L)) ? Materials.Water.getCells(1) : ItemFluidCell.getUniversalFluidCell(FluidRegistry.getFluidStack("ic2distilledwater", 1000))
+ },
+ new ItemStack[]{
+ BioItemList.getPetriDish(bioCulture),
+ fluidStack.equals(Materials.Water.getFluid(1000L)) ? Materials.Empty.getCells(1) : ItemList.Cell_Universal_Fluid.get(1L)
+ },
+ null,
+ new int[]{
+ bioCulture.getChance(),
+ 10000
+ },
+ new FluidStack[]{
+ new FluidStack(bioCulture.getFluid(), 1000)
+ },
+ null,
+ 500,
+ BW_Util.getMachineVoltageFromTier(3),
+ BW_Util.STANDART
+ ));
+ }
}
}
}
+
+ sAcidGenFuels.addLiquidFuel(Materials.PhosphoricAcid, 36);
+ sAcidGenFuels.addLiquidFuel(Materials.DilutedHydrochloricAcid, 14);
+ sAcidGenFuels.addLiquidFuel(Materials.HypochlorousAcid, 30);
+ sAcidGenFuels.addLiquidFuel(Materials.HydrofluoricAcid, 40);
+ sAcidGenFuels.addLiquidFuel(Materials.HydrochloricAcid, 28);
+ sAcidGenFuels.addLiquidFuel(Materials.NitricAcid, 24);
+ sAcidGenFuels.addLiquidFuel(Materials.Mercury, 32);
+ sAcidGenFuels.addLiquidFuel(Materials.DilutedSulfuricAcid, 9);
+ sAcidGenFuels.addLiquidFuel(Materials.SulfuricAcid, 18);
+ sAcidGenFuels.addLiquidFuel(Materials.AceticAcid, 11);
+ sAcidGenFuels.addMoltenFuel(Materials.Redstone, 10);
}
+
/**
- * @param machine 0 = biolab; 1 = BacterialVat
+ * @param machine 0 = biolab; 1 = BacterialVat; 2 = sAcidGenFuels
* @return
*/
public GT_Recipe.GT_Recipe_Map getMappingsFor(byte machine) {
@@ -282,6 +309,8 @@ public class BWRecipes {
return sBiolab;
case 1:
return sBacteriaVat;
+ case 2:
+ return sAcidGenFuels;
default:
return null;
}
@@ -442,6 +471,26 @@ public class BWRecipes {
return false;
}
+ public static class BW_Recipe_Map_LiquidFuel extends GT_Recipe.GT_Recipe_Map_Fuel {
+ public BW_Recipe_Map_LiquidFuel(Collection<GT_Recipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) {
+ super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed);
+ }
+
+ public GT_Recipe addLiquidFuel(Materials M, int burn) {
+ return super.addFuel(M.getCells(1), Materials.Empty.getCells(1), burn);
+ }
+
+ public GT_Recipe addMoltenFuel(Materials M, int burn) {
+ return super.addFuel(ItemFluidCell.getUniversalFluidCell(M.getMolten(144L)), Ic2Items.FluidCell.copy(), burn);
+ }
+
+ public GT_Recipe addLiquidFuel(FluidStack fluidStack, int burn) {
+ return super.addFuel(ItemFluidCell.getUniversalFluidCell(fluidStack), Ic2Items.FluidCell.copy(), burn);
+ }
+
+
+ }
+
class BioLabRecipe extends GT_Recipe {
protected BioLabRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecialItems, int[] aChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
super(aOptimize, aInputs, aOutputs, aSpecialItems, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue);
diff --git a/src/main/resources/assets/bartworks/lang/en_US.lang b/src/main/resources/assets/bartworks/lang/en_US.lang
index 23cb370e17..f81f0a533b 100644
--- a/src/main/resources/assets/bartworks/lang/en_US.lang
+++ b/src/main/resources/assets/bartworks/lang/en_US.lang
@@ -22,6 +22,7 @@ item.rotors.leatherParts.name=Leather Covered Wood Frame
item.rotors.woolParts.name=Wool Covered Wood Frame
item.rotors.paperParts.name=Paper Covered Wood Frame
item.rotors.combinedParts.name=Multiple Material Covered Wood Frame
+item.BW_SimpleWindMeter.name=Simple Wind Meter
itemGroup.BioTab=BartWorks BioEngineering
filled.item.petriDish.name=Petri Dish with a Culture
diff --git a/src/main/resources/assets/bartworks/textures/items/BW_SimpleWindMeter.png b/src/main/resources/assets/bartworks/textures/items/BW_SimpleWindMeter.png
new file mode 100644
index 0000000000..6b7f9a54d8
--- /dev/null
+++ b/src/main/resources/assets/bartworks/textures/items/BW_SimpleWindMeter.png
Binary files differ