當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。