Record Class SceneViewport.PlacedItem
java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcanvas.api.client.viewport.SceneViewport.PlacedItem
- Enclosing class:
- SceneViewport
public static record SceneViewport.PlacedItem(net.minecraft.world.item.ItemStack stack, net.minecraft.world.phys.Vec3 pos, float size)
extends Record
An item of the scene, drawn as its icon is in an inventory:
size across, its middle at a place, flat to
the camera when the camera looks straight on (camera(0, 0)).-
Constructor Summary
ConstructorsConstructorDescriptionPlacedItem(net.minecraft.world.item.ItemStack stack, net.minecraft.world.phys.Vec3 pos, float size) Creates an instance of aPlacedItemrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.world.phys.Vec3pos()Returns the value of theposrecord component.floatsize()Returns the value of thesizerecord component.net.minecraft.world.item.ItemStackstack()Returns the value of thestackrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PlacedItem
public PlacedItem(net.minecraft.world.item.ItemStack stack, net.minecraft.world.phys.Vec3 pos, float size) Creates an instance of aPlacedItemrecord class.- Parameters:
stack- the value for thestackrecord componentpos- the value for theposrecord componentsize- the value for thesizerecord component
-
-
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 '=='. -
stack
public net.minecraft.world.item.ItemStack stack()Returns the value of thestackrecord component.- Returns:
- the value of the
stackrecord component
-
pos
public net.minecraft.world.phys.Vec3 pos()Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
size
public float size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-