Package net.minecraft.world.event
Record Class BlockPositionSource
java.lang.Object
java.lang.Record
net.minecraft.world.event.BlockPositionSource
- Record Components:
pos-
- All Implemented Interfaces:
PositionSource
- Mappings:
Namespace Name named net/minecraft/world/event/BlockPositionSourceintermediary net/minecraft/class_5707official eomnamed posintermediary comp_4878official e
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<BlockPositionSource> static final PacketCodec<ByteBuf, BlockPositionSource> private final BlockPosThe field for theposrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aBlockPositionSourcerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.getType()Returns the type of this position source.final inthashCode()Returns a hash code value for this object.pos()Returns the value of theposrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
pos
The field for theposrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/world/event/BlockPositionSource;CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_28137Lnet/minecraft/class_5707;field_28137:Lcom/mojang/serialization/MapCodec;official aLeom;a:Lcom/mojang/serialization/MapCodec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/world/event/BlockPositionSource;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_48377Lnet/minecraft/class_5707;field_48377:Lnet/minecraft/class_9139;official bLeom;b:Laae;
-
-
Constructor Details
-
BlockPositionSource
Creates an instance of aBlockPositionSourcerecord class.- Parameters:
pos- the value for theposrecord component
-
-
Method Details
-
getPos
- Specified by:
getPosin interfacePositionSource- Mappings:
Namespace Name Mixin selector named getPosLnet/minecraft/world/event/PositionSource;getPos(Lnet/minecraft/world/World;)Ljava/util/Optional;intermediary method_32956Lnet/minecraft/class_5716;method_32956(Lnet/minecraft/class_1937;)Ljava/util/Optional;official aLeou;a(Ldrq;)Ljava/util/Optional;
-
getType
Returns the type of this position source.- Specified by:
getTypein interfacePositionSource- Mappings:
Namespace Name Mixin selector named getTypeLnet/minecraft/world/event/PositionSource;getType()Lnet/minecraft/world/event/PositionSourceType;intermediary method_32955Lnet/minecraft/class_5716;method_32955()Lnet/minecraft/class_5717;official aLeou;a()Leov;
-
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). -
pos
Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-