本文整理汇总了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);
}
}
}
示例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);
}
}
}
示例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);
}
}
}
示例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);
}
}
}
示例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);
}
}
}