diff --git a/gradle.properties b/gradle.properties index 0a069f24..231cfb10 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ org.gradle.jvmargs=-Xmx2G loader_version=0.11.3 # Mod Properties - mod_version = 2.0.4 + mod_version = 2.0.5 maven_group = com.github.clevernucleus archives_base_name = playerex diff --git a/src/main/java/com/github/clevernucleus/playerex/client/gui/CombatPage.java b/src/main/java/com/github/clevernucleus/playerex/client/gui/CombatPage.java index 34a05208..8057e5db 100644 --- a/src/main/java/com/github/clevernucleus/playerex/client/gui/CombatPage.java +++ b/src/main/java/com/github/clevernucleus/playerex/client/gui/CombatPage.java @@ -115,7 +115,7 @@ private void meleeCritTT(MatrixStack matrices, int mouseX, int mouseY) { private void rangedCritTT(MatrixStack matrices, int mouseX, int mouseY) { List tooltip = new ArrayList(); - IPlayerAttribute attribute = PlayerAttributes.MELEE_CRIT_CHANCE.get(); + IPlayerAttribute attribute = PlayerAttributes.RANGED_CRIT_DAMAGE.get(); tooltip.add((new TranslatableText("gui.playerex.tooltip.ranged_crit_damage")).formatted(Formatting.GRAY)); 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 89dc9f8c..ea29a37c 100644 --- a/src/main/java/com/github/clevernucleus/playerex/handler/EventHandler.java +++ b/src/main/java/com/github/clevernucleus/playerex/handler/EventHandler.java @@ -182,9 +182,13 @@ public static void onArrowHit(ProjectileEntity projectile, Random rand) { PersistentProjectileEntity arrow = (PersistentProjectileEntity)projectile; + if(arrow.getOwner() == null) return; if(arrow.getOwner() instanceof PlayerEntity) { PlayerEntity player = (PlayerEntity)arrow.getOwner(); AttributeData data = ExAPI.DATA.get(player); + + if(player.world.isClient) return; + float critChance = (float)data.get(PlayerAttributes.RANGED_CRIT_CHANCE.get()); float critDamage = (float)data.get(PlayerAttributes.RANGED_CRIT_DAMAGE.get()); float nextDamage = (float)data.get(PlayerAttributes.RANGED_DAMAGE.get()); diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 001055c1..f2a5011d 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -1,7 +1,7 @@ { "schemaVersion": 1, "id": "playerex", - "version": "2.0.4", + "version": "2.0.5", "name": "PlayerEx", "description": "Implements a more detailed attributes system with an rpg theme.", "authors": [