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 theerrorMessage
record component.private final boolean
The field for theignoreEntities
record component.private final Rotation
The field for therotation
record component.private final Vec3i
The field for thesize
record component.private final TestInstanceBlockEntity.Status
The field for thestatus
record component.static final StreamCodec
<RegistryFriendlyByteBuf, TestInstanceBlockEntity.Data> private final Optional
<ResourceKey<GameTestInstance>> The field for thetest
record component. -
Constructor Summary
ConstructorsConstructorDescriptionData
(Optional<ResourceKey<GameTestInstance>> test, Vec3i size, Rotation rotation, boolean ignoreEntities, TestInstanceBlockEntity.Status status, Optional<Component> errorMessage) Creates an instance of aData
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of theerrorMessage
record component.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of theignoreEntities
record component.rotation()
Returns the value of therotation
record component.size()
Returns the value of thesize
record component.status()
Returns the value of thestatus
record component.test()
Returns the value of thetest
record component.final String
toString()
Returns a string representation of this record class.withStatus
(TestInstanceBlockEntity.Status p_398013_)
-
Field Details
-
test
The field for thetest
record component. -
size
The field for thesize
record component. -
rotation
The field for therotation
record component. -
ignoreEntities
private final boolean ignoreEntitiesThe field for theignoreEntities
record component. -
status
The field for thestatus
record component. -
errorMessage
The field for theerrorMessage
record component. -
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 aData
record class.- Parameters:
test
- the value for thetest
record componentsize
- the value for thesize
record componentrotation
- the value for therotation
record componentignoreEntities
- the value for theignoreEntities
record componentstatus
- the value for thestatus
record componenterrorMessage
- the value for theerrorMessage
record component
-
-
Method Details
-
withSize
-
withStatus
-
withError
-
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 '=='. -
test
Returns the value of thetest
record component.- Returns:
- the value of the
test
record component
-
size
Returns the value of thesize
record component.- Returns:
- the value of the
size
record component
-
rotation
Returns the value of therotation
record component.- Returns:
- the value of the
rotation
record component
-
ignoreEntities
public boolean ignoreEntities()Returns the value of theignoreEntities
record component.- Returns:
- the value of the
ignoreEntities
record component
-
status
Returns the value of thestatus
record component.- Returns:
- the value of the
status
record component
-
errorMessage
Returns the value of theerrorMessage
record component.- Returns:
- the value of the
errorMessage
record component
-