예제 #1
0
파일: Wither.cs 프로젝트: kennyvv/MiNET-1.2
        public override void OnTick(Entity[] entities)
        {
            //base.OnTick();

            if (cooldown.Execute())
            {
                _tick     = 2;
                ShowAuora = false;
                BroadcastSetEntityData();
                //ShowAuora = false;
                //BroadcastSetEntityData();
            }

            if (_tick-- >= 0)
            {
                if (_tick == 1)
                {
                    ShowAuora = true;
                }
                else
                {
                    ShowAuora = false;
                }

                AnimationStep = (int)_tick;
                BroadcastSetEntityData();
            }
        }
예제 #2
0
        public void SetPosition1(Player player, BlockCoordinates pos)
        {
            if (!_clickCooldown.Execute())
            {
                return;
            }

            var selector = RegionSelector.GetSelector(player);

            if (selector.Position1.DistanceTo(pos) < 0.01)
            {
                pos.Y = (int)Math.Floor(player.KnownPosition.Y - 1.62f);
            }
            selector.SelectPrimary(pos);

            player.Inventory.SendSetSlot(player.Inventory.InHandSlot);
            player.SendMessage($"First position set to {pos}");
            //UpdateExtraData(player);
        }
예제 #3
0
 public void SentChatMesssage()
 {
     SpamCooldown.Execute();
 }