Uses of Class
net.neoforged.neoforge.transfer.fluid.FluidResource
Packages that use FluidResource
Package
Description
-
Uses of FluidResource in net.minecraft.world.level.material
Fields in net.minecraft.world.level.material declared as FluidResourceMethods in net.minecraft.world.level.material that return FluidResourceModifier and TypeMethodDescriptionFluid.computeDefaultResource(Function<Fluid, FluidResource> resourceConstructor) Deprecated.Method parameters in net.minecraft.world.level.material with type arguments of type FluidResourceModifier and TypeMethodDescriptionFluid.computeDefaultResource(Function<Fluid, FluidResource> resourceConstructor) Deprecated.Neo: do not use, useof(net.neoforged.neoforge.fluids.FluidStack)instead. -
Uses of FluidResource in net.neoforged.neoforge.capabilities
Fields in net.neoforged.neoforge.capabilities with type parameters of type FluidResourceModifier and TypeFieldDescriptionstatic final BlockCapability<ResourceHandler<FluidResource>, @Nullable Direction> Capabilities.Fluid.BLOCKstatic final EntityCapability<ResourceHandler<FluidResource>, @Nullable Direction> Capabilities.Fluid.ENTITYstatic final ItemCapability<ResourceHandler<FluidResource>, ItemAccess> Capabilities.Fluid.ITEM -
Uses of FluidResource in net.neoforged.neoforge.fluids.capability
Fields in net.neoforged.neoforge.fluids.capability with type parameters of type FluidResourceModifier and TypeFieldDescriptionprivate final ResourceHandler<FluidResource> FluidResourceHandlerAdapter.handlerDeprecated, for removal: This API element is subject to removal in a future version.Method parameters in net.neoforged.neoforge.fluids.capability with type arguments of type FluidResourceModifier and TypeMethodDescriptionstatic IFluidHandlerIFluidHandler.of(ResourceHandler<FluidResource> handler) Deprecated, for removal: This API element is subject to removal in a future version.Creates a wrapper around aResourceHandler, to present it as a legacyIFluidHandler.Constructor parameters in net.neoforged.neoforge.fluids.capability with type arguments of type FluidResourceModifierConstructorDescription(package private)Deprecated, for removal: This API element is subject to removal in a future version.FluidResourceHandlerItemAdapter(ResourceHandler<FluidResource> handler, ItemAccess itemAccess) Deprecated, for removal: This API element is subject to removal in a future version. -
Uses of FluidResource in net.neoforged.neoforge.transfer.fluid
Fields in net.neoforged.neoforge.transfer.fluid declared as FluidResourceModifier and TypeFieldDescriptionstatic final FluidResourceFluidResource.EMPTYThe empty resource instance of aFluidResourceFields in net.neoforged.neoforge.transfer.fluid with type parameters of type FluidResourceModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<FluidResource> FluidResource.CODECCodec for a fluid resource.static final com.mojang.serialization.Codec<FluidResource> FluidResource.OPTIONAL_CODECCodec for a fluid resource.static final StreamCodec<RegistryFriendlyByteBuf, FluidResource> FluidResource.STREAM_CODECStream codec for a fluid resource.Methods in net.neoforged.neoforge.transfer.fluid that return FluidResourceModifier and TypeMethodDescriptionCauldronWrapper.getResource(int index) protected FluidResourceBucketResourceHandler.getResourceFrom(ItemResource accessResource, int index) FluidStacksResourceHandler.getResourceFrom(FluidStack stack) protected FluidResourceItemAccessFluidHandler.getResourceFrom(ItemResource accessResource, int index) static FluidResourceNote: This cannot be called before your fluid is registeredstatic FluidResourceFluidResource.of(Holder<Fluid> holder, DataComponentPatch patch) Note: This cannot be called before your fluid is registeredstatic FluidResourceNote: This cannot be called before your fluid is registeredstatic FluidResourceFluidResource.of(Fluid fluid, DataComponentPatch patch) Note: This cannot be called before your fluid is registeredstatic FluidResourceFluidResource.of(FluidStack stack) Creates aFluidResourcefor the given fluid stack.<D> FluidResourceFluidResource.with(Supplier<? extends DataComponentType<D>> type, D data) <D> FluidResourceFluidResource.with(DataComponentType<D> type, D data) FluidResource.withMergedPatch(DataComponentPatch patch) FluidResource.without(Supplier<? extends DataComponentType<?>> type) FluidResource.without(DataComponentType<?> type) Methods in net.neoforged.neoforge.transfer.fluid that return types with arguments of type FluidResourceModifier and TypeMethodDescriptionprivate static @Nullable ResourceStack<FluidResource> FluidUtil.moveWithSound(ResourceHandler<FluidResource> from, ResourceHandler<FluidResource> to, Level level, @Nullable BlockPos pos, @Nullable Player player, boolean pickup) Methods in net.neoforged.neoforge.transfer.fluid with parameters of type FluidResourceModifier and TypeMethodDescriptionintCauldronWrapper.extract(int index, FluidResource resource, int amount, TransactionContext transaction) protected intBucketResourceHandler.getCapacity(int index, FluidResource resource) protected intFluidStacksResourceHandler.getCapacity(int index, FluidResource resource) protected intItemAccessFluidHandler.getCapacity(int index, FluidResource resource) longCauldronWrapper.getCapacityAsLong(int index, FluidResource resource) protected FluidStackFluidStacksResourceHandler.getStackFrom(FluidResource resource, int amount) intCauldronWrapper.insert(int index, FluidResource resource, int amount, TransactionContext transaction) booleanCauldronWrapper.isValid(int index, FluidResource resource) booleanItemAccessFluidHandler.isValid(int index, FluidResource resource) booleanFluidStacksResourceHandler.matches(FluidStack stack, FluidResource resource) private static voidFluidUtil.playSoundAndGameEvent(FluidResource resource, Level level, @Nullable BlockPos blockPos, @Nullable Player player, boolean pickup) static voidFluidUtil.triggerSoundAndGameEvent(FluidResource resource, Level level, Vec3 position, @Nullable Player player, boolean pickup) Triggers the appropriate sound effect and game event for an interaction with a fluid handler.static booleanFluidUtil.tryPlaceFluid(FluidResource resource, @Nullable Player player, Level level, InteractionHand hand, BlockPos pos) Tries to place one bucket of a fluid resource into the level as a block.protected ItemResourceBucketResourceHandler.update(ItemResource accessResource, int index, FluidResource newResource, int newAmount) protected ItemResourceItemAccessFluidHandler.update(ItemResource accessResource, int index, FluidResource newResource, int newAmount) Method parameters in net.neoforged.neoforge.transfer.fluid with type arguments of type FluidResourceModifier and TypeMethodDescriptionstatic FluidStackFluidUtil.getStack(ResourceHandler<FluidResource> handler, int index) Returns a new fluid stack with the contents of the handler at the given index.static booleanFluidUtil.interactWithFluidHandler(Player player, InteractionHand hand, @Nullable BlockPos pos, ResourceHandler<FluidResource> handler) Used to handle the common case of a player holding a fluid item and right-clicking on a fluid handler.private static @Nullable ResourceStack<FluidResource> FluidUtil.moveWithSound(ResourceHandler<FluidResource> from, ResourceHandler<FluidResource> to, Level level, @Nullable BlockPos pos, @Nullable Player player, boolean pickup) static FluidStackFluidUtil.tryPickupFluid(@Nullable ResourceHandler<FluidResource> destination, @Nullable Player player, Level level, BlockPos pos, @Nullable Direction side) Attempts to pick up a fluid in the level and put it into a fluid handler, first from aBucketPickupblock (such as fluid sources and waterlogged blocks), or second from aCapabilities.Fluid.BLOCKcapability instance.static FluidStackFluidUtil.tryPlaceFluid(@Nullable ResourceHandler<FluidResource> source, @Nullable Player player, Level level, InteractionHand hand, BlockPos pos) Tries to extract one bucket of a fluid resource from a resource handler and place it into the level as a block.
of(net.neoforged.neoforge.fluids.FluidStack)instead.