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


Java BlockFenceGate类代码示例

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


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

示例1: handleFalling

import net.minecraft.block.BlockFenceGate; //导入依赖的package包/类
/**
 * process player falling based on movement packet
 */
public void handleFalling(double p_71122_1_, boolean p_71122_3_)
{
    int i = MathHelper.floor_double(this.posX);
    int j = MathHelper.floor_double(this.posY - 0.20000000298023224D);
    int k = MathHelper.floor_double(this.posZ);
    BlockPos blockpos = new BlockPos(i, j, k);
    Block block = this.worldObj.getBlockState(blockpos).getBlock();

    if (block.getMaterial() == Material.air)
    {
        Block block1 = this.worldObj.getBlockState(blockpos.down()).getBlock();

        if (block1 instanceof BlockFence || block1 instanceof BlockWall || block1 instanceof BlockFenceGate)
        {
            blockpos = blockpos.down();
            block = this.worldObj.getBlockState(blockpos).getBlock();
        }
    }

    super.updateFallState(p_71122_1_, p_71122_3_, block, blockpos);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:25,代码来源:EntityPlayerMP.java

示例2: handleFalling

import net.minecraft.block.BlockFenceGate; //导入依赖的package包/类
/**
 * process player falling based on movement packet
 */
public void handleFalling(double y, boolean onGroundIn)
{
    int i = MathHelper.floor(this.posX);
    int j = MathHelper.floor(this.posY - 0.20000000298023224D);
    int k = MathHelper.floor(this.posZ);
    BlockPos blockpos = new BlockPos(i, j, k);
    IBlockState iblockstate = this.world.getBlockState(blockpos);

    if (iblockstate.getMaterial() == Material.AIR)
    {
        BlockPos blockpos1 = blockpos.down();
        IBlockState iblockstate1 = this.world.getBlockState(blockpos1);
        Block block = iblockstate1.getBlock();

        if (block instanceof BlockFence || block instanceof BlockWall || block instanceof BlockFenceGate)
        {
            blockpos = blockpos1;
            iblockstate = iblockstate1;
        }
    }

    super.updateFallState(y, onGroundIn, iblockstate, blockpos);
}
 
开发者ID:NSExceptional,项目名称:Zombe-Modpack,代码行数:27,代码来源:EntityPlayerMP.java

示例3: handleFalling

import net.minecraft.block.BlockFenceGate; //导入依赖的package包/类
/**
 * process player falling based on movement packet
 */
public void handleFalling(double y, boolean onGroundIn)
{
    int i = MathHelper.floor_double(this.posX);
    int j = MathHelper.floor_double(this.posY - 0.20000000298023224D);
    int k = MathHelper.floor_double(this.posZ);
    BlockPos blockpos = new BlockPos(i, j, k);
    IBlockState iblockstate = this.worldObj.getBlockState(blockpos);

    if (iblockstate.getBlock().isAir(iblockstate, this.worldObj, blockpos))
    {
        BlockPos blockpos1 = blockpos.down();
        IBlockState iblockstate1 = this.worldObj.getBlockState(blockpos1);
        Block block = iblockstate1.getBlock();

        if (block instanceof BlockFence || block instanceof BlockWall || block instanceof BlockFenceGate)
        {
            blockpos = blockpos1;
            iblockstate = iblockstate1;
        }
    }

    super.updateFallState(y, onGroundIn, iblockstate, blockpos);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:27,代码来源:EntityPlayerMP.java

示例4: canConnectTo

import net.minecraft.block.BlockFenceGate; //导入依赖的package包/类
@Override
public boolean canConnectTo(IBlockAccess par1IBlockAccess, BlockPos pos)
{
	Block block = par1IBlockAccess.getBlockState(pos).getBlock();

	//split up oneliner to be more readable
	if(block != this && !(block instanceof BlockFenceGate) && block != SCContent.reinforcedFencegate)
	{
		if(block.getDefaultState().getMaterial().isOpaque())
			return block.getDefaultState().getMaterial() != Material.GOURD;
		else
			return false;
	}
	else
		return true;
}
 
开发者ID:Geforce132,项目名称:SecurityCraft,代码行数:17,代码来源:BlockIronFence.java

示例5: canConnectTo

import net.minecraft.block.BlockFenceGate; //导入依赖的package包/类
@Override
public boolean canConnectTo(IBlockAccess par1IBlockAccess, BlockPos pos)
{
	Block block = par1IBlockAccess.getBlockState(pos).getBlock();

	//split up oneliner to be more readable
	if(block != this && !(block instanceof BlockFenceGate) && block != SCContent.reinforcedFencegate)
	{
		if(block.getMaterial().isOpaque())
			return block.getMaterial() != Material.gourd;
		else
			return false;
	}
	else
		return true;
}
 
开发者ID:Geforce132,项目名称:SecurityCraft,代码行数:17,代码来源:BlockIronFence.java

示例6: canConnectTo

import net.minecraft.block.BlockFenceGate; //导入依赖的package包/类
@Override
public boolean canConnectTo(IBlockAccess par1IBlockAccess, BlockPos pos, EnumFacing facing)
{
	Block block = par1IBlockAccess.getBlockState(pos).getBlock();

	//split up oneliner to be more readable
	if(block != this && !(block instanceof BlockFenceGate) && block != SCContent.reinforcedFencegate)
	{
		if(block.getDefaultState().getMaterial().isOpaque())
			return block.getDefaultState().getMaterial() != Material.GOURD;
		else
			return false;
	}
	else
		return true;
}
 
开发者ID:Geforce132,项目名称:SecurityCraft,代码行数:17,代码来源:BlockIronFence.java

示例7: canConnectTo

import net.minecraft.block.BlockFenceGate; //导入依赖的package包/类
public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos, EnumFacing p_176524_3_) {
	IBlockState iblockstate = worldIn.getBlockState(pos);
	BlockFaceShape blockfaceshape = iblockstate.getBlockFaceShape(worldIn, pos, p_176524_3_);
	Block block = iblockstate.getBlock();
	boolean flag = blockfaceshape == BlockFaceShape.MIDDLE_POLE && (iblockstate.getMaterial() == this.blockMaterial || block instanceof BlockFenceGate);
	return !isExcepBlockForAttachWithPiston(block) && blockfaceshape == BlockFaceShape.SOLID || flag;
}
 
开发者ID:Um-Mitternacht,项目名称:Bewitchment,代码行数:8,代码来源:BlockScornedBrickFence.java

示例8: getPathNodeTypeRaw

import net.minecraft.block.BlockFenceGate; //导入依赖的package包/类
private PathNodeType getPathNodeTypeRaw(IBlockAccess p_189553_1_, int p_189553_2_, int p_189553_3_, int p_189553_4_)
{
    BlockPos blockpos = new BlockPos(p_189553_2_, p_189553_3_, p_189553_4_);
    IBlockState iblockstate = p_189553_1_.getBlockState(blockpos);
    Block block = iblockstate.getBlock();
    Material material = iblockstate.getMaterial();
    return material == Material.AIR ? PathNodeType.OPEN : (block != Blocks.TRAPDOOR && block != Blocks.IRON_TRAPDOOR && block != Blocks.WATERLILY ? (block == Blocks.FIRE ? PathNodeType.DAMAGE_FIRE : (block == Blocks.CACTUS ? PathNodeType.DAMAGE_CACTUS : (block instanceof BlockDoor && material == Material.WOOD && !((Boolean)iblockstate.getValue(BlockDoor.OPEN)).booleanValue() ? PathNodeType.DOOR_WOOD_CLOSED : (block instanceof BlockDoor && material == Material.IRON && !((Boolean)iblockstate.getValue(BlockDoor.OPEN)).booleanValue() ? PathNodeType.DOOR_IRON_CLOSED : (block instanceof BlockDoor && ((Boolean)iblockstate.getValue(BlockDoor.OPEN)).booleanValue() ? PathNodeType.DOOR_OPEN : (block instanceof BlockRailBase ? PathNodeType.RAIL : (!(block instanceof BlockFence) && !(block instanceof BlockWall) && (!(block instanceof BlockFenceGate) || ((Boolean)iblockstate.getValue(BlockFenceGate.OPEN)).booleanValue()) ? (material == Material.WATER ? PathNodeType.WATER : (material == Material.LAVA ? PathNodeType.LAVA : (block.isPassable(p_189553_1_, blockpos) ? PathNodeType.OPEN : PathNodeType.BLOCKED))) : PathNodeType.FENCE))))))) : PathNodeType.TRAPDOOR);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:9,代码来源:WalkNodeProcessor.java

示例9: getValidVanillaBlockRotations

import net.minecraft.block.BlockFenceGate; //导入依赖的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

示例10: canConnectTo

import net.minecraft.block.BlockFenceGate; //导入依赖的package包/类
public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos)
{
    Block block = worldIn.getBlockState(pos).getBlock();
    if (block instanceof CBWall && block.getMaterial().equals(this.getMaterial())) return true;

    return block == Blocks.barrier ? false : (block != this && !(block instanceof BlockFenceGate) ? (block.getMaterial().isOpaque() && block.isFullCube() ? block.getMaterial() != Material.gourd : false) : true);
}
 
开发者ID:dags-,项目名称:CreativeBlock,代码行数:8,代码来源:CBWall.java

示例11: CustomBlockProcessingHandled

import net.minecraft.block.BlockFenceGate; //导入依赖的package包/类
@Override
protected Boolean CustomBlockProcessingHandled(StructureConfiguration configuration, BuildBlock block, World world, BlockPos originalPos,
		EnumFacing assumedNorth, Block foundBlock, IBlockState blockState, EntityPlayer player)
{
	if (foundBlock instanceof BlockFenceGate && this.chickenCoopBlockPos == null)
	{ 
		chickenCoopBlockPos = block.getStartingPosition().getRelativePosition(
				originalPos,
				this.getClearSpace().getShape().getDirection(),
				configuration.houseFacing).offset(configuration.houseFacing.getOpposite(), 2);
	}
	
	return false;
}
 
开发者ID:Brian-Wuest,项目名称:MC-Prefab,代码行数:15,代码来源:StructureChickenCoop.java

示例12: getValidVanillaBlockRotations

import net.minecraft.block.BlockFenceGate; //导入依赖的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

示例13: canConnectTo

import net.minecraft.block.BlockFenceGate; //导入依赖的package包/类
public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos)
{
	Block block = worldIn.getBlockState(pos).getBlock();
	if ((this == MBlocks.red_rock_wall && block == MBlocks.red_rock_wall_mossy) || (this
		                                                                                == MBlocks.red_rock_wall_mossy
		                                                                                && block
			                                                                                   == MBlocks.red_rock_wall)
		    || (this == MBlocks.coldstone_wall && block == MBlocks.coldstone_wall_mossy) || (this
			                                                                                     == MBlocks.coldstone_wall_mossy
			                                                                                     && block
				                                                                                        == MBlocks.coldstone_wall)
		    || (this == MBlocks.icestone_wall && block == MBlocks.icestone_wall_mossy) || (this
			                                                                                   == MBlocks.icestone_wall_mossy
			                                                                                   && block
				                                                                                      == MBlocks.icestone_wall)
		    || (this == MBlocks.oceanstone_wall && block == MBlocks.oceanstone_wall_mossy) || (this
			                                                                                       == MBlocks.oceanstone_wall_mossy
			                                                                                       && block
				                                                                                          == MBlocks.oceanstone_wall))
		return true;
	else
		return block != Blocks.barrier && (!(block != this && !(block instanceof BlockFenceGate)) || ((block
			                                                                                               .getMaterial()
			                                                                                               .isOpaque()
			                                                                                               && block
				                                                                                                  .isFullCube())
			                                                                                              && block
				                                                                                                 .getMaterial()
				                                                                                                 != Material.gourd));
}
 
