Exemple #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);
        }
Exemple #2
0
        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);
        }