本文整理了Java中net.minecraft.block.Block.addCollisionBoxToList()
方法的一些代码示例,展示了Block.addCollisionBoxToList()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Block.addCollisionBoxToList()
方法的具体详情如下:
包路径:net.minecraft.block.Block
类名称:Block
方法名:addCollisionBoxToList
暂无
代码示例来源:origin: AppliedEnergistics/Applied-Energistics-2
@SuppressWarnings( "deprecation" )
@Override
public void addCollisionBoxToList( final IBlockState state, final World w, final BlockPos pos, final AxisAlignedBB bb, final List<AxisAlignedBB> out, @Nullable final Entity e, boolean p_185477_7_ )
{
final ICustomCollision collisionHandler = this.getCustomCollision( w, pos );
if( collisionHandler != null && bb != null )
{
final List<AxisAlignedBB> tmp = new ArrayList<>();
collisionHandler.addCollidingBlockToList( w, pos, bb, tmp, e );
for( final AxisAlignedBB b : tmp )
{
final AxisAlignedBB offset = b.offset( pos.getX(), pos.getY(), pos.getZ() );
if( bb.intersects( offset ) )
{
out.add( offset );
}
}
}
else
{
super.addCollisionBoxToList( state, w, pos, bb, out, e, p_185477_7_ );
}
}
代码示例来源:origin: MrCrayfish/MrCrayfishFurnitureMod
@Override
public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn, boolean isActualState)
{
Block.addCollisionBoxToList(pos, entityBox, collidingBoxes, COLLISION_BOX);
}
代码示例来源:origin: DimensionalDevelopment/VanillaFix
@Override
public void addCollisionBoxToList(World world, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entity, boolean p_185908_6_) {
block.addCollisionBoxToList(this, world, pos, entityBox, collidingBoxes, entity, p_185908_6_);
}
代码示例来源:origin: DimensionalDevelopment/VanillaFix
@Override
public void addCollisionBoxToList(World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn, boolean p_185908_6_) {
normalState.getBlock().addCollisionBoxToList(this, worldIn, pos, entityBox, collidingBoxes, entityIn, p_185908_6_);
}
代码示例来源:origin: Direwolf20-MC/BuildingGadgets
@Override
@Deprecated
public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn, boolean isActualState) {
IBlockState mimicBlock = getActualMimicBlock(worldIn, pos);
if (mimicBlock == null) {
super.addCollisionBoxToList(state, worldIn, pos, entityBox, collidingBoxes, entityIn, isActualState);
} else {
try {
mimicBlock.getBlock().addCollisionBoxToList(mimicBlock, worldIn, pos, entityBox, collidingBoxes, entityIn, isActualState);
} catch (Exception var8) {
super.addCollisionBoxToList(state, worldIn, pos, entityBox, collidingBoxes, entityIn, isActualState);
}
}
}
代码示例来源:origin: MrCrayfish/MrCrayfishDeviceMod
@Override
public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, Entity entityIn, boolean p_185477_7_)
{
EnumFacing facing = state.getValue(FACING);
Block.addCollisionBoxToList(pos, entityBox, collidingBoxes, BODY_BOUNDING_BOX[facing.getHorizontalIndex()]);
Block.addCollisionBoxToList(pos, entityBox, collidingBoxes, TRAY_BOUNDING_BOX[facing.getHorizontalIndex()]);
Block.addCollisionBoxToList(pos, entityBox, collidingBoxes, PAPER_BOUNDING_BOX[facing.getHorizontalIndex()]);
}
代码示例来源:origin: MrCrayfish/MrCrayfishFurnitureMod
@Override
public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn, boolean isActualState)
{
EnumFacing facing = state.getValue(FACING);
Block.addCollisionBoxToList(pos, entityBox, collidingBoxes, BOTTOM_COLLISION_BOXES[facing.getHorizontalIndex()]);
Block.addCollisionBoxToList(pos, entityBox, collidingBoxes, TOP_COLLISION_BOXES[facing.getHorizontalIndex()]);
}
代码示例来源:origin: MrCrayfish/MrCrayfishFurnitureMod
@Override
public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn, boolean isActualState)
{
Block.addCollisionBoxToList(pos, entityBox, collidingBoxes, COLLISION_BOXES[state.getValue(FACING).getHorizontalIndex()]);
}
代码示例来源:origin: MrCrayfish/MrCrayfishDeviceMod
@Override
public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn, boolean p_185477_7_)
{
TileEntity tileEntity = worldIn.getTileEntity(pos);
if(tileEntity instanceof TileEntityLaptop)
{
TileEntityLaptop laptop = (TileEntityLaptop) tileEntity;
if(laptop.isOpen())
{
Block.addCollisionBoxToList(pos, entityBox, collidingBoxes, BODY_OPEN_BOX);
Block.addCollisionBoxToList(pos, entityBox, collidingBoxes, SCREEN_BOXES[state.getValue(FACING).getHorizontalIndex()]);
}
else
{
Block.addCollisionBoxToList(pos, entityBox, collidingBoxes, BODY_CLOSED_BOX);
}
return;
}
Block.addCollisionBoxToList(pos, entityBox, collidingBoxes, FULL_BLOCK_AABB);
}
代码示例来源:origin: MrCrayfish/MrCrayfishFurnitureMod
@Override
public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, Entity entityIn, boolean p_185477_7_)
{
EnumFacing facing = state.getValue(FACING);
if(facing.getHorizontalIndex() != -1)
{
Block.addCollisionBoxToList(pos, entityBox, collidingBoxes,SELECTION_BOUNDS[facing.getOpposite().getHorizontalIndex()] );
}
else if(facing == EnumFacing.UP)
{
Block.addCollisionBoxToList(pos, entityBox, collidingBoxes, COLLISION_BOUND_DOWN);
}
else if(facing == EnumFacing.DOWN)
{
Block.addCollisionBoxToList(pos, entityBox, collidingBoxes, COLLISION_BOUND_UP);
}
}
代码示例来源:origin: MrCrayfish/MrCrayfishFurnitureMod
@Override
public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn, boolean p_185477_7_)
{
Block.addCollisionBoxToList(pos, entityBox, collidingBoxes, COLLISION_BOXES[state.getValue(FACING).getHorizontalIndex()]);
}
代码示例来源:origin: MrCrayfish/MrCrayfishFurnitureMod
@Override
public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, Entity entityIn, boolean isActualState)
{
List<AxisAlignedBB> list = getCollisionBoxList(this.getActualState(state, worldIn, pos));
for(AxisAlignedBB box : list)
{
Block.addCollisionBoxToList(pos, entityBox, collidingBoxes, box);
}
}
代码示例来源:origin: MrCrayfish/MrCrayfishFurnitureMod
@Override
public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, Entity entityIn, boolean isActualState)
{
List<AxisAlignedBB> list = getCollisionBoxList(this.getActualState(state, worldIn, pos));
for(AxisAlignedBB box : list)
{
Block.addCollisionBoxToList(pos, entityBox, collidingBoxes, box);
}
}
代码示例来源:origin: MrCrayfish/MrCrayfishFurnitureMod
@Override
public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, Entity entityIn, boolean isActualState)
{
List<AxisAlignedBB> list = getCollisionBoxList(this.getActualState(state, worldIn, pos));
for(AxisAlignedBB box : list)
{
Block.addCollisionBoxToList(pos, entityBox, collidingBoxes, box);
}
}
代码示例来源:origin: MrCrayfish/MrCrayfishDeviceMod
@Override
public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn, boolean p_185477_7_)
{
if(state.getValue(VERTICAL))
{
Block.addCollisionBoxToList(pos, entityBox, collidingBoxes, BODY_VERTICAL_BOUNDING_BOX[state.getValue(FACING).getHorizontalIndex()]);
}
else
{
Block.addCollisionBoxToList(pos, entityBox, collidingBoxes, BODY_BOUNDING_BOX[state.getValue(FACING).getHorizontalIndex()]);
}
}
代码示例来源:origin: MrCrayfish/MrCrayfishFurnitureMod
Block.addCollisionBoxToList(pos, entityBox, collidingBoxes, COLLISION_BOX_TOP_OPENED[facing.getHorizontalIndex()]);
Block.addCollisionBoxToList(pos, entityBox, collidingBoxes, COLLISION_BOX_TOP[facing.getHorizontalIndex()]);
Block.addCollisionBoxToList(pos, entityBox, collidingBoxes, COLLISION_BOX_BOTTOM_OPENED[facing.getHorizontalIndex()]);
Block.addCollisionBoxToList(pos, entityBox, collidingBoxes, COLLISION_BOX_BOTTOM[facing.getHorizontalIndex()]);
内容来源于网络,如有侵权,请联系作者删除!