Java 类net.minecraft.enchantment.EnchantmentFrostWalker 实例源码

项目:Possessed    文件:SnowmanHandler.java   
@Override
public void onUpdate(PossessivePlayer possessivePlayer, EntityPlayer player) {
    EntitySnowman possessing = (EntitySnowman) possessivePlayer.getPossessing();
    if (player.onGround) {
        EnchantmentFrostWalker.freezeNearby(player, player.worldObj, player.getPosition(), 2);
        for (int i = 0; i < 4; ++i) {
            int x = MathHelper.floor_double(player.posX + (i % 2 * 2 - 1) * 0.25F);
            int y = MathHelper.floor_double(player.posY);
            int z = MathHelper.floor_double(player.posZ + (i / 2 % 2 * 2 - 1) * 0.25F);
            BlockPos pos = new BlockPos(x, y, z);
            IBlockState state = player.worldObj.getBlockState(pos);
            if (state.getMaterial() == Material.AIR && Blocks.SNOW_LAYER.canPlaceBlockAt(player.worldObj, pos)) {
                player.worldObj.setBlockState(pos, Blocks.SNOW_LAYER.getDefaultState());
            }
        }
    }
}
项目:Backmemed    文件:EntityLivingBase.java   
protected void frostWalk(BlockPos pos)
{
    int i = EnchantmentHelper.getMaxEnchantmentLevel(Enchantments.FROST_WALKER, this);

    if (i > 0)
    {
        EnchantmentFrostWalker.freezeNearby(this, this.world, pos, i);
    }
}
项目:CustomWorldGen    文件:EntityLivingBase.java   
protected void frostWalk(BlockPos pos)
{
    int i = EnchantmentHelper.getMaxEnchantmentLevel(Enchantments.FROST_WALKER, this);

    if (i > 0)
    {
        EnchantmentFrostWalker.freezeNearby(this, this.worldObj, pos, i);
    }
}
项目:ExpandedRailsMod    文件:EntityLivingBase.java   
protected void frostWalk(BlockPos pos)
{
    int i = EnchantmentHelper.getMaxEnchantmentLevel(Enchantments.FROST_WALKER, this);

    if (i > 0)
    {
        EnchantmentFrostWalker.freezeNearby(this, this.worldObj, pos, i);
    }
}
项目:Cyclic    文件:PotionFrostWalker.java   
@Override
public void tick(EntityLivingBase entityLiving) {
  EnchantmentFrostWalker.freezeNearby(entityLiving, entityLiving.world, entityLiving.getPosition(), 1);
}