当前位置: 首页>>代码示例>>Java>>正文


Java Blocks.ladder方法代码示例

本文整理汇总了Java中net.minecraft.init.Blocks.ladder方法的典型用法代码示例。如果您正苦于以下问题:Java Blocks.ladder方法的具体用法?Java Blocks.ladder怎么用?Java Blocks.ladder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.init.Blocks的用法示例。


在下文中一共展示了Blocks.ladder方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: func_94545_a

import net.minecraft.init.Blocks; //导入方法依赖的package包/类
public void func_94545_a()
{
    this.func_94542_g();

    if (this.fighter.isOnLadder())
    {
        Block block = this.fighter.worldObj.getBlockState(new BlockPos(this.fighter.posX, this.fighter.getEntityBoundingBox().minY, this.fighter.posZ)).getBlock();

        if (block == Blocks.ladder)
        {
            this.field_94551_f = "ladder";
        }
        else if (block == Blocks.vine)
        {
            this.field_94551_f = "vines";
        }
    }
    else if (this.fighter.isInWater())
    {
        this.field_94551_f = "water";
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:23,代码来源:CombatTracker.java

示例2: isOnLadder

import net.minecraft.init.Blocks; //导入方法依赖的package包/类
/**
 * returns true if this entity is by a ladder, false otherwise
 */
public boolean isOnLadder()
{
    int i = MathHelper.floor_double(this.posX);
    int j = MathHelper.floor_double(this.getEntityBoundingBox().minY);
    int k = MathHelper.floor_double(this.posZ);
    Block block = this.worldObj.getBlockState(new BlockPos(i, j, k)).getBlock();
    return (block == Blocks.ladder || block == Blocks.vine) && (!(this instanceof EntityPlayer) || !((EntityPlayer)this).isSpectator());
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:12,代码来源:EntityLivingBase.java

示例3: getCorners

import net.minecraft.init.Blocks; //导入方法依赖的package包/类
private Vector3[] getCorners(Block block, AxisAlignedBB boundingBox, boolean start) {
    if (boundingBox == null)
        return new Vector3[0];

    if (start)
        boundingBox = boundingBox.expand(0.299, 0, 0.299);

    // Return the center for slime block ending positions
    if (block == Blocks.slime_block && !start) {
        return new Vector3[] {
                new Vector3(boundingBox.minX + (boundingBox.maxX - boundingBox.minX) / 2.0,
                        boundingBox.maxY,
                        boundingBox.minZ + (boundingBox.maxZ - boundingBox.minZ) / 2.0),
        };
    }

    if (block == Blocks.ladder) {
        double xDiff = boundingBox.maxX - boundingBox.minX;
        double zDiff = boundingBox.maxZ - boundingBox.minZ;

        if (xDiff > zDiff) {

        } else if (zDiff > xDiff) {

        }
    }

    return new Vector3[] {
            new Vector3(boundingBox.minX, boundingBox.maxY, boundingBox.minZ),
            new Vector3(boundingBox.minX, boundingBox.maxY, boundingBox.maxZ),
            new Vector3(boundingBox.maxX, boundingBox.maxY, boundingBox.minZ),
            new Vector3(boundingBox.maxX, boundingBox.maxY, boundingBox.maxZ),

            new Vector3(boundingBox.minX + (boundingBox.maxX - boundingBox.minX) / 2.0, boundingBox.maxY, boundingBox.minZ),
            new Vector3(boundingBox.minX + (boundingBox.maxX - boundingBox.minX) / 2.0, boundingBox.maxY, boundingBox.maxZ),

            new Vector3(boundingBox.minX, boundingBox.maxY, boundingBox.minZ + (boundingBox.maxZ - boundingBox.minZ) / 2.0),
            new Vector3(boundingBox.maxX, boundingBox.maxY, boundingBox.minZ + (boundingBox.maxZ - boundingBox.minZ) / 2.0)
    };
}
 
开发者ID:SerenityEnterprises,项目名称:SerenityCE,代码行数:41,代码来源:Parkour.java

示例4: isBlocked

import net.minecraft.init.Blocks; //导入方法依赖的package包/类
private boolean isBlocked(World worldIn, BlockPos pos, IBlockState state)
{
    Block block = worldIn.getBlockState(pos).getBlock();
    return !(block instanceof BlockDoor) && block != Blocks.standing_sign && block != Blocks.ladder && block != Blocks.reeds ? (block.blockMaterial == Material.portal ? true : block.blockMaterial.blocksMovement()) : true;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:6,代码来源:BlockDynamicLiquid.java

示例5: isBlocked

import net.minecraft.init.Blocks; //导入方法依赖的package包/类
private boolean isBlocked(World worldIn, BlockPos pos, IBlockState state) {
	Block block = worldIn.getBlockState(pos).getBlock();
	return !(block instanceof BlockDoor) && block != Blocks.standing_sign && block != Blocks.ladder
			&& block != Blocks.reeds
					? (block.blockMaterial == Material.portal ? true : block.blockMaterial.blocksMovement()) : true;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:7,代码来源:BlockDynamicLiquid.java


注:本文中的net.minecraft.init.Blocks.ladder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。