Class FluidRegistryEntry<T>
java.lang.Object
alexiil.mc.lib.attributes.fluid.volume.FluidEntry
alexiil.mc.lib.attributes.fluid.volume.FluidRegistryEntry<T>
public final class FluidRegistryEntry<T> extends FluidEntry
FluidEntry that is backed by a Registry.- 
Nested Class Summary
Nested classes/interfaces inherited from class alexiil.mc.lib.attributes.fluid.volume.FluidEntry
FluidEntry.FluidFloatingEntry - 
Field Summary
 - 
Constructor Summary
Constructors Constructor Description FluidRegistryEntry(net.minecraft.util.registry.DefaultedRegistry<T> backingRegistry, T backingObject)FluidRegistryEntry(net.minecraft.util.registry.Registry<T> backingRegistry, T backingObject) - 
Method Summary
Modifier and Type Method Description protected booleanequals(FluidEntry other)booleanequals(java.lang.Object obj)TgetBackingObject()net.minecraft.util.registry.Registry<T>getBackingRegistry()static net.minecraft.util.IdentifiergetFullRegistryName(net.minecraft.util.registry.Registry<?> registry)net.minecraft.util.IdentifiergetId()static java.lang.StringgetName(net.minecraft.util.registry.Registry<?> registry)static net.minecraft.util.registry.DefaultedRegistry<?>getRegistryFromName(java.lang.String name)java.lang.StringgetRegistryInternalName()inthashCode()booleanisEmpty()voidtoMcBuffer(net.minecraft.network.PacketByteBuf buffer)java.lang.StringtoString()voidtoTag(net.minecraft.nbt.CompoundTag tag)Methods inherited from class alexiil.mc.lib.attributes.fluid.volume.FluidEntry
fromMcBuffer, fromTag 
- 
Constructor Details
 - 
Method Details
- 
getName
public static java.lang.String getName(net.minecraft.util.registry.Registry<?> registry)- Returns:
 - The save name for the given registry. Currently 
FluidandPotionbased registries are special-cased to return single-char strings ('f' and 'p' respectively). In the future other common registries may have additional special names. The only guarantee given is thatgetRegistryFromName(String)will know what the mapping is. 
 - 
getFullRegistryName
public static net.minecraft.util.Identifier getFullRegistryName(net.minecraft.util.registry.Registry<?> registry)- Returns:
 - The full 
Identifierfor the given registry. This isn't directly used for saving. 
 - 
getRegistryFromName
@Nullable public static net.minecraft.util.registry.DefaultedRegistry<?> getRegistryFromName(java.lang.String name) - 
toTag
public void toTag(net.minecraft.nbt.CompoundTag tag)- Specified by:
 toTagin classFluidEntry
 - 
toMcBuffer
public void toMcBuffer(net.minecraft.network.PacketByteBuf buffer)- Specified by:
 toMcBufferin classFluidEntry
 - 
isEmpty
public boolean isEmpty()- Specified by:
 isEmptyin classFluidEntry- Returns:
 - True if this corresponds to the default value in the backing registry. (No floating entries are empty).
 
 - 
hashCode
public int hashCode()- Overrides:
 hashCodein classFluidEntry
 - 
equals
public boolean equals(java.lang.Object obj)- Overrides:
 equalsin classFluidEntry
 - 
equals
- Specified by:
 equalsin classFluidEntry
 - 
toString
public java.lang.String toString()- Overrides:
 toStringin classjava.lang.Object
 - 
getRegistryInternalName
public java.lang.String getRegistryInternalName()- Specified by:
 getRegistryInternalNamein classFluidEntry- 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. 
 - 
getId
public net.minecraft.util.Identifier getId()- Specified by:
 getIdin classFluidEntry- Returns:
 - The 
Identifierthat the backing object uses. 
 - 
getBackingRegistry
 - 
getBackingObject
 
 -