import{Block as t,ItemStack as e}from"@minecraft/server";import{DisplayContext as r}from"./context";import{WeaponStoneTypes as o}from"./variants";export class WeaponStone{_allowedTags=["minecraft:is_tool","minecraft:is_trident"];type;constructor(t){this.type=t}typeId(){return this.type===o.STONE?"bc_ds:weapon_stone":`bc_ds:${this.type}_weapon_stone`}supportsItem(t){return this._allowedTags.filter(e=>t.hasTag(e)).length>0}displayContext(){return r.WeaponStone}maxStackSize(){return 1}maxItems(){return 1}lockedRotation(){return!1}calculateRotation(t,e){return"north"===e?t>=270||t<90?4:0:"east"===e?t>=180?2:6:"south"===e?t>=90&&t<=270?0:4:"west"===e?t<=180?6:2:0}}