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 net.minestom.server.instance.generator.UnitModifier
UnitModifier.Supplier
-
Constructor Summary
ConstructorDescriptionAreaModifierImpl
(Point size, Point start, Point end, int width, int height, int depth, List<GenerationUnit> sections) Creates an instance of aAreaModifierImpl
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
depth()
Returns the value of thedepth
record component.end()
Returns the value of theend
record component.final boolean
Indicates whether some other object is "equal to" this one.default void
Fills the 3d rectangular area with the given block.void
Fills the unit with the given block.void
fillBiome
(DynamicRegistry.Key<Biome> biome) Fills the 3d rectangular area with the given biome.void
fillHeight
(int minHeight, int maxHeight, @NotNull Block block) Fills the 3d rectangular area with the given biome.final int
hashCode()
Returns a hash code value for this object.int
height()
Returns the value of theheight
record component.sections()
Returns the value of thesections
record component.void
setAll
(@NotNull UnitModifier.Supplier supplier) Sets all blocks within the unit to the block given by the supplier.void
setAllRelative
(@NotNull UnitModifier.Supplier supplier) Sets all blocks within the unit to the block given by the supplier, relative to the absolute position of the unit.void
setBiome
(int x, int y, int z, DynamicRegistry.Key<Biome> biome) void
void
setRelative
(int x, int y, int z, @NotNull Block block) Sets the block relative to the absolute position of the unit.size()
Returns the value of thesize
record component.start()
Returns the value of thestart
record component.final String
toString()
Returns a string representation of this record class.int
width()
Returns the value of thewidth
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minestom.server.world.biome.Biome.Setter
setBiome
Methods inherited from interface net.minestom.server.instance.block.Block.Setter
setBlock
-
Constructor Details
-
AreaModifierImpl
public AreaModifierImpl(Point size, Point start, Point end, int width, int height, int depth, List<GenerationUnit> sections) Creates an instance of aAreaModifierImpl
record class.- Parameters:
size
- the value for thesize
record componentstart
- the value for thestart
record componentend
- the value for theend
record componentwidth
- the value for thewidth
record componentheight
- the value for theheight
record componentdepth
- the value for thedepth
record componentsections
- the value for thesections
record component
-
-
Method Details
-
setBlock
- Specified by:
setBlock
in interfaceBlock.Setter
-
setBiome
- Specified by:
setBiome
in interfaceBiome.Setter
-
setRelative
Description copied from interface:UnitModifier
Sets the block relative to the absolute position of the unit.- Specified by:
setRelative
in interfaceUnitModifier
- Parameters:
x
- the x coordinatey
- the y coordinatez
- the z coordinateblock
- the block to set
-
setAll
Description copied from interface:UnitModifier
Sets all blocks within the unit to the block given by the supplier.- Specified by:
setAll
in interfaceUnitModifier
- Parameters:
supplier
- the supplier of the block to set
-
setAllRelative
Description copied from interface:UnitModifier
Sets all blocks within the unit to the block given by the supplier, relative to the absolute position of the unit.- Specified by:
setAllRelative
in interfaceUnitModifier
- Parameters:
supplier
- the supplier of the block to set
-
fill
Description copied from interface:UnitModifier
Fills the unit with the given block.- Specified by:
fill
in interfaceUnitModifier
- Parameters:
block
- the block to fill
-
fillBiome
Description copied from interface:UnitModifier
Fills the 3d rectangular area with the given biome.- Specified by:
fillBiome
in interfaceUnitModifier
- Parameters:
biome
- the biome to fill
-
fillHeight
Description copied from interface:UnitModifier
Fills the 3d rectangular area with the given biome.- Specified by:
fillHeight
in interfaceUnitModifier
- Parameters:
minHeight
- the minimum height of the areamaxHeight
- the maximum height of the areablock
- the block to fill
-
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 '=='. -
size
Returns the value of thesize
record component.- Returns:
- the value of the
size
record component
-
start
Returns the value of thestart
record component.- Returns:
- the value of the
start
record component
-
end
Returns the value of theend
record component.- Returns:
- the value of the
end
record component
-
width
public int width()Returns the value of thewidth
record component.- Returns:
- the value of the
width
record component
-
height
public int height()Returns the value of theheight
record component.- Returns:
- the value of the
height
record component
-
depth
public int depth()Returns the value of thedepth
record component.- Returns:
- the value of the
depth
record component
-
sections
Returns the value of thesections
record component.- Returns:
- the value of the
sections
record component
-
fill
default void fill(@NotNull @NotNull Point start, @NotNull @NotNull Point end, @NotNull @NotNull Block block) Description copied from interface:UnitModifier
Fills the 3d rectangular area with the given block.- Specified by:
fill
in interfaceUnitModifier
- Parameters:
start
- the start (min) point of the areaend
- the end (max) point of the areablock
- the block to fill
-