Add Pyrotheum to fluid gen + clean up fluid handling, closes #1054

This commit is contained in:
modmuss50 2017-07-07 00:02:14 +01:00
parent cead631367
commit de323b847a
No known key found for this signature in database
GPG key ID: 203A5ED4D3E48BEA
4 changed files with 10 additions and 22 deletions

View file

@ -36,9 +36,7 @@ import net.minecraft.server.MinecraftServer;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextComponentString;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.oredict.OreDictionary;
import reborncore.api.fuel.FluidPowerManager;
import reborncore.api.recipe.RecipeHandler;
import java.util.ArrayList;
@ -70,16 +68,6 @@ public class TechRebornDevCommand extends CommandBase {
sender.sendMessage(new TextComponentString("fluid - Lists the fluid power values"));
} else if ("recipes".equals(args[0])) {
sender.sendMessage(new TextComponentString(RecipeHandler.recipeList.size() + " recipes loaded"));
} else if ("fluid".equals(args[0])) {
for (Object object : FluidPowerManager.fluidPowerValues.keySet().toArray()) {
if (object instanceof Fluid) {
Fluid fluid = (Fluid) object;
sender.sendMessage(new TextComponentString(
fluid.getUnlocalizedName() + " : " + FluidPowerManager.fluidPowerValues.get(fluid)));
} else {
sender.sendMessage(new TextComponentString("Found invalid fluid entry"));
}
}
} else if ("clear".equals(args[0])) {
EntityPlayerMP playerMP = (EntityPlayerMP) sender;
List<Block> blocksToRemove = new ArrayList<>();

View file

@ -25,13 +25,14 @@
package techreborn.compat.crafttweaker;
import crafttweaker.api.liquid.ILiquidStack;
import reborncore.api.fuel.FluidPowerManager;
import stanhebben.zenscript.annotations.ZenClass;
import techreborn.api.generator.EFluidGenerator;
import techreborn.api.generator.GeneratorRecipeHelper;
@ZenClass("mods.techreborn.generator")
public class CTGenerator {
public static void addFluidPower(ILiquidStack fluid, double value) {
FluidPowerManager.fluidPowerValues.put(CraftTweakerCompat.toFluidStack(fluid).getFluid(), value);
public static void addFluidPower(ILiquidStack fluid, int value) {
GeneratorRecipeHelper.registerFluidRecipe(EFluidGenerator.THERMAL, CraftTweakerCompat.toFluidStack(fluid).getFluid(), value);
}
}

View file

@ -1,6 +1,7 @@
package techreborn.compat.thermalexpansion;
import cofh.api.util.ThermalExpansionHelper;
import cofh.thermalfoundation.init.TFFluids;
import cofh.thermalfoundation.item.ItemMaterial;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
@ -9,6 +10,8 @@ import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
import techreborn.api.generator.EFluidGenerator;
import techreborn.api.generator.GeneratorRecipeHelper;
import techreborn.compat.ICompatModule;
import techreborn.init.ModItems;
import techreborn.init.recipes.RecipeMethods;
@ -49,6 +52,8 @@ public class RecipeThermalExpansion implements ICompatModule {
}
ThermalExpansionHelper.addSmelterRecipe(4000, new ItemStack(Items.IRON_INGOT, 2), new ItemStack(Blocks.SAND), RecipeMethods.getMaterial("refined_iron", 2, RecipeMethods.Type.INGOT), ItemMaterial.crystalSlag.copy(), 25);
GeneratorRecipeHelper.registerFluidRecipe(EFluidGenerator.THERMAL, TFFluids.fluidPyrotheum, 80);
}
@Override

View file

@ -29,7 +29,6 @@ import net.minecraft.block.material.Material;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
import reborncore.RebornRegistry;
import reborncore.api.fuel.FluidPowerManager;
import techreborn.blocks.fluid.BlockFluidBase;
import techreborn.blocks.fluid.BlockFluidTechReborn;
import techreborn.blocks.fluid.TechRebornFluid;
@ -195,7 +194,6 @@ public class ModFluids {
BLOCK_LITHIUM = new BlockFluidTechReborn(LITHIUM, Material.WATER, "techreborn.lithium");
registerBlock(BLOCK_LITHIUM,
ModInfo.MOD_ID + "_" + BLOCK_LITHIUM.getUnlocalizedName().substring(5));
FluidPowerManager.fluidPowerValues.put(LITHIUM, 24.0);
FluidRegistry.registerFluid(MERCURY);
BLOCK_MERCURY = new BlockFluidTechReborn(MERCURY, Material.WATER, "techreborn.mercury");
@ -212,13 +210,11 @@ public class ModFluids {
"techreborn.nitrocoalfuel");
registerBlock(BLOCK_NITROCOAL_FUEL,
ModInfo.MOD_ID + "_" + BLOCK_NITROCOAL_FUEL.getUnlocalizedName().substring(5));
FluidPowerManager.fluidPowerValues.put(NITROCOAL_FUEL, 48.0);
FluidRegistry.registerFluid(NITROFUEL);
BLOCK_NITROFUEL = new BlockFluidTechReborn(NITROFUEL, Material.WATER, "techreborn.nitrofuel");
registerBlock(BLOCK_NITROFUEL,
ModInfo.MOD_ID + "_" + BLOCK_NITROFUEL.getUnlocalizedName().substring(5));
FluidPowerManager.fluidPowerValues.put(NITROFUEL, 42.0);
FluidRegistry.registerFluid(NITROGEN);
BLOCK_NITROGEN = new BlockFluidTechReborn(NITROGEN, Material.WATER, "techreborn.nitrogen");
@ -245,7 +241,7 @@ public class ModFluids {
BLOCK_SODIUM = new BlockFluidTechReborn(SODIUM, Material.WATER, "techreborn.sodium");
registerBlock(BLOCK_SODIUM,
ModInfo.MOD_ID + "_" + BLOCK_SODIUM.getUnlocalizedName().substring(5));
FluidPowerManager.fluidPowerValues.put(NITROFUEL, 22.0);
FluidRegistry.registerFluid(SODIUMPERSULFATE);
BLOCK_SODIUMPERSULFATE = new BlockFluidTechReborn(SODIUMPERSULFATE, Material.WATER,
@ -297,13 +293,11 @@ public class ModFluids {
BLOCK_NITRO_DIESEL = new BlockFluidTechReborn(NITRO_DIESEL, Material.WATER, "techreborn.nitrodiesel");
registerBlock(BLOCK_NITRO_DIESEL,
ModInfo.MOD_ID + "_" + BLOCK_NITRO_DIESEL.getUnlocalizedName().substring(5));
FluidPowerManager.fluidPowerValues.put(NITRO_DIESEL, 36.0);
FluidRegistry.registerFluid(OIL);
BLOCK_OIL = new BlockFluidTechReborn(OIL, Material.WATER, "techreborn.oil");
registerBlock(BLOCK_OIL,
ModInfo.MOD_ID + "_" + BLOCK_OIL.getUnlocalizedName().substring(5));
FluidPowerManager.fluidPowerValues.put(OIL, 16.0);
FluidRegistry.registerFluid(SULFURIC_ACID);
BLOCK_SULFURIC_ACID = new BlockFluidTechReborn(SULFURIC_ACID, Material.WATER, "techreborn.sulfuricacid");