public abstract class StructurePiece
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
StructurePiece.BlockSelector |
Modifier and Type | Field and Description |
---|---|
private static java.util.Set<Block> |
BLOCKS_NEEDING_POSTPROCESSING |
protected MutableBoundingBox |
boundingBox |
protected static BlockState |
CAVE_AIR |
protected int |
componentType |
private Direction |
coordBaseMode |
private Mirror |
mirror |
private Rotation |
rotation |
private IStructurePieceType |
structurePieceType |
Modifier | Constructor and Description |
---|---|
|
StructurePiece(IStructurePieceType structurePierceTypeIn,
CompoundNBT nbt) |
protected |
StructurePiece(IStructurePieceType structurePieceTypeIn,
int componentTypeIn) |
Modifier and Type | Method and Description |
---|---|
void |
buildComponent(StructurePiece componentIn,
java.util.List<StructurePiece> listIn,
java.util.Random rand) |
static BlockState |
correctFacing(IBlockReader worldIn,
BlockPos posIn,
BlockState blockStateIn) |
abstract boolean |
create(IWorld worldIn,
ChunkGenerator<?> chunkGeneratorIn,
java.util.Random randomIn,
MutableBoundingBox mutableBoundingBoxIn,
ChunkPos chunkPosIn) |
protected boolean |
createDispenser(IWorld worldIn,
MutableBoundingBox sbb,
java.util.Random rand,
int x,
int y,
int z,
Direction facing,
ResourceLocation lootTableIn) |
protected void |
fillWithAir(IWorld worldIn,
MutableBoundingBox structurebb,
int minX,
int minY,
int minZ,
int maxX,
int maxY,
int maxZ) |
protected void |
fillWithBlocks(IWorld worldIn,
MutableBoundingBox boundingboxIn,
int xMin,
int yMin,
int zMin,
int xMax,
int yMax,
int zMax,
BlockState boundaryBlockState,
BlockState insideBlockState,
boolean existingOnly) |
protected void |
fillWithRandomizedBlocks(IWorld worldIn,
MutableBoundingBox boundingboxIn,
int minX,
int minY,
int minZ,
int maxX,
int maxY,
int maxZ,
boolean alwaysReplace,
java.util.Random rand,
StructurePiece.BlockSelector blockselector) |
static StructurePiece |
findIntersecting(java.util.List<StructurePiece> listIn,
MutableBoundingBox boundingboxIn) |
boolean |
func_214810_a(ChunkPos p_214810_1_,
int p_214810_2_) |
protected boolean |
generateChest(IWorld worldIn,
MutableBoundingBox boundsIn,
java.util.Random rand,
BlockPos posIn,
ResourceLocation resourceLocationIn,
BlockState p_191080_6_) |
protected boolean |
generateChest(IWorld worldIn,
MutableBoundingBox structurebb,
java.util.Random randomIn,
int x,
int y,
int z,
ResourceLocation loot) |
protected void |
generateMaybeBox(IWorld worldIn,
MutableBoundingBox sbb,
java.util.Random rand,
float chance,
int x1,
int y1,
int z1,
int x2,
int y2,
int z2,
BlockState edgeState,
BlockState state,
boolean requireNonAir,
boolean requiredSkylight) |
protected BlockState |
getBlockStateFromPos(IBlockReader worldIn,
int x,
int y,
int z,
MutableBoundingBox boundingboxIn) |
MutableBoundingBox |
getBoundingBox() |
int |
getComponentType() |
Direction |
getCoordBaseMode() |
Rotation |
getRotation() |
protected boolean |
getSkyBrightness(IWorldReader worldIn,
int x,
int y,
int z,
MutableBoundingBox boundingboxIn) |
IStructurePieceType |
getStructurePieceType() |
protected int |
getXWithOffset(int x,
int z) |
protected int |
getYWithOffset(int y) |
protected int |
getZWithOffset(int x,
int z) |
protected boolean |
isLiquidInStructureBoundingBox(IBlockReader worldIn,
MutableBoundingBox boundingboxIn) |
void |
offset(int x,
int y,
int z) |
protected void |
randomlyPlaceBlock(IWorld worldIn,
MutableBoundingBox boundingboxIn,
java.util.Random rand,
float chance,
int x,
int y,
int z,
BlockState blockstateIn) |
protected void |
randomlyRareFillWithBlocks(IWorld worldIn,
MutableBoundingBox boundingboxIn,
int minX,
int minY,
int minZ,
int maxX,
int maxY,
int maxZ,
BlockState blockstateIn,
boolean excludeAir) |
protected abstract void |
readAdditional(CompoundNBT tagCompound) |
protected void |
replaceAirAndLiquidDownwards(IWorld worldIn,
BlockState blockstateIn,
int x,
int y,
int z,
MutableBoundingBox boundingboxIn) |
protected void |
setBlockState(IWorld worldIn,
BlockState blockstateIn,
int x,
int y,
int z,
MutableBoundingBox boundingboxIn) |
void |
setCoordBaseMode(Direction facing) |
CompoundNBT |
write() |
protected static final BlockState CAVE_AIR
protected MutableBoundingBox boundingBox
@Nullable private Direction coordBaseMode
private Mirror mirror
private Rotation rotation
protected int componentType
private final IStructurePieceType structurePieceType
private static final java.util.Set<Block> BLOCKS_NEEDING_POSTPROCESSING
protected StructurePiece(IStructurePieceType structurePieceTypeIn, int componentTypeIn)
public StructurePiece(IStructurePieceType structurePierceTypeIn, CompoundNBT nbt)
public final CompoundNBT write()
protected abstract void readAdditional(CompoundNBT tagCompound)
public void buildComponent(StructurePiece componentIn, java.util.List<StructurePiece> listIn, java.util.Random rand)
public abstract boolean create(IWorld worldIn, ChunkGenerator<?> chunkGeneratorIn, java.util.Random randomIn, MutableBoundingBox mutableBoundingBoxIn, ChunkPos chunkPosIn)
public MutableBoundingBox getBoundingBox()
public int getComponentType()
public boolean func_214810_a(ChunkPos p_214810_1_, int p_214810_2_)
public static StructurePiece findIntersecting(java.util.List<StructurePiece> listIn, MutableBoundingBox boundingboxIn)
protected boolean isLiquidInStructureBoundingBox(IBlockReader worldIn, MutableBoundingBox boundingboxIn)
protected int getXWithOffset(int x, int z)
protected int getYWithOffset(int y)
protected int getZWithOffset(int x, int z)
protected void setBlockState(IWorld worldIn, BlockState blockstateIn, int x, int y, int z, MutableBoundingBox boundingboxIn)
protected BlockState getBlockStateFromPos(IBlockReader worldIn, int x, int y, int z, MutableBoundingBox boundingboxIn)
protected boolean getSkyBrightness(IWorldReader worldIn, int x, int y, int z, MutableBoundingBox boundingboxIn)
protected void fillWithAir(IWorld worldIn, MutableBoundingBox structurebb, int minX, int minY, int minZ, int maxX, int maxY, int maxZ)
protected void fillWithBlocks(IWorld worldIn, MutableBoundingBox boundingboxIn, int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, BlockState boundaryBlockState, BlockState insideBlockState, boolean existingOnly)
protected void fillWithRandomizedBlocks(IWorld worldIn, MutableBoundingBox boundingboxIn, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, boolean alwaysReplace, java.util.Random rand, StructurePiece.BlockSelector blockselector)
protected void generateMaybeBox(IWorld worldIn, MutableBoundingBox sbb, java.util.Random rand, float chance, int x1, int y1, int z1, int x2, int y2, int z2, BlockState edgeState, BlockState state, boolean requireNonAir, boolean requiredSkylight)
protected void randomlyPlaceBlock(IWorld worldIn, MutableBoundingBox boundingboxIn, java.util.Random rand, float chance, int x, int y, int z, BlockState blockstateIn)
protected void randomlyRareFillWithBlocks(IWorld worldIn, MutableBoundingBox boundingboxIn, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, BlockState blockstateIn, boolean excludeAir)
protected void replaceAirAndLiquidDownwards(IWorld worldIn, BlockState blockstateIn, int x, int y, int z, MutableBoundingBox boundingboxIn)
protected boolean generateChest(IWorld worldIn, MutableBoundingBox structurebb, java.util.Random randomIn, int x, int y, int z, ResourceLocation loot)
public static BlockState correctFacing(IBlockReader worldIn, BlockPos posIn, BlockState blockStateIn)
protected boolean generateChest(IWorld worldIn, MutableBoundingBox boundsIn, java.util.Random rand, BlockPos posIn, ResourceLocation resourceLocationIn, @Nullable BlockState p_191080_6_)
protected boolean createDispenser(IWorld worldIn, MutableBoundingBox sbb, java.util.Random rand, int x, int y, int z, Direction facing, ResourceLocation lootTableIn)
public void offset(int x, int y, int z)
@Nullable public Direction getCoordBaseMode()
public void setCoordBaseMode(@Nullable Direction facing)
public Rotation getRotation()
public IStructurePieceType getStructurePieceType()