public abstract class StructurePiece
extends java.lang.Object
修飾子とタイプ | クラスと説明 |
---|---|
static class |
StructurePiece.BlockSelector |
修飾子とタイプ | フィールドと説明 |
---|---|
protected MutableBoundingBox |
boundingBox |
protected static BlockState |
CAVE_AIR |
protected int |
componentType |
修飾子 | コンストラクタと説明 |
---|---|
|
StructurePiece(IStructurePieceType structurePierceTypeIn,
CompoundNBT nbt) |
protected |
StructurePiece(IStructurePieceType structurePieceTypeIn,
int componentTypeIn) |
修飾子とタイプ | メソッドと説明 |
---|---|
void |
buildComponent(StructurePiece componentIn,
java.util.List<StructurePiece> listIn,
java.util.Random rand)
Initiates construction of the Structure Component picked, at the current Location of StructGen
|
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)
arguments: (World worldObj, StructureBoundingBox structBB, 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)
Fill the given area with the selected blocks
|
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)
arguments: World worldObj, StructureBoundingBox structBB, int minX, int minY, int minZ, int maxX, int maxY, int
maxZ, boolean alwaysreplace, Random rand, StructurePieceBlockSelector blockselector
|
static StructurePiece |
findIntersecting(java.util.List<StructurePiece> listIn,
MutableBoundingBox boundingboxIn)
Discover if bounding box can fit within the current bounding box object.
|
static BlockState |
func_197528_a(IBlockReader worldIn,
BlockPos posIn,
BlockState blockStateIn) |
boolean |
func_214810_a(ChunkPos p_214810_1_,
int p_214810_2_) |
abstract boolean |
func_225577_a_(IWorld p_225577_1_,
ChunkGenerator<?> p_225577_2_,
java.util.Random p_225577_3_,
MutableBoundingBox p_225577_4_,
ChunkPos p_225577_5_) |
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)
Adds chest to the structure and sets its contents
|
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()
Returns the component type ID of this component.
|
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)
checks the entire StructureBoundingBox for Liquids
|
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)
(abstract) Helper method to read subclass data from NBT
|
protected void |
replaceAirAndLiquidDownwards(IWorld worldIn,
BlockState blockstateIn,
int x,
int y,
int z,
MutableBoundingBox boundingboxIn)
Replaces air and liquid from given position downwards.
|
protected void |
setBlockState(IWorld worldIn,
BlockState blockstateIn,
int x,
int y,
int z,
MutableBoundingBox boundingboxIn) |
void |
setCoordBaseMode(Direction facing) |
CompoundNBT |
write()
Writes structure base data (id, boundingbox,
coordBase and componentType ) to new NBTTagCompound and
returns it. |
protected static final BlockState CAVE_AIR
protected MutableBoundingBox boundingBox
protected int componentType
protected StructurePiece(IStructurePieceType structurePieceTypeIn, int componentTypeIn)
public StructurePiece(IStructurePieceType structurePierceTypeIn, CompoundNBT nbt)
public final CompoundNBT write()
coordBase
and componentType
) to new NBTTagCompound and
returns it.protected abstract void readAdditional(CompoundNBT tagCompound)
public void buildComponent(StructurePiece componentIn, java.util.List<StructurePiece> listIn, java.util.Random rand)
public abstract boolean func_225577_a_(IWorld p_225577_1_, ChunkGenerator<?> p_225577_2_, java.util.Random p_225577_3_, MutableBoundingBox p_225577_4_, ChunkPos p_225577_5_)
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 func_197528_a(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()