Package de.cech12.bucketlib.client.model
Class UniversalBucketModel
java.lang.Object
de.cech12.bucketlib.client.model.UniversalBucketModel
- All Implemented Interfaces:
net.neoforged.neoforge.client.model.geometry.IUnbakedGeometry<UniversalBucketModel>
public class UniversalBucketModel
extends Object
implements net.neoforged.neoforge.client.model.geometry.IUnbakedGeometry<UniversalBucketModel>
This implementation is based on net.neoforged.neoforge.client.model.DynamicFluidContainerModel.
Multiple changes were done to simplify the class
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionUniversalBucketModel(net.minecraft.world.level.material.Fluid fluid, net.minecraft.resources.ResourceLocation otherContent, boolean isCracked, boolean isLower) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.client.resources.model.BakedModelbake(net.neoforged.neoforge.client.model.geometry.IGeometryBakingContext owner, net.minecraft.client.resources.model.ModelBaker baker, Function<net.minecraft.client.resources.model.Material, net.minecraft.client.renderer.texture.TextureAtlasSprite> spriteGetter, net.minecraft.client.resources.model.ModelState modelState, List<net.minecraft.client.renderer.block.model.ItemOverride> overrides) static net.minecraft.resources.ResourceLocationgetContentTexture(net.minecraft.resources.ResourceLocation otherContentLocation) withFluid(net.minecraft.world.level.material.Fluid newFluid, boolean isCracked) Returns a new UniversalBucketModel with the given fluid.withOtherContent(net.minecraft.resources.ResourceLocation otherContent, boolean isCracked, boolean isLower) Returns a new UniversalBucketModel with the given other content.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.client.model.geometry.IUnbakedGeometry
getConfigurableComponentNames, resolveDependencies
-
Constructor Details
-
UniversalBucketModel
public UniversalBucketModel(@Nonnull net.minecraft.world.level.material.Fluid fluid, @Nullable net.minecraft.resources.ResourceLocation otherContent, boolean isCracked, boolean isLower)
-
-
Method Details
-
withFluid
public UniversalBucketModel withFluid(net.minecraft.world.level.material.Fluid newFluid, boolean isCracked) Returns a new UniversalBucketModel with the given fluid. -
withOtherContent
public UniversalBucketModel withOtherContent(net.minecraft.resources.ResourceLocation otherContent, boolean isCracked, boolean isLower) Returns a new UniversalBucketModel with the given other content. -
getContentTexture
public static net.minecraft.resources.ResourceLocation getContentTexture(net.minecraft.resources.ResourceLocation otherContentLocation) -
bake
@Nonnull public net.minecraft.client.resources.model.BakedModel bake(net.neoforged.neoforge.client.model.geometry.IGeometryBakingContext owner, @Nonnull net.minecraft.client.resources.model.ModelBaker baker, @Nonnull Function<net.minecraft.client.resources.model.Material, net.minecraft.client.renderer.texture.TextureAtlasSprite> spriteGetter, @Nonnull net.minecraft.client.resources.model.ModelState modelState, @Nonnull List<net.minecraft.client.renderer.block.model.ItemOverride> overrides) - Specified by:
bakein interfacenet.neoforged.neoforge.client.model.geometry.IUnbakedGeometry<UniversalBucketModel>
-