Package net.minecraft.world.level.chunk
Record Class Configuration.Simple
java.lang.Object
java.lang.Record
net.minecraft.world.level.chunk.Configuration.Simple
- All Implemented Interfaces:
Configuration
- Enclosing interface:
Configuration
public static record Configuration.Simple(Palette.Factory factory, int bits)
extends Record
implements Configuration
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.world.level.chunk.Configuration
Configuration.Global, Configuration.Simple -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thebitsrecord component.private final Palette.FactoryThe field for thefactoryrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSimple(Palette.Factory factory, int bits) Creates an instance of aSimplerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanintbits()Returns the value of thebitsrecord component.intint<T> Palette<T> createPalette(Strategy<T> p_446781_, List<T> p_445514_) final booleanIndicates whether some other object is "equal to" this one.factory()Returns the value of thefactoryrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
factory
The field for thefactoryrecord component. -
bits
private final int bitsThe field for thebitsrecord component.
-
-
Constructor Details
-
Simple
Creates an instance of aSimplerecord class.- Parameters:
factory- the value for thefactoryrecord componentbits- the value for thebitsrecord component
-
-
Method Details
-
alwaysRepack
public boolean alwaysRepack()- Specified by:
alwaysRepackin interfaceConfiguration
-
createPalette
- Specified by:
createPalettein interfaceConfiguration
-
bitsInMemory
public int bitsInMemory()- Specified by:
bitsInMemoryin interfaceConfiguration
-
bitsInStorage
public int bitsInStorage()- Specified by:
bitsInStoragein interfaceConfiguration
-
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 '=='. -
factory
Returns the value of thefactoryrecord component.- Returns:
- the value of the
factoryrecord component
-
bits
public int bits()Returns the value of thebitsrecord component.- Returns:
- the value of the
bitsrecord component
-