Armes YAML
Chaque dossier dans plugins/GunCraft/guns-packs/ est un pack. Chaque fichier .yml est une arme.
Id runtime : pack:nom en minuscules (demo-pack:pistol).
/guns reload recharge tous les packs. Un YAML invalide skippe l’arme (ou l’action) et liste le warning dans le chat.
Squelette
Section intitulée « Squelette »name: Pistolrarity: COMMON # COMMON | UNCOMMON | RARE | EPIC | LEGENDARYlore: - "&7Standard sidearm"ammo-type: light # ammo-types.yml (remplace ammo-item)ads: falsemagazine-size: 12base-damage: 4.0min-damage: 2.0falloff-distance: 20reload-time: 30 # ticksshot-delay: 6 # ticks entre deux tirs / cadence autoautomatic: falseburst-size: 1burst-delay: 1pellets: 1 # >1 = shotgun (cône)headshot-multiplier: 1.6base-accuracy: 0.95accuracy-loss-per-shot: 0.04moving-penalty: 0.15sneak-bonus: 0.1 # sneak et/ou ADSrecoil-strength: 0.05camera-kick: 1.2 # si recoil-pattern viderecoil-pattern: - "1.2,-0.15" # pitch,yaw par coup, boucle - "1.0,0.25"shot-range: 40spread: 0.015shot-sound: ENTITY_FIREWORK_ROCKET_BLASTreload-sound: ITEM_ARMOR_EQUIP_LEATHERallow-offhand: truecrafting: enabled: true shape: - " I " - "ISI" - " S " ingredients: I: IRON_INGOT S: STICKskins: default: normal: item: type: WOODEN_HOE custom-model-data: 100 name: "&ePistol" aiming: item: type: WOODEN_HOE custom-model-data: 101 reloading: item: type: WOODEN_HOE custom-model-data: 102Plusieurs skins sous skins:. La première est le défaut in-game. SWAP_SKIN utilise l’id (gold, default, …).
20 ticks = 1 seconde.
Vanilla :
item: type: WOODEN_HOE custom-model-data: 100 name: "&ePistol" amount: 1ItemsAdder (prévois un fallback) :
item: type: ia:my_pack:pistol or-if-null: type: WOODEN_HOE custom-model-data: 100Ancien champ racine custom-model-data : encore lu si le skin default n’a pas d’item.
Munitions
Section intitulée « Munitions »plugins/GunCraft/ammo-types.yml :
types: light: item: type: IRON_NUGGET name: "&7Light Round"Sur l’arme, ammo-type: light pose cet item comme munition. Sinon :
ammo-item: item: type: ARROW remove-only-one: truePas d’item / type AIR = munitions infinies. En créatif, le chargeur ne se vide pas.
recoil-strength: pousse le joueur en arrière.recoil-pattern: listepitch,yaw. L’index avance à chaque coup et boucle.- Liste vide →
camera-kicken pitch seulement.
Pas encore éditable dans le GUI.
Crafting
Section intitulée « Crafting »Recette shapée 3×3. Chaque craft donne un UUID unique : pas de shift-clic.
Au /guns reload, les anciennes recettes GunCraft sont retirées puis réenregistrées. Pas encore éditable dans le GUI.
Headshots
Section intitulée « Headshots »Hit au-dessus des yeux × headshot-multiplier.
Scripts : event HEADSHOT ou if: headshot, pas les deux sur le même effet.
trail: max-particles: 16 # 0 = off step: 2.5Shotgun : trail uniquement sur le premier pellet.
Bloc actions: — voir Scripting.
RUN_COMMAND est off tant que allow-console-commands: false.