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); }