diff --git a/assets/Data/entity/items/weapons.json b/assets/Data/entity/items/weapons.json index b115b0cd..2b56808b 100644 --- a/assets/Data/entity/items/weapons.json +++ b/assets/Data/entity/items/weapons.json @@ -174,6 +174,53 @@ "offsetZ" : 0 }, "iconPath" : "Textures/icons/itemIconWeapon.png" + }, + { + "id" : "Stone Axe", + "weaponData" : { + "weaponClass" : "sword1h", + "damage" : 7, + "weaponActionMovePenalty" : 0.3, + "hitboxes" : [ + { + "type": "hit_connected", + "radius": 0.06, + "offset": [0, 0, 0.37] + } + ] + }, + "equipData": { + "equipClass" : "weapon1H" + }, + "itemAudio": { + "uiGrabAudio" : "Audio/ui/items/specific/Pick Up Metal A.wav", + "uiReleaseAudio" : "Audio/ui/items/specific/Drop Metal A.wav" + }, + "tokens" : [ + "GRAVITY", + "MELEE", + "TARGETABLE", + "OUTLINE" + ], + "graphicsTemplate": { + "model": { + "path" : "Models/items/weapons/axe1.glb" + } + }, + "collidable": { + "type" : "CUBE", + "dimension1" : 0.04, + "dimension2" : 0.04, + "dimension3" : 0.8, + "rotX": 0, + "rotY": 0, + "rotZ": 0, + "rotW": 1, + "offsetX" : 0.0, + "offsetY" : 0.0, + "offsetZ" : 0.0 + }, + "iconPath" : "Textures/icons/itemIconItemGeneric.png" } diff --git a/assets/Models/items/weapons/axe.png b/assets/Models/items/weapons/axe.png new file mode 100644 index 00000000..250c9764 Binary files /dev/null and b/assets/Models/items/weapons/axe.png differ diff --git a/assets/Models/items/weapons/axe1.glb b/assets/Models/items/weapons/axe1.glb new file mode 100644 index 00000000..a37dd3e2 Binary files /dev/null and b/assets/Models/items/weapons/axe1.glb differ diff --git a/assets/Models/items/weapons/texturemap.json b/assets/Models/items/weapons/texturemap.json index fd8a4ac7..35e7e809 100644 --- a/assets/Models/items/weapons/texturemap.json +++ b/assets/Models/items/weapons/texturemap.json @@ -6,6 +6,13 @@ "diffuse" : "/Models/items/weapons/shovel1.png", "isDefault" : true } + ], + "Models/items/weapons/axe1.glb": [ + { + "meshName" : "Axe", + "diffuse" : "/Models/items/weapons/axe.png", + "isDefault" : true + } ] } } \ No newline at end of file diff --git a/docs/src/progress/renderertodo.md b/docs/src/progress/renderertodo.md index 503672b5..d31e733e 100644 --- a/docs/src/progress/renderertodo.md +++ b/docs/src/progress/renderertodo.md @@ -1447,6 +1447,9 @@ Harvest bushes kills them Fix harvest interaction targeting client player entity on server side Static rocks which harvest into rock items that spawn in forest +(04/05/2025) +Stone Axe item + diff --git a/src/main/java/electrosphere/game/data/collidable/HitboxData.java b/src/main/java/electrosphere/game/data/collidable/HitboxData.java index e115d666..f3c6b53c 100644 --- a/src/main/java/electrosphere/game/data/collidable/HitboxData.java +++ b/src/main/java/electrosphere/game/data/collidable/HitboxData.java @@ -10,56 +10,100 @@ import electrosphere.entity.Entity; */ public class HitboxData { - //a hitbox sphere that teleports to its new position between frames + /** + * A hitbox sphere that teleports to its new position between frames + */ public static final String HITBOX_TYPE_HIT = "hit"; - //a hurtbox sphere that teleports to its new position between frames + + /** + * A hurtbox sphere that teleports to its new position between frames + */ public static final String HITBOX_TYPE_HURT = "hurt"; - //a hitbox sphere that is connected to its previous position by a capsule. The capsule is used for collision checks + + /** + * A hitbox sphere that is connected to its previous position by a capsule. The capsule is used for collision checks + */ public static final String HITBOX_TYPE_HIT_CONNECTED = "hit_connected"; - //a hurtbox sphere that is connected to its previous position by a capsule. The capsule is used for collision checks + + /** + * A hurtbox sphere that is connected to its previous position by a capsule. The capsule is used for collision checks + */ public static final String HITBOX_TYPE_HURT_CONNECTED = "hurt_connected"; - //a block sphere that is connected to its previous position by a capsule. The capsule is used for collision checks + + /** + * A block sphere that is connected to its previous position by a capsule. The capsule is used for collision checks + */ public static final String HITBOX_TYPE_BLOCK_CONNECTED = "block_connected"; - //a hitbox with extra effect (ie more damage) + /** + * A hitbox with extra effect (ie more damage) + */ public static final String HITBOX_SUBTYPE_SWEET = "sweet"; - //a hitbox with normal effect + + /** + * A hitbox with normal effect + */ public static final String HITBOX_SUBTYPE_REUGLAR = "regular"; - //a hitbox with less effect (ie reduced damange) + + /** + * A hitbox with less effect (ie reduced damange) + */ public static final String HITBOX_SUBTYPE_SOUR = "sour"; - //used for debugging -- to show whether a hitbox is colliding with it or not + /** + * Used for debugging -- to show whether a hitbox is colliding with it or not + */ public static final String HITBOX_TYPE_STATIC_CAPSULE = "static_capsule"; - //the type of hitbox + /** + * The type of hitbox + */ String type; - //the subtype of hitbox (ie, sweetspot, sour spot, critical spot, armor spot, etc) + /** + * The subtype of hitbox (ie, sweetspot, sour spot, critical spot, armor spot, etc) + */ String subType; - //the bone it is attached to + /** + * The bone it is attached to + */ String bone; - //the radius of the hitbox + /** + * The radius of the hitbox + */ float radius; - //the length of a static capsule hitbox + /** + * The length of a static capsule hitbox + */ float length; - //controls whether the hitbox is active or not + /** + * Controls whether the hitbox is active or not + */ boolean active = false; - //override when block state is active. Used to make hitboxes function as blockboxes while blocking + /** + * Override when block state is active. Used to make hitboxes function as blockboxes while blocking + */ boolean blockOverride = false; - //used for more advanced hitbox spawning to find hitbox position on frame update + /** + * Used for more advanced hitbox spawning to find hitbox position on frame update + */ HitboxPositionCallback positionCallback; - //used to filter this hitbox to hitting only certain parent entities + /** + * Used to filter this hitbox to hitting only certain parent entities + */ List filter; - //The offset from the bone + /** + * The offset from the bone + */ List offset; /**