Record Class EntityPickupEvent
java.lang.Object
java.lang.Record
tschipp.carryon.events.EntityPickupEvent
- All Implemented Interfaces:
net.minecraftforge.eventbus.api.event.characteristic.Cancellable, net.minecraftforge.eventbus.api.event.RecordEvent, net.minecraftforge.eventbus.internal.Event, net.minecraftforge.eventbus.internal.EventCharacteristic
public record EntityPickupEvent(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.entity.Entity target)
extends Record
implements net.minecraftforge.eventbus.api.event.characteristic.Cancellable, net.minecraftforge.eventbus.api.event.RecordEvent
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraftforge.eventbus.api.bus.CancellableEventBus<EntityPickupEvent> -
Constructor Summary
ConstructorsConstructorDescriptionEntityPickupEvent(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.entity.Entity target) Creates an instance of aEntityPickupEventrecord 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.server.level.ServerPlayerplayer()Returns the value of theplayerrecord component.net.minecraft.world.entity.Entitytarget()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
BUS
-
-
Constructor Details
-
EntityPickupEvent
public EntityPickupEvent(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.entity.Entity target) Creates an instance of aEntityPickupEventrecord class.- Parameters:
player- the value for theplayerrecord componenttarget- the value for thetargetrecord component
-
-
Method Details
-
toString
-
hashCode
-
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
-
target
public net.minecraft.world.entity.Entity target()Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-