Package net.minecraft.core.dispenser
Record Class BlockSource
java.lang.Object
java.lang.Record
net.minecraft.core.dispenser.BlockSource
public record BlockSource(ServerLevel level, BlockPos pos, BlockState state, DispenserBlockEntity blockEntity)
extends Record
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final DispenserBlockEntityThe field for theblockEntityrecord component.private final ServerLevelThe field for thelevelrecord component.private final BlockPosThe field for theposrecord component.private final BlockStateThe field for thestaterecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionBlockSource(ServerLevel level, BlockPos pos, BlockState state, DispenserBlockEntity blockEntity) Creates an instance of aBlockSourcerecord class.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the value of theblockEntityrecord component.center()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.level()Returns the value of thelevelrecord component.pos()Returns the value of theposrecord component.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
levelThe field for thelevelrecord component.
- 
posThe field for theposrecord component.
- 
stateThe field for thestaterecord component.
- 
blockEntityThe field for theblockEntityrecord component.
 
- 
- 
Constructor Details- 
BlockSourcepublic BlockSource(ServerLevel level, BlockPos pos, BlockState state, DispenserBlockEntity blockEntity) Creates an instance of aBlockSourcerecord class.- Parameters:
- level- the value for the- levelrecord component
- pos- the value for the- posrecord component
- state- the value for the- staterecord component
- blockEntity- the value for the- blockEntityrecord component
 
 
- 
- 
Method Details- 
center
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
levelReturns the value of thelevelrecord component.- Returns:
- the value of the levelrecord component
 
- 
posReturns the value of theposrecord component.- Returns:
- the value of the posrecord component
 
- 
stateReturns the value of thestaterecord component.- Returns:
- the value of the staterecord component
 
- 
blockEntityReturns the value of theblockEntityrecord component.- Returns:
- the value of the blockEntityrecord component
 
 
-