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


Java BlockPressurePlate类代码示例

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


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

示例1: HarshenDimensionalFlatPlate

import net.minecraft.block.BlockPressurePlate; //导入依赖的package包/类
public HarshenDimensionalFlatPlate() {
	super(Material.ROCK, BlockPressurePlate.Sensitivity.MOBS);
	setUnlocalizedName("harshen_dimensional_flat_plate");
	setRegistryName("harshen_dimensional_flat_plate");
	setHarvestLevel("pickaxe", 3);
       setHardness(3000.0f);
       setResistance(3000.0f);
}
 
开发者ID:kenijey,项目名称:harshencastle,代码行数:9,代码来源:HarshenDimensionalFlatPlate.java

示例2: addBush

import net.minecraft.block.BlockPressurePlate; //导入依赖的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);
}
 
开发者ID:Reoseah,项目名称:shifted-snow,代码行数:12,代码来源:ClassProviders.java

示例3: hasPressureplate

import net.minecraft.block.BlockPressurePlate; //导入依赖的package包/类
public boolean hasPressureplate()
{
	if(worldObj.getBlock(xCoord, yCoord + 1, zCoord) instanceof BlockPressurePlate)
	{
		return true;
	}
	return false;
}
 
开发者ID:gigabit101,项目名称:PrimitiveCraft,代码行数:9,代码来源:TileGrinder.java

示例4: loadBlocks

import net.minecraft.block.BlockPressurePlate; //导入依赖的package包/类
public static void loadBlocks()
{
	expore = new BlockExp();
   	spell = new BlockSpell(BlockPressurePlate.Sensitivity.everything, Material.wood);
	
   	GameRegistry.registerBlock(expore, ItemMagicalOresblock.class, "expore");
   	GameRegistry.registerBlock(spell, ItemSpellBlock.class, "spell");
}
 
开发者ID:wuppy29,项目名称:WuppyMods,代码行数:9,代码来源:ModBlocks.java

示例5: BlockSpell

import net.minecraft.block.BlockPressurePlate; //导入依赖的package包/类
public BlockSpell(BlockPressurePlate.Sensitivity sensitivity, Material par4Material)
{
    super(Material.wood);
    this.sensitivity = sensitivity;
    setTickRandomly(true);
    float var5 = 0.0625F;
    setBlockBounds(var5, 0.0F, var5, 1.0F - var5, 0.03125F, 1.0F - var5);
    setCreativeTab(MagicalExperience.meBlocks);
    setHardness(0.5F);
    setStepSound(soundTypeWood);
    setBlockName("spell");
}
 
开发者ID:wuppy29,项目名称:WuppyMods,代码行数:13,代码来源:BlockSpell.java

示例6: BlockArtifactsPressurePlate

import net.minecraft.block.BlockPressurePlate; //导入依赖的package包/类
public BlockArtifactsPressurePlate(String name, Material material, BlockPressurePlate.Sensitivity mobType, boolean invis, boolean camo) {
	super(name, material);
	this.invisible = invis;
	this.camouflaged = camo;
	this.triggerMobType = mobType;
	setHardness(0.5F);
	setStepSound(mobType == BlockPressurePlate.Sensitivity.everything ? Block.soundTypeWood : Block.soundTypeStone);
	setCreativeTab(DragonArtifacts.tabGeneral);
}
 
开发者ID:Draco18s,项目名称:Artifacts,代码行数:10,代码来源:BlockArtifactsPressurePlate.java

示例7: func_150065_e

import net.minecraft.block.BlockPressurePlate; //导入依赖的package包/类
@Override
//getPlateState
protected int func_150065_e(World world, int x, int y, int z)
{
	List list = null;

	if (this.triggerMobType == BlockPressurePlate.Sensitivity.everything)
	{
		list = world.getEntitiesWithinAABBExcludingEntity((Entity)null, this.func_150061_a/*getSensitiveAABB*/(x, y, z));
	}

	if (this.triggerMobType == BlockPressurePlate.Sensitivity.mobs)
	{
		list = world.getEntitiesWithinAABB(EntityLivingBase.class, this.func_150061_a(x, y, z));
	}

	if (this.triggerMobType == BlockPressurePlate.Sensitivity.players)
	{
		list = world.getEntitiesWithinAABB(EntityPlayer.class, this.func_150061_a(x, y, z));
	}

	if (!list.isEmpty())
	{
		Iterator iterator = list.iterator();

		while (iterator.hasNext())
		{
			Entity entity = (Entity)iterator.next();

			if (!entity.doesEntityNotTriggerPressurePlate())
			{
				return 15;
			}
		}
	}

	return 0;
}
 
开发者ID:Draco18s,项目名称:Artifacts,代码行数:39,代码来源:BlockArtifactsPressurePlate.java

示例8: BlockWallPlate

