Class FluidEntry
java.lang.Object
alexiil.mc.lib.attributes.fluid.volume.FluidEntry
- Direct Known Subclasses:
- FluidEntry.FluidFloatingEntry,- FluidRegistryEntry
Identifier equivalent for FluidKey. The only two permitted sub-types are:
 - FluidRegistryEntry: for fluids that are based on a minecraft object that's registered in a- Registry.
- FluidEntry.FluidFloatingEntry: for fluids that aren't based an a minecraft object, and so are identified by a string/identifier.
FluidEntry to FluidKey mappings are stored in FluidKeys.- 
Nested Class SummaryNested Classes
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract booleanequals(FluidEntry other)booleanstatic FluidEntryfromMcBuffer(net.minecraft.network.PacketByteBuf buffer)static FluidEntryfromTag(net.minecraft.nbt.NbtCompound tag)Reads aFluidEntryfrom the given tag.abstract net.minecraft.util.IdentifiergetId()abstract StringinthashCode()abstract booleanisEmpty()abstract voidtoMcBuffer(net.minecraft.network.PacketByteBuf buffer)abstract voidtoTag(net.minecraft.nbt.NbtCompound tag)
- 
Field Details- 
hashprotected final int hash
 
- 
- 
Method Details- 
hashCodepublic int hashCode()
- 
equals
- 
equals
- 
toTagpublic abstract void toTag(net.minecraft.nbt.NbtCompound tag)
- 
fromTagReads aFluidEntryfrom the given tag. Note that the returned entry might not map to aFluidKey.
- 
toMcBufferpublic abstract void toMcBuffer(net.minecraft.network.PacketByteBuf buffer)
- 
fromMcBuffer
- 
isEmptypublic abstract boolean isEmpty()- Returns:
- True if this corresponds to the default value in the backing registry. (No floating entries are empty).
 
- 
getRegistryInternalName- Returns:
- The LBA-internal name used to serialise this entry. Floating entries return "i", Fluid-based registry entries return "f",Potion-based registry entries return "p", and any other registry entry returns the ID of that registry.
 
- 
getIdpublic abstract net.minecraft.util.Identifier getId()- Returns:
- The Identifierthat the backing object uses.
 
 
-