Record Class TransportItemsBetweenContainers.TransportItemTarget
java.lang.Object
java.lang.Record
net.minecraft.world.entity.ai.behavior.TransportItemsBetweenContainers.TransportItemTarget
- Enclosing class:
TransportItemsBetweenContainers
public static record TransportItemsBetweenContainers.TransportItemTarget(BlockPos pos, Container container, BlockEntity blockEntity, BlockState state)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BlockEntityThe field for theblockEntityrecord component.private final ContainerThe field for thecontainerrecord component.private final BlockPosThe field for theposrecord component.private final BlockStateThe field for thestaterecord component. -
Constructor Summary
ConstructorsConstructorDescriptionTransportItemTarget(BlockPos pos, Container container, BlockEntity blockEntity, BlockState state) Creates an instance of aTransportItemTargetrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theblockEntityrecord component.Returns the value of thecontainerrecord component.final booleanIndicates whether some other object is "equal to" this one.private static @Nullable ContainergetBlockEntityContainer(BlockEntity blockEntity, BlockState blockState, Level level, BlockPos blockPos) final inthashCode()Returns a hash code value for this object.pos()Returns the value of theposrecord component.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.static @Nullable TransportItemsBetweenContainers.TransportItemTargettryCreatePossibleTarget(BlockPos blockPos, Level level) static @Nullable TransportItemsBetweenContainers.TransportItemTargettryCreatePossibleTarget(BlockEntity blockEntity, Level level)
-
Field Details
-
pos
The field for theposrecord component. -
container
The field for thecontainerrecord component. -
blockEntity
The field for theblockEntityrecord component. -
state
The field for thestaterecord component.
-
-
Constructor Details
-
TransportItemTarget
public TransportItemTarget(BlockPos pos, Container container, BlockEntity blockEntity, BlockState state) Creates an instance of aTransportItemTargetrecord class.- Parameters:
pos- the value for theposrecord componentcontainer- the value for thecontainerrecord componentblockEntity- the value for theblockEntityrecord componentstate- the value for thestaterecord component
-
-
Method Details
-
tryCreatePossibleTarget
public static @Nullable TransportItemsBetweenContainers.TransportItemTarget tryCreatePossibleTarget(BlockEntity blockEntity, Level level) -
tryCreatePossibleTarget
public static @Nullable TransportItemsBetweenContainers.TransportItemTarget tryCreatePossibleTarget(BlockPos blockPos, Level level) -
getBlockEntityContainer
private static @Nullable Container getBlockEntityContainer(BlockEntity blockEntity, BlockState blockState, Level level, BlockPos blockPos) -
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). -
pos
Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
container
Returns the value of thecontainerrecord component.- Returns:
- the value of the
containerrecord component
-
blockEntity
Returns the value of theblockEntityrecord component.- Returns:
- the value of the
blockEntityrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-