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, Point size, Point start, Point end, GeneratorImpl.GenSection genSection, boolean fork)
extends Record
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minestom.server.instance.generator.UnitModifier
UnitModifier.Supplier
-
Constructor Summary
ConstructorDescriptionSectionModifierImpl
(DynamicRegistry<Biome> biomeRegistry, Point size, Point start, Point end, GeneratorImpl.GenSection genSection, boolean fork) Creates an instance of aSectionModifierImpl
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebiomeRegistry
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.default void
fillHeight
(int minHeight, int maxHeight, @NotNull Block block) Fills the 3d rectangular area with the given biome.boolean
fork()
Returns the value of thefork
record component.Returns the value of thegenSection
record component.final int
hashCode()
Returns a hash code value for this object.default 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.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
-
SectionModifierImpl
public SectionModifierImpl(DynamicRegistry<Biome> biomeRegistry, Point size, Point start, Point end, GeneratorImpl.GenSection genSection, boolean fork) Creates an instance of aSectionModifierImpl
record class.- Parameters:
biomeRegistry
- the value for thebiomeRegistry
record componentsize
- the value for thesize
record componentstart
- the value for thestart
record componentend
- the value for theend
record componentgenSection
- the value for thegenSection
record componentfork
- the value for thefork
record component
-
-
Method Details
-
setBiome
- Specified by:
setBiome
in interfaceBiome.Setter
-
setBlock
- Specified by:
setBlock
in interfaceBlock.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
-
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
-
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 '=='. -
biomeRegistry
Returns the value of thebiomeRegistry
record component.- Returns:
- the value of the
biomeRegistry
record component
-
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
-
genSection
Returns the value of thegenSection
record component.- Returns:
- the value of the
genSection
record component
-
fork
public boolean fork()Returns the value of thefork
record component.- Returns:
- the value of the
fork
record component
-
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
-
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
-
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
-