Record Class GeneratorImpl.SectionModifierImpl
java.lang.Object
java.lang.Record
net.minestom.server.instance.generator.GeneratorImpl.SectionModifierImpl
- All Implemented Interfaces:
Block.Setter, UnitModifier, Biome.Setter
- Enclosing class:
GeneratorImpl
public static record GeneratorImpl.SectionModifierImpl(DynamicRegistry<Biome> biomeRegistry, Vec start, Vec end, GeneratorImpl.GenSection genSection, boolean fork)
extends Record
-
Nested Class Summary
Nested classes/interfaces inherited from interface UnitModifier
UnitModifier.Supplier -
Constructor Summary
ConstructorsConstructorDescriptionSectionModifierImpl(DynamicRegistry<Biome> biomeRegistry, Vec start, Vec end, GeneratorImpl.GenSection genSection, boolean fork) Creates an instance of aSectionModifierImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebiomeRegistryrecord component.end()Returns the value of theendrecord component.final booleanIndicates whether some other object is "equal to" this one.default voidFills the 3d rectangular area with the given block.voidFills the unit with the given block.voidfillBiome(RegistryKey<Biome> biome) Fills the 3d rectangular area with the given biome.default voidfillHeight(int minHeight, int maxHeight, Block block) Fills the 3d rectangular area with the given block.booleanfork()Returns the value of theforkrecord component.Returns the value of thegenSectionrecord component.final inthashCode()Returns a hash code value for this object.default voidsetAll(UnitModifier.Supplier supplier) Sets all blocks within the unit to the block given by the supplier.voidsetAllRelative(UnitModifier.Supplier supplier) Sets all blocks within the unit to the block given by the supplier, relative to the absolute position of the unit.voidsetBiome(int x, int y, int z, RegistryKey<Biome> biome) voidvoidsetRelative(int x, int y, int z, Block block) Sets the block relative to the absolute position of the unit.size()start()Returns the value of thestartrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface Biome.Setter
setBiomeMethods inherited from interface Block.Setter
setBlock, setBlockArea
-
Constructor Details
-
SectionModifierImpl
public SectionModifierImpl(DynamicRegistry<Biome> biomeRegistry, Vec start, Vec end, GeneratorImpl.GenSection genSection, boolean fork) Creates an instance of aSectionModifierImplrecord class.- Parameters:
biomeRegistry- the value for thebiomeRegistryrecord componentstart- the value for thestartrecord componentend- the value for theendrecord componentgenSection- the value for thegenSectionrecord componentfork- the value for theforkrecord component
-
-
Method Details
-
setBiome
- Specified by:
setBiomein interfaceBiome.Setter
-
setBlock
- Specified by:
setBlockin interfaceBlock.Setter
-
setRelative
Description copied from interface:UnitModifierSets the block relative to the absolute position of the unit.- Specified by:
setRelativein interfaceUnitModifier- Parameters:
x- the x coordinatey- the y coordinatez- the z coordinateblock- the block to set
-
setAllRelative
Description copied from interface:UnitModifierSets all blocks within the unit to the block given by the supplier, relative to the absolute position of the unit.- Specified by:
setAllRelativein interfaceUnitModifier- Parameters:
supplier- the supplier of the block to set
-
fill
Description copied from interface:UnitModifierFills the unit with the given block.- Specified by:
fillin interfaceUnitModifier- Parameters:
block- the block to fill
-
fillBiome
Description copied from interface:UnitModifierFills the 3d rectangular area with the given biome.- Specified by:
fillBiomein interfaceUnitModifier- Parameters:
biome- the biome to fill
-
size
-
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. -
biomeRegistry
Returns the value of thebiomeRegistryrecord component.- Returns:
- the value of the
biomeRegistryrecord component
-
start
Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
end
Returns the value of theendrecord component.- Returns:
- the value of the
endrecord component
-
genSection
Returns the value of thegenSectionrecord component.- Returns:
- the value of the
genSectionrecord component
-
fork
public boolean fork()Returns the value of theforkrecord component.- Returns:
- the value of the
forkrecord component
-
setAll
Description copied from interface:UnitModifierSets all blocks within the unit to the block given by the supplier.- Specified by:
setAllin interfaceUnitModifier- Parameters:
supplier- the supplier of the block to set
-
fill
Description copied from interface:UnitModifierFills the 3d rectangular area with the given block.- Specified by:
fillin interfaceUnitModifier- Parameters:
start- the start (min) point of the areaend- the end (max) point of the areablock- the block to fill
-
fillHeight
Description copied from interface:UnitModifierFills the 3d rectangular area with the given block.- Specified by:
fillHeightin interfaceUnitModifier- Parameters:
minHeight- the minimum height of the areamaxHeight- the maximum height of the areablock- the block to fill
-