public abstract class StructurePiece
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
StructurePiece.BlockSelector |
Modifier and Type | Field and Description |
---|---|
protected MutableBoundingBox |
boundingBox |
protected static IBlockState |
CAVE_AIR |
protected int |
componentType |
Modifier | Constructor and Description |
---|---|
|
StructurePiece() |
protected |
StructurePiece(int type) |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
addComponentParts(IWorld worldIn,
java.util.Random randomIn,
MutableBoundingBox structureBoundingBoxIn,
ChunkPos p_74875_4_) |
void |
buildComponent(StructurePiece componentIn,
java.util.List<StructurePiece> listIn,
java.util.Random rand) |
protected void |
clearCurrentPositionBlocksUpwards(IWorld worldIn,
int x,
int y,
int z,
MutableBoundingBox structurebb) |
protected boolean |
createDispenser(IWorld worldIn,
MutableBoundingBox sbb,
java.util.Random rand,
int x,
int y,
int z,
EnumFacing facing,
ResourceLocation lootTableIn) |
NBTTagCompound |
createStructureBaseNBT() |
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,
IBlockState boundaryBlockState,
IBlockState 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) |
static IBlockState |
func_197528_a(IBlockReader p_197528_0_,
BlockPos p_197528_1_,
IBlockState p_197528_2_) |
protected boolean |
generateChest(IWorld p_191080_1_,
MutableBoundingBox p_191080_2_,
java.util.Random p_191080_3_,
BlockPos p_191080_4_,
ResourceLocation p_191080_5_,
IBlockState p_191080_6_) |
protected boolean |
generateChest(IWorld worldIn,
MutableBoundingBox structurebb,
java.util.Random randomIn,
int x,
int y,
int z,
ResourceLocation loot) |
protected void |
generateDoor(IWorld worldIn,
MutableBoundingBox sbb,
java.util.Random rand,
int x,
int y,
int z,
EnumFacing facing,
BlockDoor door) |
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,
IBlockState edgeState,
IBlockState state,
boolean requireNonAir,
boolean requiredSkylight) |
protected IBlockState |
getBlockStateFromPos(IBlockReader worldIn,
int x,
int y,
int z,
MutableBoundingBox boundingboxIn) |
MutableBoundingBox |
getBoundingBox() |
int |
getComponentType() |
EnumFacing |
getCoordBaseMode() |
protected boolean |
getSkyBrightness(IWorldReaderBase worldIn,
int x,
int y,
int z,
MutableBoundingBox boundingboxIn) |
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,
IBlockState blockstateIn) |
protected void |
randomlyRareFillWithBlocks(IWorld worldIn,
MutableBoundingBox boundingboxIn,
int minX,
int minY,
int minZ,
int maxX,
int maxY,
int maxZ,
IBlockState blockstateIn,
boolean excludeAir) |
void |
readStructureBaseNBT(IWorld worldIn,
NBTTagCompound tagCompound) |
protected abstract void |
readStructureFromNBT(NBTTagCompound tagCompound,
TemplateManager p_143011_2_) |
protected void |
replaceAirAndLiquidDownwards(IWorld worldIn,
IBlockState blockstateIn,
int x,
int y,
int z,
MutableBoundingBox boundingboxIn) |
protected void |
setBlockState(IWorld worldIn,
IBlockState blockstateIn,
int x,
int y,
int z,
MutableBoundingBox boundingboxIn) |
void |
setCoordBaseMode(EnumFacing facing) |
protected abstract void |
writeStructureToNBT(NBTTagCompound tagCompound) |
protected static final IBlockState CAVE_AIR
protected MutableBoundingBox boundingBox
protected int componentType
public StructurePiece()
protected StructurePiece(int type)
public final NBTTagCompound createStructureBaseNBT()
protected abstract void writeStructureToNBT(NBTTagCompound tagCompound)
public void readStructureBaseNBT(IWorld worldIn, NBTTagCompound tagCompound)
protected abstract void readStructureFromNBT(NBTTagCompound tagCompound, TemplateManager p_143011_2_)
public void buildComponent(StructurePiece componentIn, java.util.List<StructurePiece> listIn, java.util.Random rand)
public abstract boolean addComponentParts(IWorld worldIn, java.util.Random randomIn, MutableBoundingBox structureBoundingBoxIn, ChunkPos p_74875_4_)
public MutableBoundingBox getBoundingBox()
public int getComponentType()
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, IBlockState blockstateIn, int x, int y, int z, MutableBoundingBox boundingboxIn)
protected IBlockState getBlockStateFromPos(IBlockReader worldIn, int x, int y, int z, MutableBoundingBox boundingboxIn)
protected boolean getSkyBrightness(IWorldReaderBase 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, IBlockState boundaryBlockState, IBlockState 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, IBlockState edgeState, IBlockState state, boolean requireNonAir, boolean requiredSkylight)
protected void randomlyPlaceBlock(IWorld worldIn, MutableBoundingBox boundingboxIn, java.util.Random rand, float chance, int x, int y, int z, IBlockState blockstateIn)
protected void randomlyRareFillWithBlocks(IWorld worldIn, MutableBoundingBox boundingboxIn, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, IBlockState blockstateIn, boolean excludeAir)
protected void clearCurrentPositionBlocksUpwards(IWorld worldIn, int x, int y, int z, MutableBoundingBox structurebb)
protected void replaceAirAndLiquidDownwards(IWorld worldIn, IBlockState 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 IBlockState func_197528_a(IBlockReader p_197528_0_, BlockPos p_197528_1_, IBlockState p_197528_2_)
protected boolean generateChest(IWorld p_191080_1_, MutableBoundingBox p_191080_2_, java.util.Random p_191080_3_, BlockPos p_191080_4_, ResourceLocation p_191080_5_, @Nullable IBlockState p_191080_6_)
protected boolean createDispenser(IWorld worldIn, MutableBoundingBox sbb, java.util.Random rand, int x, int y, int z, EnumFacing facing, ResourceLocation lootTableIn)
protected void generateDoor(IWorld worldIn, MutableBoundingBox sbb, java.util.Random rand, int x, int y, int z, EnumFacing facing, BlockDoor door)
public void offset(int x, int y, int z)
@Nullable public EnumFacing getCoordBaseMode()
public void setCoordBaseMode(@Nullable EnumFacing facing)