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


Java BlockHugeMushroom类代码示例

本文整理汇总了Java中net.minecraft.block.BlockHugeMushroom的典型用法代码示例。如果您正苦于以下问题:Java BlockHugeMushroom类的具体用法?Java BlockHugeMushroom怎么用?Java BlockHugeMushroom使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: getLeavesAndWood

import net.minecraft.block.BlockHugeMushroom; //导入依赖的package包/类
public int getLeavesAndWood(IBlockAccess world, BlockPos pos, ArrayList<BlockPos> poses, ArrayList<BlockPos> tried, int triesLeft)
{
    tried.add(pos);

    for(int i = -5; i <= 5; i++)
    {
        for(int k = -5; k <= 5; k++)
        {
            BlockPos newPos = pos.add(i, 0, k);
            if(BlockHugeMushroom.class.isInstance(world.getBlockState(newPos).getBlock()))
            {
                if(!poses.contains(newPos))
                {
                    poses.add(newPos);
                }
                if(!tried.contains(newPos))
                {
                    triesLeft = getLeavesAndWood(world, newPos, poses, tried, triesLeft);
                }
            }
        }
    }
    return triesLeft - 1;
}
 
开发者ID:iChun,项目名称:Blocksteps,代码行数:25,代码来源:MushroomHandler.java

示例2: getValidVanillaBlockRotations

