diff --git a/gradle.properties b/gradle.properties index 8c2cfa5b..3a84794a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,13 +7,13 @@ org.gradle.jvmargs=-Xmx1G loader_version=0.12.10 # Mod Properties - mod_version = 3.1.0 + mod_version = 3.1.1 maven_group = com.github.clevernucleus archives_base_name = playerex # Dependencies fabric_version=0.44.0+1.18 - dataattributes_version=1.1.3 + dataattributes_version=1.1.4 opc_version=0.0.1 cardinal_components_version=4.0.1 placeholder_api=1.1.3+1.17.1 diff --git a/src/main/java/com/github/clevernucleus/playerex/handler/EventHandler.java b/src/main/java/com/github/clevernucleus/playerex/handler/EventHandler.java index 2a935c30..f01bb2ae 100644 --- a/src/main/java/com/github/clevernucleus/playerex/handler/EventHandler.java +++ b/src/main/java/com/github/clevernucleus/playerex/handler/EventHandler.java @@ -68,93 +68,6 @@ public static float damageModified(final LivingEntity livingEntity, final Damage } return amount; - - /* - * We need a predicate for each *resistance/immunity* - * We have a registry of predicates and loop through those here - - if(origin instanceof PersistentProjectileEntity) { - // Piercing damage - } else if(origin instanceof LivingEntity) { - // We know it's a LivingEntity attacking us - // Now test *how* it's attacking us - - LivingEntity attacker = (LivingEntity)origin; - ItemStack weapon = attacker.getMainHandStack(); - - if(weapon != ItemStack.EMPTY) { - // Now we know what type of weapon it is - // Hence we can determine if it is: - // - Bludgeoning - // - Slashing - // - Piercing - - // Maybe we provide a percentage/weighted distribution of damage types instead of just returning one type - // Do we base this off of raw nbt from this itemstack or from a local item method that takes itemstack as a parameter - - } - } - - return original; // TODO resistances and amps - - /* - * Fire damage <- can do now - * - isFire() - * Freeze damage <- can do now also do we maybe want to dub this 'frost' instead of 'freeze'? - * - equals(FREEZE) - * Wither Damage <- can do now - * - equals(WITHER) - * Radiant Damage - * Poison Damage <- can do now - * - equals(POISON) - * Lightning <- can do now maybe - * - equals(LIGHTNING_BOLT) we would dub it as 'lightning damage' - * Bludgeoning (explosion damage?) - * Piercing - * Slashing - * Force? would this be like explosion damage? - * ... maybe some more ? we want d&d a theme ideally - * - * What we had before: - * Magic Damage Resistance (sucked and didn't work across mods very well, not to mention what do we do about potions). - * Also, what if we fire magic fireballs? are they magic damage or fire damage? I would say fire which is why this is a bad damage type. - * - * Fire Damage Resistance - * Freeze Damage Resistance - * Drowning Damage Resistance (what kind of damage type would this be thematically?) I think we just remove this one. - * Falling Damage Resistance (this is basically bludgeoning, but if we called it that would people know what that meant?) - * Wither Resistance - * - * - * - * So listing it on the resistances section (can really only justify 6, not including the empty space on the combat page): - * - * Also, do we say 'x Damage Resistance' or just 'x Resistance'? - * - * Fire Resistance - * Freeze/Frost/Cold Resistance - * Lightning Resistance - * Poison Resistance - * Wither Resistance - * Radiant Resistance - * - * - * We don't have anything we can do with Radiant damage yet, or ever in PlayerEx, so we need to think abut if we add it before - * we have an addon mod that uses it. Kind of the same deal with Lightning damage. - * - * Additionally, I think we'd rather have 5 attributes listed instead of 6 because it's just more aesthetically pleasing on the gui. - * Also, including Lifesteal and Attack Range (which is implemented in another mod) we have an ideal 3-4 slots to fill on combat page: - * Slashing Resistance - * Bludgeoning Resistance - * Piercing Resistance - * - * these would be ideal to put there. Unlike in dnd though we have a percentage reduction in damage instead of just 50%, else we could - * use simple booleans/DataTracker. - * - * Not quite sure yet on how I would mixin to these damage types to ensure that Magic damage is always differentiated into categories. - * Maybe we use Wrappers with static a static enum/get map? We input damage type and attacker/source and it returns our category. - * - */ } public static boolean onDamage(final LivingEntity livingEntity, final DamageSource source, final float original) { diff --git a/src/main/java/com/github/clevernucleus/playerex/mixin/PersistentProjectileEntityMixin.java b/src/main/java/com/github/clevernucleus/playerex/mixin/PersistentProjectileEntityMixin.java index 42b0f1b4..889a00c4 100644 --- a/src/main/java/com/github/clevernucleus/playerex/mixin/PersistentProjectileEntityMixin.java +++ b/src/main/java/com/github/clevernucleus/playerex/mixin/PersistentProjectileEntityMixin.java @@ -34,7 +34,7 @@ private void preOnEntityHit(EntityHitResult entityHitResult, CallbackInfo info) } } - @ModifyArg(method = "onEntityHit", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Entity;damage(Lnet/minecraft/entity/damage/DamageSource;F)Z"), index = 1) + @ModifyArg(method = "onEntityHit", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Entity;damage(Lnet/minecraft/entity/damage/DamageSource;F)Z"), index = -1) private float onDamage(float i) { PersistentProjectileEntity persistentProjectileEntity = (PersistentProjectileEntity)(Object)this; Entity owner = persistentProjectileEntity.getOwner(); diff --git a/src/main/resources/assets/playerex/textures/gui/gui.png b/src/main/resources/assets/playerex/textures/gui/gui.png index 7498f94b..11a2a8b0 100644 Binary files a/src/main/resources/assets/playerex/textures/gui/gui.png and b/src/main/resources/assets/playerex/textures/gui/gui.png differ diff --git a/src/main/resources/data/playerex/attributes/functions.json b/src/main/resources/data/playerex/attributes/functions.json index 799643e8..24439541 100644 --- a/src/main/resources/data/playerex/attributes/functions.json +++ b/src/main/resources/data/playerex/attributes/functions.json @@ -19,7 +19,6 @@ "playerex:intelligence": { "playerex:heal_amplification": 0.02, "playerex:ranged_crit_damage": 0.005, - "playerex:fire_resistance": 0.01, "playerex:wither_resistance": 0.01 }, "playerex:luckiness": { diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index bcc1fc4a..ffd7d9cf 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -6,7 +6,7 @@ "description": "Adds RPG style attributes to the game, and provides the player with a new levelling system.", "authors": [ "CleverNucleus", - "elhertz - spanish translation & helpful feature requests" + "elhertz - spanish translation and helpful feature requests" ], "contact": { "homepage": "https://www.curseforge.com/minecraft/mc-mods/playerex", @@ -41,7 +41,7 @@ "fabricloader": ">=0.12.10", "fabric": ">=0.44.0", "minecraft": "1.18.x", - "dataattributes": ">=1.1.2", + "dataattributes": ">=1.1.4", "cloth-config2": ">=6.0.0", "java": ">=17" }