Search in sources :

Example 1 with PhantomFluidWidget

use of gregtech.api.gui.widgets.PhantomFluidWidget in project GregTech by GregTechCE.

the class SimpleFluidFilter method initUI.

@Override
public void initUI(Consumer<Widget> widgetGroup) {
    for (int i = 0; i < 9; ++i) {
        int index = i;
        widgetGroup.accept((new PhantomFluidWidget(10 + 18 * (i % 3), 18 * (i / 3), 18, 18, () -> getFluidInSlot(index), (newFluid) -> setFluidInSlot(index, newFluid))).setBackgroundTexture(GuiTextures.SLOT));
    }
}
Also used : NBTTagCompound(net.minecraft.nbt.NBTTagCompound) Consumer(java.util.function.Consumer) NBTTagList(net.minecraft.nbt.NBTTagList) Widget(gregtech.api.gui.Widget) NBTBase(net.minecraft.nbt.NBTBase) PhantomFluidWidget(gregtech.api.gui.widgets.PhantomFluidWidget) FluidStack(net.minecraftforge.fluids.FluidStack) GuiTextures(gregtech.api.gui.GuiTextures) Nullable(javax.annotation.Nullable) PhantomFluidWidget(gregtech.api.gui.widgets.PhantomFluidWidget)

Aggregations

GuiTextures (gregtech.api.gui.GuiTextures)1 Widget (gregtech.api.gui.Widget)1 PhantomFluidWidget (gregtech.api.gui.widgets.PhantomFluidWidget)1 Consumer (java.util.function.Consumer)1 Nullable (javax.annotation.Nullable)1 NBTBase (net.minecraft.nbt.NBTBase)1 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)1 NBTTagList (net.minecraft.nbt.NBTTagList)1 FluidStack (net.minecraftforge.fluids.FluidStack)1