Class BasicOptions
java.lang.Object
net.darkhax.botanypots.common.impl.data.display.types.BasicOptions
- All Implemented Interfaces:
RenderOptions
A basic implementation of the render options.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<BasicOptions> static Set<net.minecraft.core.Direction> The default set of faces that should not be culled.static org.joml.Vector3fThe default offset, which does nothing.static org.joml.Vector3fThe default scale to apply to displays.static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, BasicOptions> -
Constructor Summary
ConstructorsConstructorDescriptionBasicOptions(org.joml.Vector3f scale, org.joml.Vector3f offset, List<AxisAlignedRotation> rotations, boolean renderFluid, Optional<TintColor> tintColor, Set<net.minecraft.core.Direction> faces) -
Method Summary
Modifier and TypeMethodDescriptiongetColor()Gets an optional tint color to apply to any table elements of the display.Set<net.minecraft.core.Direction> getFaces()A set of faces that should not be culled when rendering.org.joml.Vector3fGets the offset of the render.Gets a list of rotations to apply to the render.org.joml.Vector3fgetScale()Gets the scale of the render.static BasicOptionsstatic BasicOptionsbooleanCheck if fluid layers should be included in the rendered display.
-
Field Details
-
DEFAULT_FACES
The default set of faces that should not be culled. All faces are preserved by default. -
DEFAULT_SCALE
public static org.joml.Vector3f DEFAULT_SCALEThe default scale to apply to displays. The default is 62.5% which is what we determined looked good at 100% growth. -
DEFAULT_OFFSET
public static org.joml.Vector3f DEFAULT_OFFSETThe default offset, which does nothing. -
CODEC
-
STREAM
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf,BasicOptions> STREAM
-
-
Constructor Details
-
BasicOptions
public BasicOptions(org.joml.Vector3f scale, org.joml.Vector3f offset, List<AxisAlignedRotation> rotations, boolean renderFluid, Optional<TintColor> tintColor, Set<net.minecraft.core.Direction> faces)
-
-
Method Details
-
getScale
public org.joml.Vector3f getScale()Description copied from interface:RenderOptionsGets the scale of the render. Each component of the vector represents a percentage based scale for that axis.- Specified by:
getScalein interfaceRenderOptions- Returns:
- The amount to scale the render.
-
getOffset
public org.joml.Vector3f getOffset()Description copied from interface:RenderOptionsGets the offset of the render. Each component of the vector represents an offset for that axis.- Specified by:
getOffsetin interfaceRenderOptions- Returns:
- The amount to offset the render.
-
getRotations
Description copied from interface:RenderOptionsGets a list of rotations to apply to the render.- Specified by:
getRotationsin interfaceRenderOptions- Returns:
- The rotations to apply to the render.
-
shouldRenderFluid
public boolean shouldRenderFluid()Description copied from interface:RenderOptionsCheck if fluid layers should be included in the rendered display.- Specified by:
shouldRenderFluidin interfaceRenderOptions- Returns:
- If fluid layers should be rendered.
-
getColor
Description copied from interface:RenderOptionsGets an optional tint color to apply to any table elements of the display.- Specified by:
getColorin interfaceRenderOptions- Returns:
- An optional tint to apply during rendering.
-
getFaces
Description copied from interface:RenderOptionsA set of faces that should not be culled when rendering.- Specified by:
getFacesin interfaceRenderOptions- Returns:
- The faces that should not be culled.
-
ofDefault
-
ofDefault
-