Package net.minecraft.world.level
Record Class BlockEventData
java.lang.Object
java.lang.Record
net.minecraft.world.level.BlockEventData
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBlockEventData(BlockPos pos, Block block, int paramA, int paramB) Creates an instance of aBlockEventDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionblock()Returns the value of theblockrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intparamA()Returns the value of theparamArecord component.intparamB()Returns the value of theparamBrecord component.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. -
block
The field for theblockrecord component. -
paramA
private final int paramAThe field for theparamArecord component. -
paramB
private final int paramBThe field for theparamBrecord component.
-
-
Constructor Details
-
BlockEventData
Creates an instance of aBlockEventDatarecord class.- Parameters:
pos- the value for theposrecord componentblock- the value for theblockrecord componentparamA- the value for theparamArecord componentparamB- the value for theparamBrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
pos
Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
block
Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-
paramA
public int paramA()Returns the value of theparamArecord component.- Returns:
- the value of the
paramArecord component
-
paramB
public int paramB()Returns the value of theparamBrecord component.- Returns:
- the value of the
paramBrecord component
-