Record Class SceneViewport.PlacedEntity
java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcanvas.api.client.viewport.SceneViewport.PlacedEntity
- Enclosing class:
- SceneViewport
public static record SceneViewport.PlacedEntity(net.minecraft.world.entity.Entity entity, net.minecraft.world.phys.Vec3 pos, float yaw)
extends Record
An entity of the scene: never in a world, only drawn.
yaw turns it about itself.-
Constructor Summary
ConstructorsConstructorDescriptionPlacedEntity(net.minecraft.world.entity.Entity entity, net.minecraft.world.phys.Vec3 pos, float yaw) Creates an instance of aPlacedEntityrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.entity.Entityentity()Returns the value of theentityrecord component.final 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.final StringtoString()Returns a string representation of this record class.floatyaw()Returns the value of theyawrecord component.
-
Constructor Details
-
PlacedEntity
public PlacedEntity(net.minecraft.world.entity.Entity entity, net.minecraft.world.phys.Vec3 pos, float yaw) Creates an instance of aPlacedEntityrecord class.- Parameters:
entity- the value for theentityrecord componentpos- the value for theposrecord componentyaw- the value for theyawrecord 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 '=='. -
entity
public net.minecraft.world.entity.Entity entity()Returns the value of theentityrecord component.- Returns:
- the value of the
entityrecord component
-
pos
public net.minecraft.world.phys.Vec3 pos()Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
yaw
public float yaw()Returns the value of theyawrecord component.- Returns:
- the value of the
yawrecord component
-