Record Class GeneratorImpl.UnitImpl
java.lang.Object
java.lang.Record
net.minestom.server.instance.generator.GeneratorImpl.UnitImpl
- All Implemented Interfaces:
GenerationUnit
- Enclosing class:
GeneratorImpl
public static record GeneratorImpl.UnitImpl(DynamicRegistry<Biome> biomeRegistry, UnitModifier modifier, Vec size, Vec absoluteStart, Vec absoluteEnd, List<GenerationUnit> divided, List<GeneratorImpl.UnitImpl> forks)
extends Record
implements GenerationUnit
-
Constructor Summary
ConstructorsConstructorDescriptionUnitImpl(DynamicRegistry<Biome> biomeRegistry, UnitModifier modifier, Vec size, Vec absoluteStart, Vec absoluteEnd, List<GenerationUnit> divided, List<GeneratorImpl.UnitImpl> forks) Creates an instance of aUnitImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theabsoluteEndrecord component.Returns the value of theabsoluteStartrecord component.Returns the value of thebiomeRegistryrecord component.divided()Returns the value of thedividedrecord component.final booleanIndicates whether some other object is "equal to" this one.voidfork(Consumer<Block.Setter> consumer) Creates a fork of this unit depending on the blocks placed within the consumer.Creates a fork of this unit, which will be applied to the instance whenever possible.forks()Returns the value of theforksrecord component.final inthashCode()Returns a hash code value for this object.modifier()Returns the value of themodifierrecord component.size()Returns the value of thesizerecord component.Divides this unit into the smallest independent units.final StringtoString()Returns a string representation of this record class.Methods inherited from interface GenerationUnit
sections
-
Constructor Details
-
UnitImpl
public UnitImpl(DynamicRegistry<Biome> biomeRegistry, UnitModifier modifier, Vec size, Vec absoluteStart, Vec absoluteEnd, List<GenerationUnit> divided, List<GeneratorImpl.UnitImpl> forks) Creates an instance of aUnitImplrecord class.- Parameters:
biomeRegistry- the value for thebiomeRegistryrecord componentmodifier- the value for themodifierrecord componentsize- the value for thesizerecord componentabsoluteStart- the value for theabsoluteStartrecord componentabsoluteEnd- the value for theabsoluteEndrecord componentdivided- the value for thedividedrecord componentforks- the value for theforksrecord component
-
-
Method Details
-
fork
Description copied from interface:GenerationUnitCreates a fork of this unit, which will be applied to the instance whenever possible.- Specified by:
forkin interfaceGenerationUnit- Parameters:
start- the start of the forkend- the end of the fork- Returns:
- the fork
-
fork
Description copied from interface:GenerationUnitCreates a fork of this unit depending on the blocks placed within the consumer.- Specified by:
forkin interfaceGenerationUnit- Parameters:
consumer- the consumer
-
subdivide
Description copied from interface:GenerationUnitDivides this unit into the smallest independent units.- Specified by:
subdividein interfaceGenerationUnit- Returns:
- an immutable list of independent units
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
biomeRegistry
Returns the value of thebiomeRegistryrecord component.- Returns:
- the value of the
biomeRegistryrecord component
-
modifier
Returns the value of themodifierrecord component.- Specified by:
modifierin interfaceGenerationUnit- Returns:
- the value of the
modifierrecord component
-
size
Returns the value of thesizerecord component.- Specified by:
sizein interfaceGenerationUnit- Returns:
- the value of the
sizerecord component
-
absoluteStart
Returns the value of theabsoluteStartrecord component.- Specified by:
absoluteStartin interfaceGenerationUnit- Returns:
- the value of the
absoluteStartrecord component
-
absoluteEnd
Returns the value of theabsoluteEndrecord component.- Specified by:
absoluteEndin interfaceGenerationUnit- Returns:
- the value of the
absoluteEndrecord component
-
divided
Returns the value of thedividedrecord component.- Returns:
- the value of the
dividedrecord component
-
forks
Returns the value of theforksrecord component.- Returns:
- the value of the
forksrecord component
-