import net.minecraft.block.BlockPressurePlate; //导入依赖的package包/类
public BlockWallPlate(String textureName, Material material, BlockPressurePlate.Sensitivity triggerMob, boolean camo) {
	super(textureName, material);
	this.triggerMobType = triggerMob;
	this.camouflage = camo;
	setHardness(0.5F);
	setStepSound(triggerMob == BlockPressurePlate.Sensitivity.everything ? Block.soundTypeWood : Block.soundTypeStone);
	setCreativeTab(DragonArtifacts.tabGeneral);
}
 
开发者ID:Draco18s,项目名称:Artifacts,代码行数:9,代码来源:BlockWallPlate.java

示例9: func_150065_e

import net.minecraft.block.BlockPressurePlate; //导入依赖的package包/类
@Override
//getPlateState
protected int func_150065_e(World world, int x, int y, int z)
{
	List list = null;
	int meta = world.getBlockMetadata(x, y, z);
	if (this.triggerMobType == BlockPressurePlate.Sensitivity.everything)
	{
		list = world.getEntitiesWithinAABBExcludingEntity((Entity)null, this.getMetaSensitiveAABB(x, y, z, meta));
	}

	if (this.triggerMobType == BlockPressurePlate.Sensitivity.mobs)
	{
		list = world.getEntitiesWithinAABB(EntityLivingBase.class, this.getMetaSensitiveAABB(x, y, z, meta));
	}

	if (this.triggerMobType == BlockPressurePlate.Sensitivity.players)
	{
		list = world.getEntitiesWithinAABB(EntityPlayer.class, this.getMetaSensitiveAABB(x, y, z, meta));
	}

	if (!list.isEmpty())
	{
		Iterator iterator = list.iterator();

		while (iterator.hasNext())
		{
			Entity entity = (Entity)iterator.next();
			if (!entity.doesEntityNotTriggerPressurePlate())
			{
				return 15;
			}
		}
	}


	return 0;
}
 
开发者ID:Draco18s,项目名称:Artifacts,代码行数:39,代码来源:BlockWallPlate.java

示例10: testAlphaContent

import net.minecraft.block.BlockPressurePlate; //导入依赖的package包/类
private void testAlphaContent() {
    final Material customMovingMaterial = new Material(MapColor.brownColor);
    new SimpleMovingBlock(this, "0b", "0b (Black)", customMovingMaterial, true);
    new SimpleMovingBlock(this, "0w", "0w (White)", customMovingMaterial, true);
    new SimpleMovingBlock(this, "1b", "1b (Black)", customMovingMaterial, true);
    new SimpleMovingBlock(this, "1w", "1w (White)", customMovingMaterial, true);
    new SimpleMovingBlock(this, "2b", "2b (Black)", customMovingMaterial, true);
    new SimpleMovingBlock(this, "2w", "2w (White)", customMovingMaterial, true);
    new SimpleMovingBlock(this, "3b", "3b (Black)", customMovingMaterial, true);
    new SimpleMovingBlock(this, "3w", "3w (White)", customMovingMaterial, true);
    new SimpleMovingBlock(this, "4b", "4b (Black)", customMovingMaterial, true);
    new SimpleMovingBlock(this, "4w", "4w (White)", customMovingMaterial, true);
    new SimpleMovingBlock(this, "5b", "5b (Black)", customMovingMaterial, true);
    new SimpleMovingBlock(this, "5w", "5w (White)", customMovingMaterial, true);
    new SimpleMovingBlock(this, "6b", "6b (Black)", customMovingMaterial, true);
    new SimpleMovingBlock(this, "6w", "6w (White)", customMovingMaterial, true);
    new SimpleMovingBlock(this, "7b", "7b (Black)", customMovingMaterial, true);
    new SimpleMovingBlock(this, "7w", "7w (White)", customMovingMaterial, true);
    new SimpleMovingBlock(this, "8b", "8b (Black)", customMovingMaterial, true);
    new SimpleMovingBlock(this, "8w", "8w (White)", customMovingMaterial, true);
    new SimpleMovingBlock(this, "9b", "9b (Black)", customMovingMaterial, true);
    new SimpleMovingBlock(this, "9w", "9w (White)", customMovingMaterial, true);

    new SimpleSword(this, "simple_blade", "Simple Blade", Item.ToolMaterial.EMERALD, true);
    new SimpleAxe(this, "simple_axe", "Simple Axe", Item.ToolMaterial.EMERALD, true);
    new SimplePickaxe(this, "simple_pickaxe", "Simple Pickaxe", Item.ToolMaterial.EMERALD, true);
    new SimpleSpade(this, "simple_shovel", "Simple Shovel", Item.ToolMaterial.EMERALD, true);

    final ItemArmor.ArmorMaterial customArmorMaterial = EnumHelper.addArmorMaterial("Custom", 100, new int[] {2, 3, 2, 2}, 15);
    new SimpleArmor(this, "simple_helmet", "Simple Helmet", customArmorMaterial, SimpleArmor.ArmorType.HEAD, true);
    new SimpleArmor(this, "simple_chestplate", "Simple Chestplate", customArmorMaterial, SimpleArmor.ArmorType.TORSO, true);
    new SimpleArmor(this, "simple_leggings", "Simple Leggings", customArmorMaterial, SimpleArmor.ArmorType.LEGS, true);
    new SimpleArmor(this, "simple_boots", "Simple Boots", customArmorMaterial, SimpleArmor.ArmorType.FEET, true);

    final Material customSlabMaterial = new Material(MapColor.blueColor);
    new SimpleSlab(this, "simple_slab", "Simple Slab", customSlabMaterial, true);

    final Material customBlockMaterial = new Material(MapColor.clayColor);
    final SimpleBlock block = new SimpleBlock(this, "simple_renderer", "Simple Renderer", customBlockMaterial, true);
    if (getGame().getSide().isClient()) {
        setupBlockRenderer(block);
    }

    final Material customFluidMaterial = new Material(MapColor.diamondColor);
    new SimpleBlockFluid(this, "simple_fluid", "Simple Fluid", customFluidMaterial, true);

    final Material customPressurePlate = new Material(MapColor.adobeColor);
    new SimplePressurePlate(this, "simple_plate", "Simple Plate", customPressurePlate, true, BlockPressurePlate.Sensitivity.everything);

    new SimpleFlower(this, "simple_flower", "Simple Flower", true);

    final Material customTrapDoor = new Material(MapColor.woodColor);
    new SimpleTrapDoor(this, "simple_trapdoor", "Simple Trapdoor", customTrapDoor, true);

    new SimpleBow(this, "simple_bow", "Simple Bow", true, 1);

    new SimpleCake(this, "simple_cake", "Simple Cake", Material.cake, true);

    new SimpleFlowerPot(this, "simple_flower_pot", "Simple Flower Pot", true);

    new SimpleLever(this, "simple_lever", "SimpleLever", true);

    new SimpleCactus(this, "simple_cactus", "Simple Cactus", true);
}
 
