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
ConstructorsConstructorDescriptionSectionModifierImpl(DynamicRegistry<Biome> biomeRegistry, Point size, Point start, Point 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(DynamicRegistry.Key<Biome> biome) Fills the 3d rectangular area with the given biome.default voidfillHeight(int minHeight, int maxHeight, @NotNull Block block) Fills the 3d rectangular area with the given biome.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(@NotNull UnitModifier.Supplier supplier) Sets all blocks within the unit to the block given by the supplier.voidsetAllRelative(@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.voidsetBiome(int x, int y, int z, DynamicRegistry.Key<Biome> biome) voidvoidsetRelative(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 thesizerecord component.start()Returns the value of thestartrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minestom.server.world.biome.Biome.Setter
setBiomeMethods 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 aSectionModifierImplrecord class.- Parameters:
biomeRegistry- the value for thebiomeRegistryrecord componentsize- the value for thesizerecord 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
-
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 thebiomeRegistryrecord component.- Returns:
- the value of the
biomeRegistryrecord component
-
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
-
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
default void fill(@NotNull @NotNull Point start, @NotNull @NotNull Point end, @NotNull @NotNull Block block) 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 biome.- Specified by:
fillHeightin interfaceUnitModifier- Parameters:
minHeight- the minimum height of the areamaxHeight- the maximum height of the areablock- the block to fill
-