{"id":17017183,"url":"https://github.com/zsoltmolnarrr/projectiledamage","last_synced_at":"2025-08-31T11:35:03.743Z","repository":{"id":44486596,"uuid":"512774563","full_name":"ZsoltMolnarrr/ProjectileDamage","owner":"ZsoltMolnarrr","description":"🏹 Generic projectile damage attribute","archived":false,"fork":false,"pushed_at":"2024-07-17T13:22:41.000Z","size":656,"stargazers_count":10,"open_issues_count":5,"forks_count":5,"subscribers_count":3,"default_branch":"1.20","last_synced_at":"2025-03-26T04:35:12.275Z","etag":null,"topics":["attribute","combat","damage","fabric","fabricmc","generic","java","minecraft","minecraft-mod","mod","projectile","ranged"],"latest_commit_sha":null,"homepage":"https://www.curseforge.com/minecraft/mc-mods/projectile-damage-attribute","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZsoltMolnarrr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-11T13:47:00.000Z","updated_at":"2025-02-22T20:45:56.000Z","dependencies_parsed_at":"2024-10-14T06:36:09.094Z","dependency_job_id":"ab06d5d6-12ac-4aa4-8601-34ef8a7197bf","html_url":"https://github.com/ZsoltMolnarrr/ProjectileDamage","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZsoltMolnarrr%2FProjectileDamage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZsoltMolnarrr%2FProjectileDamage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZsoltMolnarrr%2FProjectileDamage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZsoltMolnarrr%2FProjectileDamage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZsoltMolnarrr","download_url":"https://codeload.github.com/ZsoltMolnarrr/ProjectileDamage/tar.gz/refs/heads/1.20","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248546031,"owners_count":21122247,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["attribute","combat","damage","fabric","fabricmc","generic","java","minecraft","minecraft-mod","mod","projectile","ranged"],"created_at":"2024-10-14T06:35:57.530Z","updated_at":"2025-04-12T09:31:20.303Z","avatar_url":"https://github.com/ZsoltMolnarrr.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Projectile Damage Attribute](.github/projectile_damage_title.png)\n\n\u003cdiv align=\"center\"\u003e\n\n\u003ca href=\"\"\u003e![Java 17](https://img.shields.io/badge/Java%2017-ee9258?logo=coffeescript\u0026logoColor=ffffff\u0026labelColor=606060\u0026style=flat-square)\u003c/a\u003e\n\u003ca href=\"\"\u003e![Environment: Client \u0026 Server](https://img.shields.io/badge/environment-Client%20\u0026%20Server-1976d2?style=flat-square)\u003c/a\u003e\n\u003ca href=\"\"\u003e[![Discord](https://img.shields.io/discord/973561601519149057.svg?label=\u0026logo=discord\u0026logoColor=ffffff\u0026color=7389D8\u0026labelColor=6A7EC2\u0026style=flat-square)](https://discord.gg/KN9b3pjFTM)\u003c/a\u003e\n\n\u003c/div\u003e\n\n# 🏹️ Features\n\nAdds new EntityAttribute to the game, with the following id: `projectile_damage:generic`. This allows customization of damage done by individual Bow and Crossbow items in the game.\n\nAdds new status effect named `Impact`, that increases the projectile damage of the entity.\n\nYou can use the API provided by this mod, to set custom damage value to your custom ranged weapons.  \n\n# 🔧 Configuration\n\n**Server side** configuration can be found in the `config` directory, after running the game with the mod installed.\n\n# 🔨 Using it as a modder\n\n## Installation\n\nAdd this mod as dependency into your build.gradle file.\n\nRepository\n```groovy\nrepositories {\n    maven {\n        name = 'Modrinth'\n        url = 'https://api.modrinth.com/maven'\n        content {\n            includeGroup 'maven.modrinth'\n        }\n    }\n}\n```\n\n### Fabric workspace\n```groovy\ndependencies {\n    modImplementation \"maven.modrinth:projectile-damage-attribute:VERSION-fabric\"\n}\n```\nIn `fabric.mod.json` add a dependency to the mod:\n```json\n  \"depends\": {\n    \"projectile_damage\": \"\u003e=VERSION\"\n  },\n```\n\n(Substitute `VERSION` with the name of the latest release available on [Modrinth](https://modrinth.com/mod/projectile-damage-attribute/versions), for example: `3.0.0`)\n\n### Forge workspace\n```groovy\ndependencies {\n    implementation \"maven.modrinth:projectile-damage-attribute:VERSION-forge\"\n}\n```\nIn `mods.toml` add a dependency to the mod:\n```\nmodId=\"projectile_damage\"\nmandatory=true\nversionRange=\"[VERSION,)\"\nordering=\"AFTER\"\nside=\"BOTH\"\n```\n\n(Substitute `VERSION` with the name of the latest release available on [Modrinth](https://modrinth.com/mod/projectile-damage-attribute/versions), for example: `3.0.0`)\n\n## Applying projectile damage to weapons\n\n### Bows and Crossbows\n\n1. Make sure your custom Bow or Crossbow inherits from vanilla Bow or Crossbow classes.  \n\n2. Set the projectile damage for your weapon instance, preferably before registering it.\n(Keep in mind, this doesn't fixate the damage output at a constant value, the vanilla behaviour adding randomness will be applied too)  \n```java\n((IProjectileWeapon)bowInstance).setProjectileDamage(10);\n```\n\n(Note: assigned damage value will be applied on the spawned arrow by this mod, no additional coding is required on your end.)\n\n3. (Optional) If your weapon releases arrows at a **non default velocity**, use the following to **compensate** the velocity and make the weapon perform the expected amount of damage. (Default velocity: bow: 3.0, crossbow: 3.15).\n\n```java\n((IProjectileWeapon)bowInstance).setMaxProjectileVelocity(4.2);\n```\n\n### Custom weapon types\n\nCustom weapon types such as: canons, blowpipes, etc...\n\n1. Make sure the inheritance chain of your custom ranged weapon includes the vanilla class `ProjectileWeaponItem` (yarn:`RangedWeaponItem`) or provide a custom implementation of `net.projectile_damage.api.IProjectileWeapon` interface (default implementaion can be found [here](./common/src/main/java/net/projectile_damage/api/IProjectileWeapon.java)).\n\n2. Create a custom weapon type and save it somewhere. This holds the shared properties of your weapon class, which each instance will be scaled against.\n\n```java\npublic static class MyModItems {\n    static RangedWeaponKind CANON = RangedWeaponKind.custom(6, 1.9D);\n}\n```\n\n3. Configure your items.\n\n```java\npublic static class MyModItems {\n    static RangedWeaponKind CANNON = RangedWeaponKind.custom(6, 1.9D);\n    \n    public static MyCanon woodenCanon;\n    public static MyCanon ironCanon;\n    public static MyCanon diamondCanon;\n    \n    static {\n        woodenCannon = new MyCannon(...);\n        ((IProjectileWeapon)woodenCannon).setRangedWeaponKind(CANNON);\n        // No custom damage is configured, default will be used from weapon kind\n        \n        ironCannon = new MyCannon(...);\n        ((IProjectileWeapon)ironCannon).setRangedWeaponKind(CANNON);\n        ((IProjectileWeapon)ironCannon).setProjectileDamage(8);\n        \n        diamondCannon = new MyCannon(...);\n        ((IProjectileWeapon)diamondCannon).setRangedWeaponKind(CANNON);\n        ((IProjectileWeapon)ironCannon).setProjectileDamage(10);\n    } \n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzsoltmolnarrr%2Fprojectiledamage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzsoltmolnarrr%2Fprojectiledamage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzsoltmolnarrr%2Fprojectiledamage/lists"}