package net.halbear.supernova.custom.fluid; import net.minecraft.fluid.Fluid; import net.minecraft.util.ResourceLocation; import java.util.function.BiFunction; public class SupernovaFluidAttributes { private final boolean flammable; private final boolean ExpandsGas; private final ResourceLocation OverlayTexture; protected SupernovaFluidAttributes(SupernovaFluidBuilder ExtendedBuilder, Fluid fluid) { this.flammable = ExtendedBuilder.flammable; this.ExpandsGas = ExtendedBuilder.ExpandsGas; this.OverlayTexture = ExtendedBuilder.OverlayTexture; } public static SupernovaFluidBuilder Supernovabuilder(ResourceLocation OVERLAY_TEXTURE) { return new SupernovaFluidBuilder(OVERLAY_TEXTURE, SupernovaFluidAttributes::new); } public static class SupernovaFluidBuilder { private ResourceLocation OverlayTexture; private boolean flammable; private boolean ExpandsGas; private BiFunction factory; protected SupernovaFluidBuilder(ResourceLocation OVERLAY_TEXTURE, BiFunction factory) { this.factory = factory; this.OverlayTexture = OVERLAY_TEXTURE; } public final SupernovaFluidBuilder Flammable() { this.flammable = true; return this; } public final SupernovaFluidBuilder GasExpands() { this.ExpandsGas = true; return this; } } }