开发者ID:MinestrapTeam,项目名称:Minestrappolation-4,代码行数:31,代码来源:MBlockWall.java

示例14: func_78612_b

import net.minecraft.block.BlockFenceGate; //导入依赖的package包/类
public boolean func_78612_b(Block p_78612_1_, int p_78612_2_, int p_78612_3_, int p_78612_4_) {
   int var5 = p_78612_1_.func_71857_b();
   if(var5 == -1) {
      return false;
   } else {
      p_78612_1_.func_71902_a(this.field_78669_a, p_78612_2_, p_78612_3_, p_78612_4_);
      this.func_83018_a(p_78612_1_);
      return var5 == 0?this.func_78570_q(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 4?this.func_78621_p(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 31?this.func_78581_r(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 1?this.func_78620_l(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 2?this.func_78572_c(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 20?this.func_78598_k(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 11?this.func_78582_a((BlockFence)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 39?this.func_96445_r(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 5?this.func_78589_i(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 13?this.func_78584_s(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 9?this.func_78586_a((BlockRailBase)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 19?this.func_78603_m(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 23?this.func_78566_o(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 6?this.func_78614_n(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 3?this.func_78590_h((BlockFire)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 8?this.func_78576_j(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 7?this.func_78601_u(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 10?this.func_78565_t((BlockStairs)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 27?this.func_78618_a((BlockDragonEgg)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 32?this.func_82779_a((BlockWall)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 12?this.func_78594_e(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 29?this.func_78577_f(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 30?this.func_78619_g(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 14?this.func_78574_w(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 15?this.func_78610_x((BlockRedstoneRepeater)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 36?this.func_94176_a((BlockRedstoneLogic)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 37?this.func_94171_a((BlockComparator)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 16?this.func_78593_b(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_, false):(var5 == 17?this.func_78608_c(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_, true):(var5 == 18?this.func_78592_a((BlockPane)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 21?this.func_78580_a((BlockFenceGate)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 24?this.func_78615_a((BlockCauldron)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 33?this.func_82780_a((BlockFlowerPot)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 35?this.func_82775_a((BlockAnvil)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 25?this.func_78585_a((BlockBrewingStand)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 26?this.func_78567_v((BlockEndPortalFrame)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 28?this.func_78616_a((BlockCocoa)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 34?this.func_82778_a((BlockBeacon)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 38?this.func_94172_a((BlockHopper)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):false))))))))))))))))))))))))))))))))))))));
   }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:11,代码来源:RenderBlocks.java

示例15: initTesters

import net.minecraft.block.BlockFenceGate; //导入依赖的package包/类
public void initTesters() {
	entityWhitelist.addTester(new ClassTester<Entity>(EntityItem.class));
	entityWhitelist.addTester(new ClassTester<Entity>(EntityBoat.class));
	entityWhitelist.addTester(new ClassTester<Entity>(EntityMinecart.class));
	MinecraftForge.EVENT_BUS.post(new EntityRegisterEvent(entityWhitelist));

	blockWhitelist.addTester(o -> {
		float hardness = o.blockState.getBlockHardness(o.world, o);
		return (hardness < 0)? Result.REJECT : Result.CONTINUE;
	});

	blockWhitelist.addTester(o -> o.blockState.getRenderType() == EnumBlockRenderType.MODEL? Result.ACCEPT : Result.CONTINUE);

	blockWhitelist.addTester(createBlockClassTester(BlockSand.class));
	blockWhitelist.addTester(createBlockClassTester(BlockStairs.class));
	blockWhitelist.addTester(createBlockClassTester(BlockFence.class));
	blockWhitelist.addTester(createBlockClassTester(BlockFenceGate.class));
	blockWhitelist.addTester(createBlockIdentityTester(Blocks.CACTUS));
	MinecraftForge.EVENT_BUS.post(new BlockRegisterEvent(blockWhitelist));

	tileEntityWhitelist
			.addTester(new ClassTester<TileEntity>(TileEntityBeacon.class))
			.addTester(new ClassTester<TileEntity>(TileEntityBrewingStand.class))
			.addTester(new ClassTester<TileEntity>(TileEntityChest.class))
			.addTester(new ClassTester<TileEntity>(TileEntityCommandBlock.class))
			.addTester(new ClassTester<TileEntity>(TileEntityDispenser.class))
			.addTester(new ClassTester<TileEntity>(TileEntityEnchantmentTable.class))
			.addTester(new ClassTester<TileEntity>(TileEntityEnderChest.class))
			.addTester(new ClassTester<TileEntity>(TileEntityFurnace.class))
			.addTester(new ClassTester<TileEntity>(TileEntityHopper.class))
			.addTester(new ClassTester<TileEntity>(TileEntityNote.class))
			.addTester(new ClassTester<TileEntity>(TileEntityJukebox.class));
}
 
开发者ID:OpenMods,项目名称:OpenBlocks,代码行数:34,代码来源:MagnetWhitelists.java


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