Record Class GeneratorImpl.AreaModifierImpl
java.lang.Object
java.lang.Record
net.minestom.server.instance.generator.GeneratorImpl.AreaModifierImpl
- All Implemented Interfaces:
Block.Setter, UnitModifier, Biome.Setter
- Enclosing class:
GeneratorImpl
-
Nested Class Summary
Nested classes/interfaces inherited from interface UnitModifier
UnitModifier.Supplier -
Constructor Summary
ConstructorsConstructorDescriptionAreaModifierImpl(Vec size, Vec start, Vec end, int width, int height, int depth, List<GenerationUnit> sections) Creates an instance of aAreaModifierImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintdepth()Returns the value of thedepthrecord 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.voidfillHeight(int minHeight, int maxHeight, Block block) Fills the 3d rectangular area with the given block.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.sections()Returns the value of thesectionsrecord component.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()Returns the value of thesizerecord component.start()Returns the value of thestartrecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.Methods inherited from interface Biome.Setter
setBiomeMethods inherited from interface Block.Setter
setBlock, setBlockArea
-
Constructor Details
-
AreaModifierImpl
public AreaModifierImpl(Vec size, Vec start, Vec end, int width, int height, int depth, List<GenerationUnit> sections) Creates an instance of aAreaModifierImplrecord class.- Parameters:
size- the value for thesizerecord componentstart- the value for thestartrecord componentend- the value for theendrecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord componentdepth- the value for thedepthrecord componentsections- the value for thesectionsrecord component
-
-
Method Details
-
setBlock
- Specified by:
setBlockin interfaceBlock.Setter
-
setBiome
- Specified by:
setBiomein interfaceBiome.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
-
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
-
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
-
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
-
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. -
size
Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord 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
-
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
depth
public int depth()Returns the value of thedepthrecord component.- Returns:
- the value of the
depthrecord component
-
sections
Returns the value of thesectionsrecord component.- Returns:
- the value of the
sectionsrecord component
-
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
-