本文整理汇总了C#中SMP.Player.SendUpdateSign方法的典型用法代码示例。如果您正苦于以下问题:C# Player.SendUpdateSign方法的具体用法?C# Player.SendUpdateSign怎么用?C# Player.SendUpdateSign使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SMP.Player
的用法示例。
在下文中一共展示了Player.SendUpdateSign方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Update
public void Update(World w, Player p)
{
byte bType, bMeta;
ushort bExtra;
int xxx, zzz;
Container c;
for (int xx = 0; xx < Width; xx++)
for (int zz = 0; zz < Depth; zz++)
for (int yy = 0; yy < Height; yy++)
{
xxx = (x << 4) + xx; zzz = (z << 4) + zz;
bType = GetBlock(xx, yy, zz);
bMeta = GetMetaData(xx, yy, zz);
if (bType == (byte)Blocks.SignPost || bType == (byte)Blocks.SignWall)
p.SendUpdateSign(xxx, (short)yy, zzz, w.GetSign(xxx, yy, zzz));
if (bType == (byte)Blocks.Jukebox)
{
bExtra = GetExtraData(xx, yy, zz);
if (bExtra >= 2256 && bExtra <= 2266)
p.SendSoundEffect(xxx, (byte)yy, zzz, 1005, bExtra);
}
if (bType == (byte)Blocks.Chest)
{
p.SendBlockChange(xxx, (byte)yy, zzz, bType, bMeta);
c = w.GetBlockContainer(xxx, yy, zzz);
if (c != null) c.UpdateState();
}
}
}