Record Class CarryOnModHooks.CanPickupEntityHook
java.lang.Object
java.lang.Record
tschipp.carryon.common.carry.compat.CarryOnModHooks.CanPickupEntityHook
- Enclosing class:
CarryOnModHooks
public static record CarryOnModHooks.CanPickupEntityHook(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.entity.Entity entity)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionCanPickupEntityHook(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.entity.Entity entity) Creates an instance of aCanPickupEntityHookrecord 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.server.level.ServerPlayerplayer()Returns the value of theplayerrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CanPickupEntityHook
public CanPickupEntityHook(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.entity.Entity entity) Creates an instance of aCanPickupEntityHookrecord class.- Parameters:
player- the value for theplayerrecord componententity- the value for theentityrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
player
public net.minecraft.server.level.ServerPlayer player()Returns the value of theplayerrecord component.- Returns:
- the value of the
playerrecord component
-
entity
public net.minecraft.world.entity.Entity entity()Returns the value of theentityrecord component.- Returns:
- the value of the
entityrecord component
-