mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-02-24 15:00:48 +00:00
you know what *unsiphons your water*
This commit is contained in:
parent
bcb8a48620
commit
05a087bce4
@ -2,9 +2,13 @@ package com.hbm.items.machine;
|
|||||||
|
|
||||||
import com.hbm.util.CompatExternal;
|
import com.hbm.util.CompatExternal;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
import com.hbm.inventory.FluidContainer;
|
import com.hbm.inventory.FluidContainer;
|
||||||
import com.hbm.inventory.FluidContainerRegistry;
|
import com.hbm.inventory.FluidContainerRegistry;
|
||||||
import com.hbm.inventory.fluid.FluidType;
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
|
import com.hbm.inventory.fluid.Fluids;
|
||||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.tool.ItemPipette;
|
import com.hbm.items.tool.ItemPipette;
|
||||||
@ -19,6 +23,15 @@ import net.minecraft.world.World;
|
|||||||
|
|
||||||
public class ItemFluidSiphon extends Item {
|
public class ItemFluidSiphon extends Item {
|
||||||
|
|
||||||
|
private static List<FluidType> IGNORED_FLUIDS = Arrays.asList(
|
||||||
|
Fluids.WATER,
|
||||||
|
Fluids.SPENTSTEAM,
|
||||||
|
Fluids.STEAM,
|
||||||
|
Fluids.HOTSTEAM,
|
||||||
|
Fluids.SUPERHOTSTEAM,
|
||||||
|
Fluids.ULTRAHOTSTEAM
|
||||||
|
);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int i, float f0, float f1, float f2) {
|
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int i, float f0, float f1, float f2) {
|
||||||
TileEntity te = CompatExternal.getCoreFromPos(world, x, y, z);
|
TileEntity te = CompatExternal.getCoreFromPos(world, x, y, z);
|
||||||
@ -37,6 +50,7 @@ public class ItemFluidSiphon extends Item {
|
|||||||
// After we successfully siphon any fluid from a tank, we stop further processing, multiple fluid types require multiple clicks
|
// After we successfully siphon any fluid from a tank, we stop further processing, multiple fluid types require multiple clicks
|
||||||
for (FluidTank tank : tanks) {
|
for (FluidTank tank : tanks) {
|
||||||
if (tank.getFill() <= 0) continue;
|
if (tank.getFill() <= 0) continue;
|
||||||
|
if (IGNORED_FLUIDS.contains(tank.getTankType())) continue;
|
||||||
|
|
||||||
ItemStack availablePipette = null;
|
ItemStack availablePipette = null;
|
||||||
FluidType tankType = tank.getTankType();
|
FluidType tankType = tank.getTankType();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user