mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
More gas changes
This commit is contained in:
1 parent
3d86b75da4
commit
acde30dee3
10 files changed
+41
-40
No files matched your search
+3
-3
@@ -4,10 +4,10 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
import mekanism.api.util.ListUtils;
|
||||
import mekanism.client.jei.machine.AdvancedMachineRecipeCategory;
|
||||
import mekanism.client.jei.machine.AdvancedMachineRecipeWrapper;
|
||||
import mekanism.common.MekanismFluids;
|
||||
import mekanism.common.Tier.GasTankTier;
|
||||
import mekanism.common.recipe.machines.AdvancedMachineRecipe;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
@@ -24,9 +24,9 @@ public class PurificationChamberRecipeWrapper extends AdvancedMachineRecipeWrapp
|
||||
@Override
|
||||
public List<ItemStack> getFuelStacks(Gas gasType)
|
||||
{
|
||||
if(gasType == GasRegistry.getGas("oxygen"))
|
||||
if(gasType == MekanismFluids.Oxygen)
|
||||
{
|
||||
return ListUtils.asList(new ItemStack(Items.FLINT), MekanismUtils.getFullGasTank(GasTankTier.BASIC, GasRegistry.getGas("oxygen")));
|
||||
return ListUtils.asList(new ItemStack(Items.FLINT), MekanismUtils.getFullGasTank(GasTankTier.BASIC, MekanismFluids.Oxygen));
|
||||
}
|
||||
|
||||
return new ArrayList<ItemStack>();
|
||||
|
||||
@@ -4,11 +4,11 @@ import java.util.HashMap;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.client.render.MekanismRenderer.DisplayInteger;
|
||||
import mekanism.client.render.MekanismRenderer.Model3D;
|
||||
import mekanism.common.MekanismBlocks;
|
||||
import mekanism.common.MekanismFluids;
|
||||
import mekanism.common.tile.TileEntityTeleporter;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
@@ -80,7 +80,7 @@ public class RenderTeleporter extends TileEntitySpecialRenderer<TileEntityTelepo
|
||||
|
||||
Model3D toReturn = new Model3D();
|
||||
toReturn.baseBlock = Blocks.STONE;
|
||||
toReturn.setTexture(GasRegistry.getGas("oxygen").getSprite());
|
||||
toReturn.setTexture(MekanismFluids.Oxygen.getSprite());
|
||||
|
||||
DisplayInteger display = DisplayInteger.createAndStart();
|
||||
|
||||
|
||||
@@ -956,15 +956,15 @@ public class Mekanism
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(InfuseRegistry.get("OBSIDIAN"), 10, new ItemStack(MekanismItems.ReinforcedAlloy), new ItemStack(MekanismItems.AtomicAlloy));
|
||||
|
||||
//Chemical Infuser Recipes
|
||||
RecipeHandler.addChemicalInfuserRecipe(new GasStack(GasRegistry.getGas("oxygen"), 1), new GasStack(MekanismFluids.SulfurDioxide, 2), new GasStack(MekanismFluids.SulfurTrioxide, 2));
|
||||
RecipeHandler.addChemicalInfuserRecipe(new GasStack(MekanismFluids.Oxygen, 1), new GasStack(MekanismFluids.SulfurDioxide, 2), new GasStack(MekanismFluids.SulfurTrioxide, 2));
|
||||
RecipeHandler.addChemicalInfuserRecipe(new GasStack(MekanismFluids.SulfurTrioxide, 1), new GasStack(MekanismFluids.Water, 1), new GasStack(MekanismFluids.SulfuricAcid, 1));
|
||||
RecipeHandler.addChemicalInfuserRecipe(new GasStack(GasRegistry.getGas("hydrogen"), 1), new GasStack(MekanismFluids.Chlorine, 1), new GasStack(MekanismFluids.HydrogenChloride, 1));
|
||||
RecipeHandler.addChemicalInfuserRecipe(new GasStack(MekanismFluids.Hydrogen, 1), new GasStack(MekanismFluids.Chlorine, 1), new GasStack(MekanismFluids.HydrogenChloride, 1));
|
||||
RecipeHandler.addChemicalInfuserRecipe(new GasStack(MekanismFluids.Deuterium, 1), new GasStack(MekanismFluids.Tritium, 1), new GasStack(MekanismFluids.FusionFuel, 2));
|
||||
|
||||
//Electrolytic Separator Recipes
|
||||
RecipeHandler.addElectrolyticSeparatorRecipe(FluidRegistry.getFluidStack("water", 2), 2 * general.FROM_H2, new GasStack(GasRegistry.getGas("hydrogen"), 2), new GasStack(GasRegistry.getGas("oxygen"), 1));
|
||||
RecipeHandler.addElectrolyticSeparatorRecipe(FluidRegistry.getFluidStack("water", 2), 2 * general.FROM_H2, new GasStack(MekanismFluids.Hydrogen, 2), new GasStack(MekanismFluids.Oxygen, 1));
|
||||
RecipeHandler.addElectrolyticSeparatorRecipe(FluidRegistry.getFluidStack("brine", 10), 2 * general.FROM_H2, new GasStack(MekanismFluids.Sodium, 1), new GasStack(MekanismFluids.Chlorine, 1));
|
||||
RecipeHandler.addElectrolyticSeparatorRecipe(FluidRegistry.getFluidStack("heavywater", 2), usage.heavyWaterElectrolysisUsage, new GasStack(MekanismFluids.Deuterium, 2), new GasStack(GasRegistry.getGas("oxygen"), 1));
|
||||
RecipeHandler.addElectrolyticSeparatorRecipe(FluidRegistry.getFluidStack("heavywater", 2), usage.heavyWaterElectrolysisUsage, new GasStack(MekanismFluids.Deuterium, 2), new GasStack(MekanismFluids.Oxygen, 1));
|
||||
|
||||
//Thermal Evaporation Plant Recipes
|
||||
RecipeHandler.addThermalEvaporationRecipe(FluidRegistry.getFluidStack("water", 10), FluidRegistry.getFluidStack("brine", 1));
|
||||
@@ -988,20 +988,20 @@ public class Mekanism
|
||||
|
||||
//Pressurized Reaction Chamber Recipes
|
||||
RecipeHandler.addPRCRecipe(
|
||||
new ItemStack(MekanismItems.BioFuel, 2), new FluidStack(FluidRegistry.WATER, 10), new GasStack(GasRegistry.getGas("hydrogen"), 100),
|
||||
new ItemStack(MekanismItems.BioFuel, 2), new FluidStack(FluidRegistry.WATER, 10), new GasStack(MekanismFluids.Hydrogen, 100),
|
||||
new ItemStack(MekanismItems.Substrate), new GasStack(MekanismFluids.Ethene, 100),
|
||||
0,
|
||||
100
|
||||
);
|
||||
RecipeHandler.addPRCRecipe(
|
||||
new ItemStack(MekanismItems.Substrate), new FluidStack(FluidRegistry.getFluid("ethene"), 50), new GasStack(GasRegistry.getGas("oxygen"), 10),
|
||||
new ItemStack(MekanismItems.Polyethene), new GasStack(GasRegistry.getGas("oxygen"), 5),
|
||||
new ItemStack(MekanismItems.Substrate), new FluidStack(FluidRegistry.getFluid("ethene"), 50), new GasStack(MekanismFluids.Oxygen, 10),
|
||||
new ItemStack(MekanismItems.Polyethene), new GasStack(MekanismFluids.Oxygen, 5),
|
||||
1000,
|
||||
60
|
||||
);
|
||||
RecipeHandler.addPRCRecipe(
|
||||
new ItemStack(MekanismItems.Substrate), new FluidStack(FluidRegistry.WATER, 200), new GasStack(MekanismFluids.Ethene, 100),
|
||||
new ItemStack(MekanismItems.Substrate, 8), new GasStack(GasRegistry.getGas("oxygen"), 10),
|
||||
new ItemStack(MekanismItems.Substrate, 8), new GasStack(MekanismFluids.Oxygen, 10),
|
||||
200,
|
||||
400
|
||||
);
|
||||
@@ -1037,7 +1037,7 @@ public class Mekanism
|
||||
});
|
||||
|
||||
//Fuel Gases
|
||||
FuelHandler.addGas(GasRegistry.getGas("hydrogen"), 1, general.FROM_H2);
|
||||
FuelHandler.addGas(MekanismFluids.Hydrogen, 1, general.FROM_H2);
|
||||
|
||||
//RecipeSorter registrations
|
||||
RecipeSorter.register("mekanism_shaped", ShapedMekanismRecipe.class, Category.SHAPED, "");
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package mekanism.common.inventory.container;
|
||||
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
import mekanism.api.gas.IGasItem;
|
||||
import mekanism.common.MekanismFluids;
|
||||
import mekanism.common.inventory.slot.SlotEnergy.SlotDischarge;
|
||||
import mekanism.common.inventory.slot.SlotStorageTank;
|
||||
import mekanism.common.recipe.RecipeHandler;
|
||||
@@ -83,14 +83,14 @@ public class ContainerElectrolyticSeparator extends Container
|
||||
{
|
||||
if(((IGasItem)slotStack.getItem()).getGas(slotStack) != null)
|
||||
{
|
||||
if(((IGasItem)slotStack.getItem()).getGas(slotStack).getGas() == GasRegistry.getGas("hydrogen"))
|
||||
if(((IGasItem)slotStack.getItem()).getGas(slotStack).getGas() == MekanismFluids.Hydrogen)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 1, 2, false))
|
||||
{
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
}
|
||||
else if(((IGasItem)slotStack.getItem()).getGas(slotStack).getGas() == GasRegistry.getGas("oxygen"))
|
||||
else if(((IGasItem)slotStack.getItem()).getGas(slotStack).getGas() == MekanismFluids.Oxygen)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 2, 3, false))
|
||||
{
|
||||
|
||||
@@ -5,9 +5,9 @@ import java.util.List;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.api.gas.IGasItem;
|
||||
import mekanism.common.MekanismFluids;
|
||||
import mekanism.common.util.ItemDataUtils;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
@@ -72,7 +72,7 @@ public class ItemFlamethrower extends ItemMekanism implements IGasItem
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(stack.getGas() != GasRegistry.getGas("hydrogen"))
|
||||
if(stack.getGas() != MekanismFluids.Hydrogen)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -97,7 +97,7 @@ public class ItemFlamethrower extends ItemMekanism implements IGasItem
|
||||
@Override
|
||||
public boolean canReceiveGas(ItemStack itemstack, Gas type)
|
||||
{
|
||||
return type == GasRegistry.getGas("hydrogen");
|
||||
return type == MekanismFluids.Hydrogen;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -160,7 +160,7 @@ public class ItemFlamethrower extends ItemMekanism implements IGasItem
|
||||
list.add(empty);
|
||||
|
||||
ItemStack filled = new ItemStack(this);
|
||||
setGas(filled, new GasStack(GasRegistry.getGas("hydrogen"), ((IGasItem)filled.getItem()).getMaxGas(filled)));
|
||||
setGas(filled, new GasStack(MekanismFluids.Hydrogen, ((IGasItem)filled.getItem()).getMaxGas(filled)));
|
||||
list.add(filled);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@ import java.util.List;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.api.gas.IGasItem;
|
||||
import mekanism.client.render.ModelCustomArmor;
|
||||
import mekanism.client.render.ModelCustomArmor.ArmorModel;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.MekanismFluids;
|
||||
import mekanism.common.MekanismItems;
|
||||
import mekanism.common.util.ItemDataUtils;
|
||||
import mekanism.common.util.LangUtils;
|
||||
@@ -137,7 +137,7 @@ public class ItemJetpack extends ItemArmor implements IGasItem, ISpecialArmor
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(stack.getGas() != GasRegistry.getGas("hydrogen"))
|
||||
if(stack.getGas() != MekanismFluids.Hydrogen)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -162,7 +162,7 @@ public class ItemJetpack extends ItemArmor implements IGasItem, ISpecialArmor
|
||||
@Override
|
||||
public boolean canReceiveGas(ItemStack itemstack, Gas type)
|
||||
{
|
||||
return type == GasRegistry.getGas("hydrogen");
|
||||
return type == MekanismFluids.Hydrogen;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -217,7 +217,7 @@ public class ItemJetpack extends ItemArmor implements IGasItem, ISpecialArmor
|
||||
list.add(empty);
|
||||
|
||||
ItemStack filled = new ItemStack(this);
|
||||
setGas(filled, new GasStack(GasRegistry.getGas("hydrogen"), ((IGasItem)filled.getItem()).getMaxGas(filled)));
|
||||
setGas(filled, new GasStack(MekanismFluids.Hydrogen, ((IGasItem)filled.getItem()).getMaxGas(filled)));
|
||||
list.add(filled);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@ import java.util.List;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.api.gas.IGasItem;
|
||||
import mekanism.client.render.ModelCustomArmor;
|
||||
import mekanism.client.render.ModelCustomArmor.ArmorModel;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.MekanismFluids;
|
||||
import mekanism.common.util.ItemDataUtils;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
@@ -135,7 +135,7 @@ public class ItemScubaTank extends ItemArmor implements IGasItem
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(stack.getGas() != GasRegistry.getGas("oxygen"))
|
||||
if(stack.getGas() != MekanismFluids.Oxygen)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -182,7 +182,7 @@ public class ItemScubaTank extends ItemArmor implements IGasItem
|
||||
@Override
|
||||
public boolean canReceiveGas(ItemStack itemstack, Gas type)
|
||||
{
|
||||
return type == GasRegistry.getGas("oxygen");
|
||||
return type == MekanismFluids.Oxygen;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -228,7 +228,7 @@ public class ItemScubaTank extends ItemArmor implements IGasItem
|
||||
list.add(empty);
|
||||
|
||||
ItemStack filled = new ItemStack(this);
|
||||
setGas(filled, new GasStack(GasRegistry.getGas("oxygen"), ((IGasItem)filled.getItem()).getMaxGas(filled)));
|
||||
setGas(filled, new GasStack(MekanismFluids.Oxygen, ((IGasItem)filled.getItem()).getMaxGas(filled)));
|
||||
list.add(filled);
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ import mekanism.api.gas.IGasItem;
|
||||
import mekanism.api.gas.ITubeConnection;
|
||||
import mekanism.api.util.ListUtils;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.MekanismFluids;
|
||||
import mekanism.common.Upgrade;
|
||||
import mekanism.common.Upgrade.IUpgradeInfoHandler;
|
||||
import mekanism.common.base.FluidHandlerWrapper;
|
||||
@@ -318,11 +319,11 @@ public class TileEntityElectrolyticSeparator extends TileEntityElectricBlock imp
|
||||
}
|
||||
else if(slotID == 1)
|
||||
{
|
||||
return itemstack.getItem() instanceof IGasItem && (((IGasItem)itemstack.getItem()).getGas(itemstack) == null || ((IGasItem)itemstack.getItem()).getGas(itemstack).getGas() == GasRegistry.getGas("hydrogen"));
|
||||
return itemstack.getItem() instanceof IGasItem && (((IGasItem)itemstack.getItem()).getGas(itemstack) == null || ((IGasItem)itemstack.getItem()).getGas(itemstack).getGas() == MekanismFluids.Hydrogen);
|
||||
}
|
||||
else if(slotID == 2)
|
||||
{
|
||||
return itemstack.getItem() instanceof IGasItem && (((IGasItem)itemstack.getItem()).getGas(itemstack) == null || ((IGasItem)itemstack.getItem()).getGas(itemstack).getGas() == GasRegistry.getGas("oxygen"));
|
||||
return itemstack.getItem() instanceof IGasItem && (((IGasItem)itemstack.getItem()).getGas(itemstack) == null || ((IGasItem)itemstack.getItem()).getGas(itemstack).getGas() == MekanismFluids.Oxygen);
|
||||
}
|
||||
else if(slotID == 3)
|
||||
{
|
||||
|
||||
@@ -4,11 +4,11 @@ import java.util.Map;
|
||||
|
||||
import mekanism.api.MekanismConfig.usage;
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.api.gas.GasTransmission;
|
||||
import mekanism.api.gas.IGasItem;
|
||||
import mekanism.common.MekanismBlocks;
|
||||
import mekanism.common.MekanismFluids;
|
||||
import mekanism.common.block.states.BlockStateMachine;
|
||||
import mekanism.common.recipe.RecipeHandler.Recipe;
|
||||
import mekanism.common.recipe.machines.PurificationRecipe;
|
||||
@@ -33,9 +33,9 @@ public class TileEntityPurificationChamber extends TileEntityAdvancedElectricMac
|
||||
@Override
|
||||
public GasStack getItemGas(ItemStack itemstack)
|
||||
{
|
||||
if(itemstack.isItemEqual(new ItemStack(Items.FLINT))) return new GasStack(GasRegistry.getGas("oxygen"), 10);
|
||||
if(itemstack.isItemEqual(new ItemStack(Items.FLINT))) return new GasStack(MekanismFluids.Oxygen, 10);
|
||||
if(Block.getBlockFromItem(itemstack.getItem()) == MekanismBlocks.GasTank && ((IGasItem)itemstack.getItem()).getGas(itemstack) != null &&
|
||||
((IGasItem)itemstack.getItem()).getGas(itemstack).getGas() == GasRegistry.getGas("oxygen")) return new GasStack(GasRegistry.getGas("oxygen"), 1);
|
||||
((IGasItem)itemstack.getItem()).getGas(itemstack).getGas() == MekanismFluids.Oxygen) return new GasStack(MekanismFluids.Oxygen, 1);
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -43,7 +43,7 @@ public class TileEntityPurificationChamber extends TileEntityAdvancedElectricMac
|
||||
@Override
|
||||
public int receiveGas(EnumFacing side, GasStack stack, boolean doTransfer)
|
||||
{
|
||||
if(stack.getGas() == GasRegistry.getGas("oxygen"))
|
||||
if(stack.getGas() == MekanismFluids.Oxygen)
|
||||
{
|
||||
return gasTank.receive(stack, doTransfer);
|
||||
}
|
||||
@@ -54,7 +54,7 @@ public class TileEntityPurificationChamber extends TileEntityAdvancedElectricMac
|
||||
@Override
|
||||
public boolean canReceiveGas(EnumFacing side, Gas type)
|
||||
{
|
||||
return type == GasRegistry.getGas("oxygen");
|
||||
return type == MekanismFluids.Oxygen;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -62,7 +62,7 @@ public class TileEntityPurificationChamber extends TileEntityAdvancedElectricMac
|
||||
{
|
||||
if(!inventory.get(1).isEmpty() && gasTank.getNeeded() > 0 && inventory.get(1).getItem() instanceof IGasItem)
|
||||
{
|
||||
GasStack removed = GasTransmission.removeGas(inventory.get(1), GasRegistry.getGas("oxygen"), gasTank.getNeeded());
|
||||
GasStack removed = GasTransmission.removeGas(inventory.get(1), MekanismFluids.Oxygen, gasTank.getNeeded());
|
||||
gasTank.receive(removed, true);
|
||||
return;
|
||||
}
|
||||
@@ -79,7 +79,7 @@ public class TileEntityPurificationChamber extends TileEntityAdvancedElectricMac
|
||||
@Override
|
||||
public boolean isValidGas(Gas gas)
|
||||
{
|
||||
return gas == GasRegistry.getGas("oxygen");
|
||||
return gas == MekanismFluids.Oxygen;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package mekanism.generators.common.inventory.container;
|
||||
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
import mekanism.api.gas.IGasItem;
|
||||
import mekanism.common.MekanismFluids;
|
||||
import mekanism.common.inventory.slot.SlotEnergy.SlotCharge;
|
||||
import mekanism.common.util.ChargeUtils;
|
||||
import mekanism.generators.common.tile.TileEntityGasGenerator;
|
||||
@@ -85,7 +85,7 @@ public class ContainerGasGenerator extends Container
|
||||
{
|
||||
if(slotID != 0 && slotID != 1)
|
||||
{
|
||||
if(((IGasItem)slotStack.getItem()).getGas(slotStack) != null && ((IGasItem)slotStack.getItem()).getGas(slotStack).getGas() == GasRegistry.getGas("hydrogen"))
|
||||
if(((IGasItem)slotStack.getItem()).getGas(slotStack) != null && ((IGasItem)slotStack.getItem()).getGas(slotStack).getGas() == MekanismFluids.Hydrogen)
|
||||
{
|
||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user