java.lang.Object
net.darkhax.botanypots.common.impl.data.display.types.BasicOptions
All Implemented Interfaces:
RenderOptions

public class BasicOptions extends Object implements RenderOptions
A basic implementation of the render options.
  • Field Details

    • DEFAULT_FACES

      public static Set<net.minecraft.core.Direction> 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_SCALE
      The 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_OFFSET
      The default offset, which does nothing.
    • CODEC

      public static final com.mojang.serialization.Codec<BasicOptions> 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: RenderOptions
      Gets the scale of the render. Each component of the vector represents a percentage based scale for that axis.
      Specified by:
      getScale in interface RenderOptions
      Returns:
      The amount to scale the render.
    • getOffset

      public org.joml.Vector3f getOffset()
      Description copied from interface: RenderOptions
      Gets the offset of the render. Each component of the vector represents an offset for that axis.
      Specified by:
      getOffset in interface RenderOptions
      Returns:
      The amount to offset the render.
    • getRotations

      public List<AxisAlignedRotation> getRotations()
      Description copied from interface: RenderOptions
      Gets a list of rotations to apply to the render.
      Specified by:
      getRotations in interface RenderOptions
      Returns:
      The rotations to apply to the render.
    • shouldRenderFluid

      public boolean shouldRenderFluid()
      Description copied from interface: RenderOptions
      Check if fluid layers should be included in the rendered display.
      Specified by:
      shouldRenderFluid in interface RenderOptions
      Returns:
      If fluid layers should be rendered.
    • getColor

      public Optional<TintColor> getColor()
      Description copied from interface: RenderOptions
      Gets an optional tint color to apply to any table elements of the display.
      Specified by:
      getColor in interface RenderOptions
      Returns:
      An optional tint to apply during rendering.
    • getFaces

      public Set<net.minecraft.core.Direction> getFaces()
      Description copied from interface: RenderOptions
      A set of faces that should not be culled when rendering.
      Specified by:
      getFaces in interface RenderOptions
      Returns:
      The faces that should not be culled.
    • ofDefault

      public static BasicOptions ofDefault()
    • ofDefault

      public static BasicOptions ofDefault(Set<net.minecraft.core.Direction> faces)