Record Class TestInstanceBlockEntity.Data
java.lang.Object
java.lang.Record
net.minecraft.world.level.block.entity.TestInstanceBlockEntity.Data
- Enclosing class:
TestInstanceBlockEntity
public static record TestInstanceBlockEntity.Data(Optional<ResourceKey<GameTestInstance>> test, Vec3i size, Rotation rotation, boolean ignoreEntities, TestInstanceBlockEntity.Status status, Optional<Component> errorMessage)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<TestInstanceBlockEntity.Data> The field for theerrorMessagerecord component.private final booleanThe field for theignoreEntitiesrecord component.private final RotationThe field for therotationrecord component.private final Vec3iThe field for thesizerecord component.private final TestInstanceBlockEntity.StatusThe field for thestatusrecord component.static final StreamCodec<RegistryFriendlyByteBuf, TestInstanceBlockEntity.Data> private final Optional<ResourceKey<GameTestInstance>> The field for thetestrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionData(Optional<ResourceKey<GameTestInstance>> test, Vec3i size, Rotation rotation, boolean ignoreEntities, TestInstanceBlockEntity.Status status, Optional<Component> errorMessage) Creates an instance of aDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theerrorMessagerecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theignoreEntitiesrecord component.rotation()Returns the value of therotationrecord component.size()Returns the value of thesizerecord component.status()Returns the value of thestatusrecord component.test()Returns the value of thetestrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
test
The field for thetestrecord component. -
size
The field for thesizerecord component. -
rotation
The field for therotationrecord component. -
ignoreEntities
private final boolean ignoreEntitiesThe field for theignoreEntitiesrecord component. -
status
The field for thestatusrecord component. -
errorMessage
-
CODEC
-
STREAM_CODEC
-
-
Constructor Details
-
Data
public Data(Optional<ResourceKey<GameTestInstance>> test, Vec3i size, Rotation rotation, boolean ignoreEntities, TestInstanceBlockEntity.Status status, Optional<Component> errorMessage) Creates an instance of aDatarecord class.- Parameters:
test- the value for thetestrecord componentsize- the value for thesizerecord componentrotation- the value for therotationrecord componentignoreEntities- the value for theignoreEntitiesrecord componentstatus- the value for thestatusrecord componenterrorMessage- the value for theerrorMessagerecord component
-
-
Method Details
-
withSize
-
withStatus
-
withError
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
test
Returns the value of thetestrecord component.- Returns:
- the value of the
testrecord component
-
size
Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
rotation
Returns the value of therotationrecord component.- Returns:
- the value of the
rotationrecord component
-
ignoreEntities
public boolean ignoreEntities()Returns the value of theignoreEntitiesrecord component.- Returns:
- the value of the
ignoreEntitiesrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
errorMessage
-