mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 06:42:56 +00:00
51 lines
1.5 KiB
Java
51 lines
1.5 KiB
Java
package mekanism.common.tile;
|
|
|
|
import java.util.Map;
|
|
import mekanism.api.gas.Gas;
|
|
import mekanism.api.gas.GasStack;
|
|
import mekanism.common.block.states.BlockStateMachine.MachineType;
|
|
import mekanism.common.recipe.RecipeHandler.Recipe;
|
|
import mekanism.common.recipe.inputs.AdvancedMachineInput;
|
|
import mekanism.common.recipe.machines.PurificationRecipe;
|
|
import mekanism.common.tile.prefab.TileEntityAdvancedElectricMachine;
|
|
import net.minecraft.util.EnumFacing;
|
|
|
|
public class TileEntityPurificationChamber extends TileEntityAdvancedElectricMachine<PurificationRecipe> {
|
|
|
|
public TileEntityPurificationChamber() {
|
|
super("purifier", MachineType.PURIFICATION_CHAMBER, BASE_TICKS_REQUIRED, BASE_GAS_PER_TICK);
|
|
}
|
|
|
|
@Override
|
|
public Map<AdvancedMachineInput, PurificationRecipe> getRecipes() {
|
|
return Recipe.PURIFICATION_CHAMBER.get();
|
|
}
|
|
|
|
@Override
|
|
public int receiveGas(EnumFacing side, GasStack stack, boolean doTransfer) {
|
|
if (canReceiveGas(side, stack.getGas())) {
|
|
return gasTank.receive(stack, doTransfer);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
@Override
|
|
public boolean canReceiveGas(EnumFacing side, Gas type) {
|
|
return gasTank.canReceive(type) && isValidGas(type);
|
|
}
|
|
|
|
@Override
|
|
public boolean isValidGas(Gas gas) {
|
|
return Recipe.PURIFICATION_CHAMBER.containsRecipe(gas);
|
|
}
|
|
|
|
@Override
|
|
public boolean upgradeableSecondaryEfficiency() {
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public boolean useStatisticalMechanics() {
|
|
return true;
|
|
}
|
|
} |