Class ReplaceTopDecorator
java.lang.Object
org.cloudburstmc.server.level.generator.standard.generation.decorator.ReplaceTopDecorator
- All Implemented Interfaces:
Finisher,Decorator,GenerationPass,Populator
Replaces the top block in a chunk with a given replacement if it matches a given filter.
- Author:
- DaPorkchop_
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.cloudburstmc.server.level.generator.standard.generation.decorator.Decorator
Decorator.SkipRegistrationAsPopulatorNested classes/interfaces inherited from interface org.cloudburstmc.server.level.generator.standard.population.Populator
Populator.SkipRegistrationAsFinisher -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.cloudburstmc.api.block.BlockStateprotected IntRangestatic org.cloudburstmc.api.util.Identifierprotected BlockFilterFields inherited from interface org.cloudburstmc.server.level.generator.standard.generation.decorator.Decorator
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddecorate(net.daporkchop.lib.random.PRandom random, org.cloudburstmc.api.level.chunk.Chunk chunk, int x, int z)Decorates a given chunk.org.cloudburstmc.api.util.IdentifiergetId()voidinit(long levelSeed, long localSeed, StandardGenerator generator)Prepares this instance for actual generation.
-
Field Details
-
ID
public static final org.cloudburstmc.api.util.Identifier ID -
replace
-
height
-
block
protected org.cloudburstmc.api.block.BlockState block
-
-
Constructor Details
-
ReplaceTopDecorator
public ReplaceTopDecorator()
-
-
Method Details
-
init
Description copied from interface:GenerationPassPrepares this instance for actual generation.- Specified by:
initin interfaceGenerationPass- Parameters:
levelSeed- the level seed, as defined in cloudburst.ymllocalSeed- a seed defined specifically for this generation passgenerator- the instance ofStandardGeneratorthat this generation pass will be used by
-
decorate
public void decorate(net.daporkchop.lib.random.PRandom random, org.cloudburstmc.api.level.chunk.Chunk chunk, int x, int z)Description copied from interface:DecoratorDecorates a given chunk.- Specified by:
decoratein interfaceDecorator- Parameters:
random- an instance ofPRandomfor generating random numbers, initialized with a seed based on chunk's positionchunk- the chunk to be decoratedx- the X coordinate of the block column in the chunk to decoratez- the Z coordinate of the block column in the chunk to decorate
-
getId
public org.cloudburstmc.api.util.Identifier getId()
-