开发者ID:ObsidianBox,项目名称:Obsidian,代码行数:65,代码来源:InternalAddon.java

示例11: setStateIfMobInteractsWithPlate

import net.minecraft.block.BlockPressurePlate; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
private void setStateIfMobInteractsWithPlate(World par1World, int par2, int par3, int par4)
   {
       boolean var5 = par1World.getBlockMetadata(par2, par3, par4) == 1;
       boolean var6 = false;
       float var7 = 0.125F;
       List var8 = null;

       if (this.sensitivity == BlockPressurePlate.Sensitivity.everything)
       {
           var8 = par1World.getEntitiesWithinAABBExcludingEntity((Entity)null, AxisAlignedBB.getBoundingBox((double)((float)par2 + var7), (double)par3, (double)((float)par4 + var7), (double)((float)(par2 + 1) - var7), (double)par3 + 0.25D, (double)((float)(par4 + 1) - var7)));
       }

       if (this.sensitivity == BlockPressurePlate.Sensitivity.mobs)
       {
           var8 = par1World.getEntitiesWithinAABB(EntityLiving.class, AxisAlignedBB.getBoundingBox((double)((float)par2 + var7), (double)par3, (double)((float)par4 + var7), (double)((float)(par2 + 1) - var7), (double)par3 + 0.25D, (double)((float)(par4 + 1) - var7)));
       }

       if (this.sensitivity == BlockPressurePlate.Sensitivity.players)
       {
           var8 = par1World.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox((double)((float)par2 + var7), (double)par3, (double)((float)par4 + var7), (double)((float)(par2 + 1) - var7), (double)par3 + 0.25D, (double)((float)(par4 + 1) - var7)));
       }

       if (!var8.isEmpty())
       {
           var6 = true;
       }

       if (var6 && !var5)
       {
           par1World.setBlockMetadataWithNotify(par2, par3, par4, 1, 2);
           par1World.notifyBlocksOfNeighborChange(par2, par3, par4, this);
           par1World.notifyBlocksOfNeighborChange(par2, par3 - 1, par4, this);
           par1World.playSoundEffect((double)par2 + 0.5D, (double)par3 + 0.1D, (double)par4 + 0.5D, "random.click", 0.3F, 0.6F);
       }

       if (!var6 && var5)
       {
           par1World.setBlockMetadataWithNotify(par2, par3, par4, 0, 2);
           par1World.notifyBlocksOfNeighborChange(par2, par3, par4, this);
           par1World.notifyBlocksOfNeighborChange(par2, par3 - 1, par4, this);
           par1World.playSoundEffect((double)par2 + 0.5D, (double)par3 + 0.1D, (double)par4 + 0.5D, "random.click", 0.3F, 0.5F);
       }

       if (var6)
       {
           par1World.scheduleBlockUpdate(par2, par3, par4, this, this.tickRate(par1World));
       }
   }
 
开发者ID:wuppy29,项目名称:WuppyMods,代码行数:50,代码来源:BlockSpell.java


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