Class StructurePiece
- java.lang.Object
-
- net.minecraft.world.gen.feature.structure.StructurePiece
-
- Direct Known Subclasses:
AbstractVillagePiece
,BuriedTreasure.Piece
,FortressPieces.Piece
,MineshaftPieces.Piece
,OceanMonumentPieces.Piece
,ScatteredStructurePiece
,StrongholdPieces.Stronghold
,TemplateStructurePiece
public abstract class StructurePiece extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StructurePiece.BlockSelector
-
Field Summary
Fields Modifier and Type Field Description protected MutableBoundingBox
boundingBox
protected static BlockState
CAVE_AIR
protected int
genDepth
private Mirror
mirror
private Direction
orientation
private Rotation
rotation
private static java.util.Set<Block>
SHAPE_CHECK_BLOCKS
private IStructurePieceType
type
-
Constructor Summary
Constructors Modifier Constructor Description protected
StructurePiece(IStructurePieceType p_i51342_1_, int p_i51342_2_)
StructurePiece(IStructurePieceType p_i51343_1_, CompoundNBT p_i51343_2_)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
addAdditionalSaveData(CompoundNBT p_143011_1_)
void
addChildren(StructurePiece p_74861_1_, java.util.List<StructurePiece> p_74861_2_, java.util.Random p_74861_3_)
protected boolean
createChest(ISeedReader p_186167_1_, MutableBoundingBox p_186167_2_, java.util.Random p_186167_3_, int p_186167_4_, int p_186167_5_, int p_186167_6_, ResourceLocation p_186167_7_)
protected boolean
createChest(IServerWorld p_191080_1_, MutableBoundingBox p_191080_2_, java.util.Random p_191080_3_, BlockPos p_191080_4_, ResourceLocation p_191080_5_, BlockState p_191080_6_)
protected boolean
createDispenser(ISeedReader p_189419_1_, MutableBoundingBox p_189419_2_, java.util.Random p_189419_3_, int p_189419_4_, int p_189419_5_, int p_189419_6_, Direction p_189419_7_, ResourceLocation p_189419_8_)
CompoundNBT
createTag()
protected boolean
edgesLiquid(IBlockReader p_74860_1_, MutableBoundingBox p_74860_2_)
protected void
fillColumnDown(ISeedReader p_175808_1_, BlockState p_175808_2_, int p_175808_3_, int p_175808_4_, int p_175808_5_, MutableBoundingBox p_175808_6_)
static StructurePiece
findCollisionPiece(java.util.List<StructurePiece> p_74883_0_, MutableBoundingBox p_74883_1_)
protected void
generateAirBox(ISeedReader p_74878_1_, MutableBoundingBox p_74878_2_, int p_74878_3_, int p_74878_4_, int p_74878_5_, int p_74878_6_, int p_74878_7_, int p_74878_8_)
protected void
generateBox(ISeedReader p_74882_1_, MutableBoundingBox p_74882_2_, int p_74882_3_, int p_74882_4_, int p_74882_5_, int p_74882_6_, int p_74882_7_, int p_74882_8_, boolean p_74882_9_, java.util.Random p_74882_10_, StructurePiece.BlockSelector p_74882_11_)
protected void
generateBox(ISeedReader p_175804_1_, MutableBoundingBox p_175804_2_, int p_175804_3_, int p_175804_4_, int p_175804_5_, int p_175804_6_, int p_175804_7_, int p_175804_8_, BlockState p_175804_9_, BlockState p_175804_10_, boolean p_175804_11_)
protected void
generateMaybeBox(ISeedReader p_189914_1_, MutableBoundingBox p_189914_2_, java.util.Random p_189914_3_, float p_189914_4_, int p_189914_5_, int p_189914_6_, int p_189914_7_, int p_189914_8_, int p_189914_9_, int p_189914_10_, BlockState p_189914_11_, BlockState p_189914_12_, boolean p_189914_13_, boolean p_189914_14_)
protected void
generateUpperHalfSphere(ISeedReader p_180777_1_, MutableBoundingBox p_180777_2_, int p_180777_3_, int p_180777_4_, int p_180777_5_, int p_180777_6_, int p_180777_7_, int p_180777_8_, BlockState p_180777_9_, boolean p_180777_10_)
protected BlockState
getBlock(IBlockReader p_175807_1_, int p_175807_2_, int p_175807_3_, int p_175807_4_, MutableBoundingBox p_175807_5_)
MutableBoundingBox
getBoundingBox()
int
getGenDepth()
Direction
getOrientation()
Rotation
getRotation()
IStructurePieceType
getType()
protected int
getWorldX(int p_74865_1_, int p_74865_2_)
protected int
getWorldY(int p_74862_1_)
protected int
getWorldZ(int p_74873_1_, int p_74873_2_)
boolean
isCloseToChunk(ChunkPos p_214810_1_, int p_214810_2_)
protected boolean
isInterior(IWorldReader p_189916_1_, int p_189916_2_, int p_189916_3_, int p_189916_4_, MutableBoundingBox p_189916_5_)
protected void
maybeGenerateBlock(ISeedReader p_175809_1_, MutableBoundingBox p_175809_2_, java.util.Random p_175809_3_, float p_175809_4_, int p_175809_5_, int p_175809_6_, int p_175809_7_, BlockState p_175809_8_)
void
move(int p_181138_1_, int p_181138_2_, int p_181138_3_)
protected void
placeBlock(ISeedReader p_175811_1_, BlockState p_175811_2_, int p_175811_3_, int p_175811_4_, int p_175811_5_, MutableBoundingBox p_175811_6_)
abstract boolean
postProcess(ISeedReader p_230383_1_, StructureManager p_230383_2_, ChunkGenerator p_230383_3_, java.util.Random p_230383_4_, MutableBoundingBox p_230383_5_, ChunkPos p_230383_6_, BlockPos p_230383_7_)
static BlockState
reorient(IBlockReader p_197528_0_, BlockPos p_197528_1_, BlockState p_197528_2_)
void
setOrientation(Direction p_186164_1_)
-
-
-
Field Detail
-
CAVE_AIR
protected static final BlockState CAVE_AIR
-
boundingBox
protected MutableBoundingBox boundingBox
-
orientation
@Nullable private Direction orientation
-
mirror
private Mirror mirror
-
rotation
private Rotation rotation
-
genDepth
protected int genDepth
-
type
private final IStructurePieceType type
-
SHAPE_CHECK_BLOCKS
private static final java.util.Set<Block> SHAPE_CHECK_BLOCKS
-
-
Constructor Detail
-
StructurePiece
protected StructurePiece(IStructurePieceType p_i51342_1_, int p_i51342_2_)
-
StructurePiece
public StructurePiece(IStructurePieceType p_i51343_1_, CompoundNBT p_i51343_2_)
-
-
Method Detail
-
createTag
public final CompoundNBT createTag()
-
addAdditionalSaveData
protected abstract void addAdditionalSaveData(CompoundNBT p_143011_1_)
-
addChildren
public void addChildren(StructurePiece p_74861_1_, java.util.List<StructurePiece> p_74861_2_, java.util.Random p_74861_3_)
-
postProcess
public abstract boolean postProcess(ISeedReader p_230383_1_, StructureManager p_230383_2_, ChunkGenerator p_230383_3_, java.util.Random p_230383_4_, MutableBoundingBox p_230383_5_, ChunkPos p_230383_6_, BlockPos p_230383_7_)
-
getBoundingBox
public MutableBoundingBox getBoundingBox()
-
getGenDepth
public int getGenDepth()
-
isCloseToChunk
public boolean isCloseToChunk(ChunkPos p_214810_1_, int p_214810_2_)
-
findCollisionPiece
public static StructurePiece findCollisionPiece(java.util.List<StructurePiece> p_74883_0_, MutableBoundingBox p_74883_1_)
-
edgesLiquid
protected boolean edgesLiquid(IBlockReader p_74860_1_, MutableBoundingBox p_74860_2_)
-
getWorldX
protected int getWorldX(int p_74865_1_, int p_74865_2_)
-
getWorldY
protected int getWorldY(int p_74862_1_)
-
getWorldZ
protected int getWorldZ(int p_74873_1_, int p_74873_2_)
-
placeBlock
protected void placeBlock(ISeedReader p_175811_1_, BlockState p_175811_2_, int p_175811_3_, int p_175811_4_, int p_175811_5_, MutableBoundingBox p_175811_6_)
-
getBlock
protected BlockState getBlock(IBlockReader p_175807_1_, int p_175807_2_, int p_175807_3_, int p_175807_4_, MutableBoundingBox p_175807_5_)
-
isInterior
protected boolean isInterior(IWorldReader p_189916_1_, int p_189916_2_, int p_189916_3_, int p_189916_4_, MutableBoundingBox p_189916_5_)
-
generateAirBox
protected void generateAirBox(ISeedReader p_74878_1_, MutableBoundingBox p_74878_2_, int p_74878_3_, int p_74878_4_, int p_74878_5_, int p_74878_6_, int p_74878_7_, int p_74878_8_)
-
generateBox
protected void generateBox(ISeedReader p_175804_1_, MutableBoundingBox p_175804_2_, int p_175804_3_, int p_175804_4_, int p_175804_5_, int p_175804_6_, int p_175804_7_, int p_175804_8_, BlockState p_175804_9_, BlockState p_175804_10_, boolean p_175804_11_)
-
generateBox
protected void generateBox(ISeedReader p_74882_1_, MutableBoundingBox p_74882_2_, int p_74882_3_, int p_74882_4_, int p_74882_5_, int p_74882_6_, int p_74882_7_, int p_74882_8_, boolean p_74882_9_, java.util.Random p_74882_10_, StructurePiece.BlockSelector p_74882_11_)
-
generateMaybeBox
protected void generateMaybeBox(ISeedReader p_189914_1_, MutableBoundingBox p_189914_2_, java.util.Random p_189914_3_, float p_189914_4_, int p_189914_5_, int p_189914_6_, int p_189914_7_, int p_189914_8_, int p_189914_9_, int p_189914_10_, BlockState p_189914_11_, BlockState p_189914_12_, boolean p_189914_13_, boolean p_189914_14_)
-
maybeGenerateBlock
protected void maybeGenerateBlock(ISeedReader p_175809_1_, MutableBoundingBox p_175809_2_, java.util.Random p_175809_3_, float p_175809_4_, int p_175809_5_, int p_175809_6_, int p_175809_7_, BlockState p_175809_8_)
-
generateUpperHalfSphere
protected void generateUpperHalfSphere(ISeedReader p_180777_1_, MutableBoundingBox p_180777_2_, int p_180777_3_, int p_180777_4_, int p_180777_5_, int p_180777_6_, int p_180777_7_, int p_180777_8_, BlockState p_180777_9_, boolean p_180777_10_)
-
fillColumnDown
protected void fillColumnDown(ISeedReader p_175808_1_, BlockState p_175808_2_, int p_175808_3_, int p_175808_4_, int p_175808_5_, MutableBoundingBox p_175808_6_)
-
createChest
protected boolean createChest(ISeedReader p_186167_1_, MutableBoundingBox p_186167_2_, java.util.Random p_186167_3_, int p_186167_4_, int p_186167_5_, int p_186167_6_, ResourceLocation p_186167_7_)
-
reorient
public static BlockState reorient(IBlockReader p_197528_0_, BlockPos p_197528_1_, BlockState p_197528_2_)
-
createChest
protected boolean createChest(IServerWorld p_191080_1_, MutableBoundingBox p_191080_2_, java.util.Random p_191080_3_, BlockPos p_191080_4_, ResourceLocation p_191080_5_, @Nullable BlockState p_191080_6_)
-
createDispenser
protected boolean createDispenser(ISeedReader p_189419_1_, MutableBoundingBox p_189419_2_, java.util.Random p_189419_3_, int p_189419_4_, int p_189419_5_, int p_189419_6_, Direction p_189419_7_, ResourceLocation p_189419_8_)
-
move
public void move(int p_181138_1_, int p_181138_2_, int p_181138_3_)
-
getOrientation
@Nullable public Direction getOrientation()
-
setOrientation
public void setOrientation(@Nullable Direction p_186164_1_)
-
getRotation
public Rotation getRotation()
-
getType
public IStructurePieceType getType()
-
-