本文整理汇总了Java中net.minecraft.block.BlockTripWireHook类的典型用法代码示例。如果您正苦于以下问题:Java BlockTripWireHook类的具体用法?Java BlockTripWireHook怎么用?Java BlockTripWireHook使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BlockTripWireHook类属于net.minecraft.block包,在下文中一共展示了BlockTripWireHook类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getValidVanillaBlockRotations
import net.minecraft.block.BlockTripWireHook; //导入依赖的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;
}
示例2: addBush
import net.minecraft.block.BlockTripWireHook; //导入依赖的package包/类
public static void addBush() {
ShiftedSnowApi.addSimpleClassMapping(BlockBush.class, EnumSnowType.MINUS_FULL);
ShiftedSnowApi.addSimpleClassMapping(BlockSign.class, EnumSnowType.MINUS_FULL);
ShiftedSnowApi.addSimpleClassMapping(BlockAnvil.class, EnumSnowType.MINUS_FULL);
ShiftedSnowApi.addSimpleClassMapping(BlockBush.class, EnumSnowType.MINUS_FULL);
ShiftedSnowApi.addSimpleClassMapping(BlockPressurePlate.class, EnumSnowType.MINUS_FULL);
ShiftedSnowApi.addSimpleClassMapping(BlockLever.class, EnumSnowType.MINUS_FULL);
ShiftedSnowApi.addSimpleClassMapping(BlockRailBase.class, EnumSnowType.MINUS_FULL);
ShiftedSnowApi.addSimpleClassMapping(BlockTripWire.class, EnumSnowType.MINUS_FULL);
ShiftedSnowApi.addSimpleClassMapping(BlockTripWireHook.class, EnumSnowType.MINUS_FULL);
}
示例3: getValidVanillaBlockRotations
import net.minecraft.block.BlockTripWireHook; //导入依赖的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;
}
示例4: isDefered
import net.minecraft.block.BlockTripWireHook; //导入依赖的package包/类
private boolean isDefered(StructureBlock sb) {
Block block = GameRegistry.findBlock(sb.getModId(), sb.getBlockName());
if(block == null) {
return false;
}
return block instanceof BlockTorch || block instanceof BlockSand || block instanceof BlockGravel || block instanceof BlockAnvil
|| block instanceof BlockTripWireHook || block instanceof BlockTripWire|| block instanceof BlockRedstoneWire;
}
示例5: isValidPeripheral
import net.minecraft.block.BlockTripWireHook; //导入依赖的package包/类
@Override
public boolean isValidPeripheral(IBlockAccess world, BlockPos pos, IBlockState state, List<BlockPos> availableBlocks)
{
EnumFacing enumfacing = state.getValue(BlockTripWireHook.FACING);
return availableBlocks.contains(pos.offset(enumfacing.getOpposite()));
}
示例6: getBlockType
import net.minecraft.block.BlockTripWireHook; //导入依赖的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;
}