Exemplo n.º 1
0
        public override bool OnBlockInteractStep(float secondsUsed, IWorldAccessor world, IPlayer byPlayer, BlockSelection blockSel)
        {
            ItemSlot slot = byPlayer.InventoryManager.ActiveHotbarSlot;

            if (slot.Itemstack != null)
            {
                if (slot.Itemstack.Collectible.FirstCodePart() == "tamper")
                {
                    return(HandAnimations.Hit(byPlayer.Entity, secondsUsed));
                }
            }
            return(false);
        }
        public override bool OnBlockInteractStep(float secondsUsed, IWorldAccessor world, IPlayer byPlayer, BlockSelection blockSel)
        {
            ItemSlot slot = byPlayer.InventoryManager.ActiveHotbarSlot;

            if (slot.Itemstack != null)
            {
                if (IsSettingHammer(slot))
                {
                    return(HandAnimations.Hit(byPlayer.Entity, secondsUsed));
                }
            }
            return(false);
        }
Exemplo n.º 3
0
 public override bool OnBlockInteractStep(float secondsUsed, IWorldAccessor world, IPlayer byPlayer, BlockSelection blockSel)
 {
     return(HandAnimations.Hit(byPlayer.Entity, secondsUsed));
 }