Package org.moddingx.libx.base
Class FluidBase
java.lang.Object
org.moddingx.libx.base.FluidBase
- All Implemented Interfaces:
net.minecraft.world.level.ItemLike,Registerable
@PlainRegisterable
public class FluidBase
extends Object
implements net.minecraft.world.level.ItemLike, Registerable
A
Registerable that registers a fluid type, source and flowing fluid,
a liquid block and a bucket item.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.moddingx.libx.registration.Registerable
Registerable.EntryCollector -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal net.minecraft.world.item.ItemasItem()protected ClientExtensionInfo.FluidcreateClientExtensions(net.minecraft.resources.ResourceLocation id) Creates theclient extensionsfor this fluid.static FluidBase.BuilderCreates a new fluid builder for setting the basic fluid properties to be passed in the constructor.final net.minecraft.world.item.BucketItemGets thebucket itemfor thisFluidBase.final net.minecraft.world.level.material.FluidGets theflowing fluidfor thisFluidBase.final net.minecraft.world.level.material.FluidgetFluid()Gets thesource fluidfor thisFluidBase.final net.neoforged.neoforge.fluids.FluidTypeGets thefluid typefor thisFluidBase.final net.minecraft.world.level.block.LiquidBlockGets theliquid blockfor thisFluidBase.final net.minecraft.world.level.material.FluidGets thesource fluidfor thisFluidBase.voidregisterAdditional(RegistrationContext ctx, Registerable.EntryCollector builder) Registers additional objects.voidSimilar toRegisterable.registerAdditional(RegistrationContext, EntryCollector)but only invoked on the client.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.moddingx.libx.registration.Registerable
setupClient, setupCommon
-
Field Details
-
mod
-
-
Constructor Details
-
FluidBase
-
-
Method Details
-
createClientExtensions
protected ClientExtensionInfo.Fluid createClientExtensions(net.minecraft.resources.ResourceLocation id) Creates theclient extensionsfor this fluid. The default implementation creates client extensions that have no special properties, use a still texture located at[namespace]:block/[path]and a flowing texture located at[namespace]:block/[path]_flowing. -
registerAdditional
@OverridingMethodsMustInvokeSuper public void registerAdditional(RegistrationContext ctx, Registerable.EntryCollector builder) Description copied from interface:RegisterableRegisters additional objects. Those may beRegisterableas well. These objects will be registered with the id of this object and optionally a name suffix.- Specified by:
registerAdditionalin interfaceRegisterable
-
registerClientAdditional
@OverridingMethodsMustInvokeSuper public void registerClientAdditional(RegistrationContext ctx, Registerable.EntryCollector builder) Description copied from interface:RegisterableSimilar toRegisterable.registerAdditional(RegistrationContext, EntryCollector)but only invoked on the client.- Specified by:
registerClientAdditionalin interfaceRegisterable
-
getFluidType
Gets thefluid typefor thisFluidBase. -
getFluid
Gets thesource fluidfor thisFluidBase. This is the same asgetSourceFluid(). One should prefer this method overgetSourceFluid()when needing a representative for the wholefluid type, for example when creatingfluid stacks. -
getSourceFluid
Gets thesource fluidfor thisFluidBase. This is the same asgetFluid(). One should prefer this method overgetFluid()when a distinction between source and flowing fluids is to be made. -
getFlowingFluid
Gets theflowing fluidfor thisFluidBase. -
getLiquidBlock
Gets theliquid blockfor thisFluidBase. -
getBucketItem
Gets thebucket itemfor thisFluidBase. -
asItem
- Specified by:
asItemin interfacenet.minecraft.world.level.ItemLike
-
fluidBuilder
Creates a new fluid builder for setting the basic fluid properties to be passed in the constructor.
-