Package net.minecraft.world.level
Record Class BlockEventData
java.lang.Object
java.lang.Record
net.minecraft.world.level.BlockEventData
-
Field Summary
-
Constructor Summary
ConstructorDescriptionBlockEventData
(BlockPos pos, Block block, int paramA, int paramB) Creates an instance of aBlockEventData
record class. -
Method Summary
Modifier and TypeMethodDescriptionblock()
Returns the value of theblock
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
paramA()
Returns the value of theparamA
record component.int
paramB()
Returns the value of theparamB
record component.pos()
Returns the value of thepos
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
pos
The field for thepos
record component. -
block
The field for theblock
record component. -
paramA
private final int paramAThe field for theparamA
record component. -
paramB
private final int paramBThe field for theparamB
record component.
-
-
Constructor Details
-
BlockEventData
Creates an instance of aBlockEventData
record class.- Parameters:
pos
- the value for thepos
record componentblock
- the value for theblock
record componentparamA
- the value for theparamA
record componentparamB
- the value for theparamB
record 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 thepos
record component.- Returns:
- the value of the
pos
record component
-
block
Returns the value of theblock
record component.- Returns:
- the value of the
block
record component
-
paramA
public int paramA()Returns the value of theparamA
record component.- Returns:
- the value of the
paramA
record component
-
paramB
public int paramB()Returns the value of theparamB
record component.- Returns:
- the value of the
paramB
record component
-