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


Java BlockSoulSand类代码示例

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


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

示例1: onArmorTick

import net.minecraft.block.BlockSoulSand; //导入依赖的package包/类
@Override
public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {
	super.onArmorTick(world, player, stack);
	ZSSPlayerInfo info = ZSSPlayerInfo.get(player);
	Block block = world.getBlockState(new BlockPos(player).down()).getBlock();
	boolean flag = !block.getMaterial().blocksMovement() || block.slipperiness > 0.6F || block instanceof BlockSoulSand;
	if (flag && player.isSprinting() && player.motionY < 0.0D && ++info.hoverTime < 40 ) {
		player.posY += -player.motionY;
		player.motionY = 0.0D;
		player.fallDistance = 0.0F;
		if (info.hoverTime % 3 == 0) {
			world.spawnParticle(EnumParticleTypes.CLOUD, player.posX, player.posY - 1, player.posZ, -player.motionX, player.motionY, -player.motionZ);
		}
	} else if (info.hoverTime > 0) {
		info.hoverTime = 0;
		player.setSprinting(false);
		if (world.isRemote && Minecraft.getMinecraft().gameSettings.keyBindSprint.isKeyDown()) {
			KeyBinding.setKeyBindState(Minecraft.getMinecraft().gameSettings.keyBindSprint.getKeyCode(), false);
		}
	}
}
 
开发者ID:coolAlias,项目名称:ZeldaSwordSkills,代码行数:22,代码来源:ItemArmorBoots.java

示例2: onEnabled

import net.minecraft.block.BlockSoulSand; //导入依赖的package包/类
@Override
public void onEnabled() {
    ForgeHaxHooks.isNoSlowDownActivated = true;
    try {
        ForgeHaxHooks.LIST_BLOCK_FILTER.add(BlockSoulSand.class);
    } catch (Exception e) {}
}
 
开发者ID:fr1kin,项目名称:ForgeHax,代码行数:8,代码来源:NoSlowdown.java

示例3: onDisabled

import net.minecraft.block.BlockSoulSand; //导入依赖的package包/类
@Override
public void onDisabled() {
    ForgeHaxHooks.isNoSlowDownActivated = false;
    try {
        ForgeHaxHooks.LIST_BLOCK_FILTER.remove(BlockSoulSand.class);
    } catch (Exception e) {}
}
 
开发者ID:fr1kin,项目名称:ForgeHax,代码行数:8,代码来源:NoSlowdown.java


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