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


Java MapData.updateVisiblePlayers方法代码示例

本文整理汇总了Java中net.minecraft.world.storage.MapData.updateVisiblePlayers方法的典型用法代码示例。如果您正苦于以下问题:Java MapData.updateVisiblePlayers方法的具体用法?Java MapData.updateVisiblePlayers怎么用?Java MapData.updateVisiblePlayers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.world.storage.MapData的用法示例。


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

示例1: onUpdate

import net.minecraft.world.storage.MapData; //导入方法依赖的package包/类
/**
 * Called each tick as long the item is on a player inventory. Uses by maps to check if is on a player hand and
 * update it's contents.
 */
public void onUpdate(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected)
{
    if (!worldIn.isRemote)
    {
        MapData mapdata = this.getMapData(stack, worldIn);

        if (entityIn instanceof EntityPlayer)
        {
            EntityPlayer entityplayer = (EntityPlayer)entityIn;
            mapdata.updateVisiblePlayers(entityplayer, stack);
        }

        if (isSelected)
        {
            this.updateMapData(worldIn, entityIn, mapdata);
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:23,代码来源:ItemMap.java

示例2: onUpdate

import net.minecraft.world.storage.MapData; //导入方法依赖的package包/类
/**
 * Called each tick as long the item is on a player inventory. Uses by maps to check if is on a player hand and
 * update it's contents.
 */
public void onUpdate(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected)
{
    if (!worldIn.isRemote)
    {
        MapData mapdata = this.getMapData(stack, worldIn);

        if (entityIn instanceof EntityPlayer)
        {
            EntityPlayer entityplayer = (EntityPlayer)entityIn;
            mapdata.updateVisiblePlayers(entityplayer, stack);
        }

        if (isSelected || entityIn instanceof EntityPlayer && ((EntityPlayer)entityIn).getHeldItemOffhand() == stack)
        {
            this.updateMapData(worldIn, entityIn, mapdata);
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:23,代码来源:ItemMap.java

示例3: onUpdate

import net.minecraft.world.storage.MapData; //导入方法依赖的package包/类
/**
 * Called each tick as long the item is on a player inventory. Uses by maps to check if is on a player hand and
 * update it's contents.
 */
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5)
{
    if (!par2World.isClient)
    {
        MapData var6 = this.getMapData(par1ItemStack, par2World);

        if (par3Entity instanceof EntityPlayer)
        {
            EntityPlayer var7 = (EntityPlayer)par3Entity;
            var6.updateVisiblePlayers(var7, par1ItemStack);
        }

        if (par5)
        {
            this.updateMapData(par2World, par3Entity, var6);
        }
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:23,代码来源:ItemMap.java

示例4: onUpdate

import net.minecraft.world.storage.MapData; //导入方法依赖的package包/类
public void onUpdate(ItemStack p_77663_1_, World p_77663_2_, Entity p_77663_3_, int p_77663_4_, boolean p_77663_5_)
{
    if (!p_77663_2_.isRemote)
    {
        MapData mapdata = this.getMapData(p_77663_1_, p_77663_2_);

        if (p_77663_3_ instanceof EntityPlayer)
        {
            EntityPlayer entityplayer = (EntityPlayer)p_77663_3_;
            mapdata.updateVisiblePlayers(entityplayer, p_77663_1_);
        }

        if (p_77663_5_)
        {
            this.updateMapData(p_77663_2_, p_77663_3_, mapdata);
        }
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:19,代码来源:ItemMap.java

示例5: onUpdate

import net.minecraft.world.storage.MapData; //导入方法依赖的package包/类
/**
 * Called each tick as long the item is on a player inventory. Uses by maps to check if is on a player hand and
 * update it's contents.
 */
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5)
{
    if (!par2World.isRemote)
    {
        MapData mapdata = this.getMapData(par1ItemStack, par2World);

        if (par3Entity instanceof EntityPlayer)
        {
            EntityPlayer entityplayer = (EntityPlayer)par3Entity;
            mapdata.updateVisiblePlayers(entityplayer, par1ItemStack);
        }

        if (par5)
        {
            this.updateMapData(par2World, par3Entity, mapdata);
        }
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:23,代码来源:ItemMap.java


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