Record Class ExtrudedModel
java.lang.Object
java.lang.Record
com.petrolpark.client.rendering.model.extruded.ExtrudedModel
- All Implemented Interfaces:
net.neoforged.neoforge.client.model.geometry.IUnbakedGeometry<ExtrudedModel>
public record ExtrudedModel(net.minecraft.client.renderer.block.model.BlockModel baseModel, Mask mask, float minZ, float maxZ)
extends Record
implements net.neoforged.neoforge.client.model.geometry.IUnbakedGeometry<ExtrudedModel>
A model based on a top, side and bottom texture, and a
Mask.
The Mask is applied to the top and bottom textures and the model is generated with these as the south and north faces respectively.
They are joined by several side faces that follow the edge of the Mask.- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ExtrudedModelGeneratorstatic final ExtrudedModel.Loaderstatic final net.minecraft.resources.ResourceLocation -
Constructor Summary
ConstructorsConstructorDescriptionExtrudedModel(net.minecraft.client.renderer.block.model.BlockModel baseModel, Mask mask, float minZ, float maxZ) Creates an instance of aExtrudedModelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.client.resources.model.BakedModelbake(net.neoforged.neoforge.client.model.geometry.IGeometryBakingContext context, 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, net.minecraft.client.renderer.block.model.ItemOverrides overrides) net.minecraft.client.renderer.block.model.BlockModelReturns the value of thebaseModelrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.mask()Returns the value of themaskrecord component.floatmaxZ()Returns the value of themaxZrecord component.floatminZ()Returns the value of theminZrecord component.static final voidonRegisterGeometryLoaders(net.neoforged.neoforge.client.event.ModelEvent.RegisterGeometryLoaders event) final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.client.model.geometry.IUnbakedGeometry
getConfigurableComponentNames, resolveParents
-
Field Details
-
LOADER_ID
public static final net.minecraft.resources.ResourceLocation LOADER_ID -
LOADER
-
EXTRUDED_MODEL_GENERATOR
-
-
Constructor Details
-
ExtrudedModel
public ExtrudedModel(net.minecraft.client.renderer.block.model.BlockModel baseModel, Mask mask, float minZ, float maxZ) Creates an instance of aExtrudedModelrecord class.- Parameters:
baseModel- the value for thebaseModelrecord componentmask- the value for themaskrecord componentminZ- the value for theminZrecord componentmaxZ- the value for themaxZrecord component
-
-
Method Details
-
bake
public net.minecraft.client.resources.model.BakedModel bake(@Nonnull net.neoforged.neoforge.client.model.geometry.IGeometryBakingContext context, @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 net.minecraft.client.renderer.block.model.ItemOverrides overrides) - Specified by:
bakein interfacenet.neoforged.neoforge.client.model.geometry.IUnbakedGeometry<ExtrudedModel>
-
onRegisterGeometryLoaders
public static final void onRegisterGeometryLoaders(net.neoforged.neoforge.client.event.ModelEvent.RegisterGeometryLoaders event) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
baseModel
public net.minecraft.client.renderer.block.model.BlockModel baseModel()Returns the value of thebaseModelrecord component.- Returns:
- the value of the
baseModelrecord component
-
mask
Returns the value of themaskrecord component.- Returns:
- the value of the
maskrecord component
-
minZ
public float minZ()Returns the value of theminZrecord component.- Returns:
- the value of the
minZrecord component
-
maxZ
public float maxZ()Returns the value of themaxZrecord component.- Returns:
- the value of the
maxZrecord component
-