public class Fluid
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Block |
block
If there is a Block implementation of the Fluid, the Block is linked here.
|
static int |
BUCKET_VOLUME |
protected int |
color
Color used by universal bucket and the ModelFluid baked model.
|
protected int |
density
Density of the fluid - completely arbitrary; negative density indicates that the fluid is
lighter than air.
|
private SoundEvent |
emptySound |
private SoundEvent |
fillSound |
protected ResourceLocation |
flowing |
protected java.lang.String |
fluidName
The unique identification name for this fluid.
|
protected boolean |
isGaseous
This indicates if the fluid is gaseous.
|
protected int |
luminosity
The light level emitted by this fluid.
|
protected ResourceLocation |
overlay |
protected EnumRarity |
rarity
The rarity of the fluid.
|
protected ResourceLocation |
still |
protected int |
temperature
Temperature of the fluid - completely arbitrary; higher temperature indicates that the fluid is
hotter than air.
|
protected java.lang.String |
unlocalizedName
The unlocalized name of this fluid.
|
protected int |
viscosity
Viscosity ("thickness") of the fluid - completely arbitrary; negative values are not
permissible.
|
Constructor and Description |
---|
Fluid(java.lang.String fluidName,
ResourceLocation still,
ResourceLocation flowing) |
Fluid(java.lang.String fluidName,
ResourceLocation still,
ResourceLocation flowing,
java.awt.Color color) |
Fluid(java.lang.String fluidName,
ResourceLocation still,
ResourceLocation flowing,
int color) |
Fluid(java.lang.String fluidName,
ResourceLocation still,
ResourceLocation flowing,
ResourceLocation overlay) |
Fluid(java.lang.String fluidName,
ResourceLocation still,
ResourceLocation flowing,
ResourceLocation overlay,
java.awt.Color color) |
Fluid(java.lang.String fluidName,
ResourceLocation still,
ResourceLocation flowing,
ResourceLocation overlay,
int color) |
public static final int BUCKET_VOLUME
protected final java.lang.String fluidName
protected java.lang.String unlocalizedName
protected final ResourceLocation still
protected final ResourceLocation flowing
@Nullable protected final ResourceLocation overlay
private SoundEvent fillSound
private SoundEvent emptySound
protected int luminosity
protected int density
protected int temperature
protected int viscosity
protected boolean isGaseous
protected EnumRarity rarity
protected Block block
protected int color
public Fluid(java.lang.String fluidName, ResourceLocation still, ResourceLocation flowing, java.awt.Color color)
public Fluid(java.lang.String fluidName, ResourceLocation still, ResourceLocation flowing, @Nullable ResourceLocation overlay, java.awt.Color color)
public Fluid(java.lang.String fluidName, ResourceLocation still, ResourceLocation flowing, int color)
public Fluid(java.lang.String fluidName, ResourceLocation still, ResourceLocation flowing, @Nullable ResourceLocation overlay, int color)
public Fluid(java.lang.String fluidName, ResourceLocation still, ResourceLocation flowing)
public Fluid(java.lang.String fluidName, ResourceLocation still, ResourceLocation flowing, @Nullable ResourceLocation overlay)
public Fluid setUnlocalizedName(java.lang.String unlocalizedName)
public Fluid setLuminosity(int luminosity)
public Fluid setDensity(int density)
public Fluid setTemperature(int temperature)
public Fluid setViscosity(int viscosity)
public Fluid setGaseous(boolean isGaseous)
public Fluid setRarity(EnumRarity rarity)
public Fluid setFillSound(SoundEvent fillSound)
public Fluid setEmptySound(SoundEvent emptySound)
public Fluid setColor(java.awt.Color color)
public Fluid setColor(int color)
public final java.lang.String getName()
public final Block getBlock()
public final boolean canBePlacedInWorld()
public final boolean isLighterThanAir()
public boolean doesVaporize(FluidStack fluidStack)
ItemBucket.tryPlaceContainedLiquid(EntityPlayer, World, BlockPos)
fluidStack
- The fluidStack is trying to be placed.public void vaporize(@Nullable EntityPlayer player, World worldIn, BlockPos pos, FluidStack fluidStack)
WorldProvider.doesWaterVaporize()
and doesVaporize(FluidStack)
are true.
Override this to make your explosive liquid blow up instead of the default smoke, etc.
Based on ItemBucket.tryPlaceContainedLiquid(EntityPlayer, World, BlockPos)
player
- Player who tried to place the fluid. May be null for blocks like dispensers.worldIn
- World to vaporize the fluid in.pos
- The position in the world the fluid block was going to be placed.fluidStack
- The fluidStack that was going to be placed.public java.lang.String getLocalizedName(FluidStack stack)
public java.lang.String getUnlocalizedName(FluidStack stack)
public java.lang.String getUnlocalizedName()
public final int getLuminosity()
public final int getDensity()
public final int getTemperature()
public final int getViscosity()
public final boolean isGaseous()
public EnumRarity getRarity()
public int getColor()
public ResourceLocation getStill()
public ResourceLocation getFlowing()
@Nullable public ResourceLocation getOverlay()
public SoundEvent getFillSound()
public SoundEvent getEmptySound()
public int getLuminosity(FluidStack stack)
public int getDensity(FluidStack stack)
public int getTemperature(FluidStack stack)
public int getViscosity(FluidStack stack)
public boolean isGaseous(FluidStack stack)
public EnumRarity getRarity(FluidStack stack)
public int getColor(FluidStack stack)
public ResourceLocation getStill(FluidStack stack)
public ResourceLocation getFlowing(FluidStack stack)
public SoundEvent getFillSound(FluidStack stack)
public SoundEvent getEmptySound(FluidStack stack)
public EnumRarity getRarity(World world, BlockPos pos)
public ResourceLocation getStill(World world, BlockPos pos)
public ResourceLocation getFlowing(World world, BlockPos pos)
public SoundEvent getFillSound(World world, BlockPos pos)
public SoundEvent getEmptySound(World world, BlockPos pos)