import net.minecraft.block.BlockHugeMushroom; //导入依赖的package包/类
public static ForgeDirection[] getValidVanillaBlockRotations(Block block)
{
    return (block instanceof BlockBed || 
            block instanceof BlockPumpkin ||
            block instanceof BlockFenceGate || 
            block instanceof BlockEndPortalFrame || 
            block instanceof BlockTripWireHook || 
            block instanceof BlockCocoa || 
            block instanceof BlockRailPowered || 
            block instanceof BlockRailDetector || 
            block instanceof BlockStairs || 
            block instanceof BlockChest || 
            block instanceof BlockEnderChest || 
            block instanceof BlockFurnace || 
            block instanceof BlockLadder || 
            block == Blocks.field_150444_as || 
            block == Blocks.field_150472_an || 
            block instanceof BlockDoor || 
            block instanceof BlockRail ||
            block instanceof BlockButton || 
            block instanceof BlockRedstoneRepeater || 
            block instanceof BlockRedstoneComparator || 
            block instanceof BlockTrapDoor || 
            block instanceof BlockHugeMushroom || 
            block instanceof BlockVine || 
            block instanceof BlockSkull || 
            block instanceof BlockAnvil) ? UP_DOWN_AXES : VALID_DIRECTIONS;
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:29,代码来源:RotationHelper.java

示例3: getValidVanillaBlockRotations

import net.minecraft.block.BlockHugeMushroom; //导入依赖的package包/类
public static ForgeDirection[] getValidVanillaBlockRotations(Block block)
{
    return (block instanceof BlockBed || 
            block instanceof BlockPumpkin ||
            block instanceof BlockFenceGate || 
            block instanceof BlockEndPortalFrame || 
            block instanceof BlockTripWireHook || 
            block instanceof BlockCocoa || 
            block instanceof BlockRailPowered || 
            block instanceof BlockRailDetector || 
            block instanceof BlockStairs || 
            block instanceof BlockChest || 
            block instanceof BlockEnderChest || 
            block instanceof BlockFurnace || 
            block instanceof BlockLadder || 
            block == Blocks.wall_sign || 
            block == Blocks.standing_sign || 
            block instanceof BlockDoor || 
            block instanceof BlockRail ||
            block instanceof BlockButton || 
            block instanceof BlockRedstoneRepeater || 
            block instanceof BlockRedstoneComparator || 
            block instanceof BlockTrapDoor || 
            block instanceof BlockHugeMushroom || 
            block instanceof BlockVine || 
            block instanceof BlockSkull || 
            block instanceof BlockAnvil) ? UP_DOWN_AXES : VALID_DIRECTIONS;
}
 
开发者ID:alexandrage,项目名称:CauldronGit,代码行数:29,代码来源:RotationHelper.java

示例4: canGrabBlock

import net.minecraft.block.BlockHugeMushroom; //导入依赖的package包/类
/**
 * Returns true if the whip can grapple the block at the position
 */
protected boolean canGrabBlock(Block block, BlockPos pos, EnumFacing face) {
	if (block instanceof IWhipBlock) {
		return ((IWhipBlock) block).canGrabBlock(getType(), getThrower(), worldObj, pos, face);
	}
	switch (getType()) {
	case WHIP_MAGIC:
		// this excludes things like dirt, most plants, etc.
		if (block instanceof BlockSandStone || block instanceof BlockHugeMushroom || 
				(block.getMaterial().blocksMovement() && block.getBlockHardness(worldObj, pos) > 1.0F)) {
			return true;
		} // otherwise, fall through to standard case:
	case WHIP_SHORT:
	case WHIP_LONG:
		int clear = 0;
		if (isSideClear(pos.east()) && isSideClear(pos.west())) {
			++clear;
		}
		if (isSideClear(pos.up()) && isSideClear(pos.down())) {
			++clear;
		}
		if (isSideClear(pos.south()) && isSideClear(pos.north())) {
			++clear;
		}
		return (clear > 1 && (block instanceof BlockFence || block instanceof BlockLog ||
				block instanceof BlockLever || block instanceof BlockSign ||
				block instanceof BlockLadder));
	}
	return false;
}
 
开发者ID:coolAlias,项目名称:ZeldaSwordSkills,代码行数:33,代码来源:EntityWhip.java

示例5: getBlockType

import net.minecraft.block.BlockHugeMushroom; //导入依赖的package包/类
private static BlockType getBlockType(Block block) {

    if(block instanceof BlockBed || block instanceof BlockPumpkin || block instanceof BlockFenceGate || block instanceof BlockEndPortalFrame
        || block instanceof BlockCocoa) {
      return BlockType.BED;
    }
    if(block instanceof BlockRail) {
      return BlockType.RAIL;
    }
    if(block instanceof BlockRailPowered || block instanceof BlockRailDetector) {
      return BlockType.RAIL_POWERED;
    }
    if(block instanceof BlockStairs) {
      return BlockType.STAIR;
    }
    if(block instanceof BlockChest || block instanceof BlockEnderChest || block instanceof BlockFurnace || block instanceof BlockLadder
        || block == Blocks.wall_sign) {
      return BlockType.CHEST;
    }
    if(block == Blocks.standing_sign) {
      return BlockType.SIGNPOST;
    }
    if(block instanceof BlockDoor) {
      return BlockType.DOOR;
    }
    if(block instanceof BlockButton) {
      return BlockType.BUTTON;
    }
    if(block instanceof BlockRedstoneRepeater || block instanceof BlockRedstoneComparator) {
      return BlockType.REDSTONE_REPEATER;
    }
    if(block instanceof BlockTrapDoor) {
      return BlockType.TRAPDOOR;
    }
    if(block instanceof BlockHugeMushroom) {
      return BlockType.MUSHROOM_CAP;
    }
    if(block instanceof BlockVine) {
      return BlockType.VINE;
    }
    if(block instanceof BlockSkull) {
      return BlockType.SKULL;
    }
    if(block instanceof BlockAnvil) {
      return BlockType.ANVIL;
    }
    if(block instanceof BlockLog) {
      return BlockType.LOG;
    }
    if(block instanceof BlockDispenser || block instanceof BlockPistonBase || block instanceof BlockPistonExtension || block instanceof BlockHopper) {
      return BlockType.DISPENSER;
    }
    if(block instanceof BlockTorch) {
      return BlockType.TORCH;
    }
    if(block instanceof BlockLever) {
      return BlockType.LEVER;
    }
    if(block instanceof BlockTripWireHook) {
      return BlockType.TRIP_WIRE_HOOK;
    }
    
    return null;
  }
 
开发者ID:SleepyTrousers,项目名称:Structures,代码行数:65,代码来源:RotationHelper.java


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