Package dev.boze.api.render
Record Class PlaceRenderer.PlacementRecord
java.lang.Object
java.lang.Record
dev.boze.api.render.PlaceRenderer.PlacementRecord
- Enclosing class:
PlaceRenderer
public static record PlaceRenderer.PlacementRecord(net.minecraft.util.math.BlockPos pos, long placeTime, long duration, ClientColor color, float fillOpacity, float outlineOpacity, float animOpacity, float animGrow, float animShrink, boolean useShader)
extends Record
Record containing placement visualization data
-
Constructor Summary
ConstructorsConstructorDescriptionPlacementRecord(net.minecraft.util.math.BlockPos pos, long placeTime, long duration, ClientColor color, float fillOpacity, float outlineOpacity) Creates a placement record without animation or shader settings.PlacementRecord(net.minecraft.util.math.BlockPos pos, long placeTime, long duration, ClientColor color, float fillOpacity, float outlineOpacity, boolean useShader) Creates a placement record without animation settings but with shader setting.PlacementRecord(net.minecraft.util.math.BlockPos pos, long placeTime, long duration, ClientColor color, float fillOpacity, float outlineOpacity, float animOpacity, float animGrow, float animShrink) Creates a placement record with animation settings but without shader setting.PlacementRecord(net.minecraft.util.math.BlockPos pos, long placeTime, long duration, ClientColor color, float fillOpacity, float outlineOpacity, float animOpacity, float animGrow, float animShrink, boolean useShader) Creates a placement record with full animation and shader settings. -
Method Summary
Modifier and TypeMethodDescriptionfloatanimGrow()Returns the value of theanimGrowrecord component.floatReturns the value of theanimOpacityrecord component.floatReturns the value of theanimShrinkrecord component.color()Returns the value of thecolorrecord component.longduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.floatReturns the value of thefillOpacityrecord component.final inthashCode()Returns a hash code value for this object.floatReturns the value of theoutlineOpacityrecord component.longReturns the value of theplaceTimerecord component.net.minecraft.util.math.BlockPospos()Returns the value of theposrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theuseShaderrecord component.
-
Constructor Details
-
PlacementRecord
public PlacementRecord(net.minecraft.util.math.BlockPos pos, long placeTime, long duration, ClientColor color, float fillOpacity, float outlineOpacity, float animOpacity, float animGrow, float animShrink, boolean useShader) Creates a placement record with full animation and shader settings.- Parameters:
pos- The block position to renderplaceTime- The timestamp when placement occurred (System.currentTimeMillis())duration- How long to render the placement in millisecondscolor- The color to use for renderingfillOpacity- Opacity for filled box faces (0.0 to 1.0)outlineOpacity- Opacity for box outline edges (0.0 to 1.0)animOpacity- Opacity animation duration (0 = no fade, 1 = fade over entire time)animGrow- Grow animation duration (starts at beginning)animShrink- Shrink animation duration (starts near end)useShader- Whether to use shader rendering instead of regular rendering
-
PlacementRecord
public PlacementRecord(net.minecraft.util.math.BlockPos pos, long placeTime, long duration, ClientColor color, float fillOpacity, float outlineOpacity) Creates a placement record without animation or shader settings. Animation parameters default to 0 (no animation), useShader defaults to false.- Parameters:
pos- The block position to renderplaceTime- The timestamp when placement occurred (System.currentTimeMillis())duration- How long to render the placement in millisecondscolor- The color to use for renderingfillOpacity- Opacity for filled box faces (0.0 to 1.0)outlineOpacity- Opacity for box outline edges (0.0 to 1.0)
-
PlacementRecord
public PlacementRecord(net.minecraft.util.math.BlockPos pos, long placeTime, long duration, ClientColor color, float fillOpacity, float outlineOpacity, boolean useShader) Creates a placement record without animation settings but with shader setting. Animation parameters default to 0 (no animation).- Parameters:
pos- The block position to renderplaceTime- The timestamp when placement occurred (System.currentTimeMillis())duration- How long to render the placement in millisecondscolor- The color to use for renderingfillOpacity- Opacity for filled box faces (0.0 to 1.0)outlineOpacity- Opacity for box outline edges (0.0 to 1.0)useShader- Whether to use shader rendering instead of regular rendering
-
PlacementRecord
public PlacementRecord(net.minecraft.util.math.BlockPos pos, long placeTime, long duration, ClientColor color, float fillOpacity, float outlineOpacity, float animOpacity, float animGrow, float animShrink) Creates a placement record with animation settings but without shader setting. useShader defaults to false.- Parameters:
pos- The block position to renderplaceTime- The timestamp when placement occurred (System.currentTimeMillis())duration- How long to render the placement in millisecondscolor- The color to use for renderingfillOpacity- Opacity for filled box faces (0.0 to 1.0)outlineOpacity- Opacity for box outline edges (0.0 to 1.0)animOpacity- Opacity animation duration (0 = no fade, 1 = fade over entire time)animGrow- Grow animation duration (starts at beginning)animShrink- Shrink animation duration (starts near end)
-
-
Method Details
-
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 '=='. -
pos
public net.minecraft.util.math.BlockPos pos()Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
placeTime
public long placeTime()Returns the value of theplaceTimerecord component.- Returns:
- the value of the
placeTimerecord component
-
duration
public long duration()Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-
color
Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
fillOpacity
public float fillOpacity()Returns the value of thefillOpacityrecord component.- Returns:
- the value of the
fillOpacityrecord component
-
outlineOpacity
public float outlineOpacity()Returns the value of theoutlineOpacityrecord component.- Returns:
- the value of the
outlineOpacityrecord component
-
animOpacity
public float animOpacity()Returns the value of theanimOpacityrecord component.- Returns:
- the value of the
animOpacityrecord component
-
animGrow
public float animGrow()Returns the value of theanimGrowrecord component.- Returns:
- the value of the
animGrowrecord component
-
animShrink
public float animShrink()Returns the value of theanimShrinkrecord component.- Returns:
- the value of the
animShrinkrecord component
-
useShader
public boolean useShader()Returns the value of theuseShaderrecord component.- Returns:
- the value of the
useShaderrecord component
-