當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。