Class VillagePieces.StraightRoad
java.lang.Object
cn.nukkit.level.generator.populator.impl.structure.utils.structure.StructurePiece
cn.nukkit.level.generator.populator.impl.structure.village.structure.VillagePieces.Road
cn.nukkit.level.generator.populator.impl.structure.village.structure.VillagePieces.StraightRoad
- Enclosing class:
- VillagePieces
-
Nested Class Summary
Nested classes/interfaces inherited from class cn.nukkit.level.generator.populator.impl.structure.utils.structure.StructurePiece
StructurePiece.BlockSelector
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
protected boolean
protected PopulatorVillage.Type
protected int
Fields inherited from class cn.nukkit.level.generator.populator.impl.structure.utils.structure.StructurePiece
boundingBox, genDepth, level
-
Constructor Summary
ConstructorDescriptionStraightRoad
(VillagePieces.StartPiece start, int genDepth, NukkitRandom random, BoundingBox boundingBox, BlockFace orientation) StraightRoad
(CompoundTag tag) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
addChildren
(StructurePiece piece, List<StructurePiece> pieces, NukkitRandom random) protected void
fillColumnDown
(ChunkManager level, BlockState block, int x, int y, int z, BoundingBox boundingBox) static BoundingBox
findPieceBox
(VillagePieces.StartPiece start, List<StructurePiece> pieces, NukkitRandom random, int x, int y, int z, BlockFace orientation) protected StructurePiece
generateChildLeft
(VillagePieces.StartPiece start, List<StructurePiece> pieces, NukkitRandom random, int yOffset, int horizontalOffset) protected StructurePiece
generateChildRight
(VillagePieces.StartPiece start, List<StructurePiece> pieces, NukkitRandom random, int yOffset, int horizontalOffset) protected int
getAverageGroundHeight
(ChunkManager level, BoundingBox boundingBox) protected BlockState
protected BlockState
getSpecificBlock
(BlockState block) getType()
protected int
getVillagerProfession
(int villagerCount, int profession) protected static boolean
isOkBox
(BoundingBox boundingBox) protected void
placeDoor
(ChunkManager level, BoundingBox boundingBox, NukkitRandom random, int x, int y, int z, BlockFace orientation) protected void
placeTorch
(ChunkManager level, BlockFace orientation, int x, int y, int z, BoundingBox boundingBox) boolean
postProcess
(ChunkManager level, NukkitRandom random, BoundingBox boundingBox, int chunkX, int chunkZ) protected void
setType
(PopulatorVillage.Type type) protected void
spawnVillagers
(ChunkManager level, BoundingBox boundingBox, int x, int y, int z, int maxVillagerCount) Methods inherited from class cn.nukkit.level.generator.populator.impl.structure.utils.structure.StructurePiece
createTag, edgesLiquid, fillAirColumnUp, findCollisionPiece, generateAirBox, generateBox, generateBox, generateDoor, generateMaybeBox, generateUpperHalfSphere, getBlock, getBoundingBox, getGenDepth, getOrientation, getRotation, getWorldX, getWorldY, getWorldZ, isInterior, isLiquid, maybeGenerateBlock, move, placeBlock, setOrientation
-
Field Details
-
horizPos
protected int horizPos -
type
-
isZombieVillage
protected boolean isZombieVillage -
yOffset
protected int yOffset
-
-
Constructor Details
-
StraightRoad
public StraightRoad(VillagePieces.StartPiece start, int genDepth, NukkitRandom random, BoundingBox boundingBox, BlockFace orientation) -
StraightRoad
-
-
Method Details
-
findPieceBox
public static BoundingBox findPieceBox(VillagePieces.StartPiece start, List<StructurePiece> pieces, NukkitRandom random, int x, int y, int z, BlockFace orientation) -
getType
- Specified by:
getType
in classStructurePiece
-
addAdditionalSaveData
-
addChildren
- Overrides:
addChildren
in classStructurePiece
-
postProcess
public boolean postProcess(ChunkManager level, NukkitRandom random, BoundingBox boundingBox, int chunkX, int chunkZ) - Specified by:
postProcess
in classStructurePiece
-
isOkBox
-
generateChildLeft
@Nullable protected StructurePiece generateChildLeft(VillagePieces.StartPiece start, List<StructurePiece> pieces, NukkitRandom random, int yOffset, int horizontalOffset) -
generateChildRight
@Nullable protected StructurePiece generateChildRight(VillagePieces.StartPiece start, List<StructurePiece> pieces, NukkitRandom random, int yOffset, int horizontalOffset) -
getAverageGroundHeight
-
spawnVillagers
protected void spawnVillagers(ChunkManager level, BoundingBox boundingBox, int x, int y, int z, int maxVillagerCount) -
getVillagerProfession
protected int getVillagerProfession(int villagerCount, int profession) -
getSpecificBlock
-
getDoorBlock
-
placeDoor
protected void placeDoor(ChunkManager level, BoundingBox boundingBox, NukkitRandom random, int x, int y, int z, BlockFace orientation) -
placeTorch
protected void placeTorch(ChunkManager level, BlockFace orientation, int x, int y, int z, BoundingBox boundingBox) -
fillColumnDown
protected void fillColumnDown(ChunkManager level, BlockState block, int x, int y, int z, BoundingBox boundingBox) - Overrides:
fillColumnDown
in classStructurePiece
-
setType
-