From e9230f0832d963e5c5bdfdb2d8e6721d8e71b68a Mon Sep 17 00:00:00 2001 From: KeyLime17 Date: Fri, 9 May 2025 17:25:51 -0400 Subject: [PATCH] Corrected probabilities and thresholds for negative modifiers And weapons no longer check twice to obtain negatives --- .../com/zivilon/cinder_loe/CinderEventHandler.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/zivilon/cinder_loe/CinderEventHandler.java b/src/main/java/com/zivilon/cinder_loe/CinderEventHandler.java index 90629d6..0f6028d 100644 --- a/src/main/java/com/zivilon/cinder_loe/CinderEventHandler.java +++ b/src/main/java/com/zivilon/cinder_loe/CinderEventHandler.java @@ -243,7 +243,9 @@ public class CinderEventHandler implements IFuelHandler { } // Smithing Rework event handler - if (attacker instanceof EntityPlayerMP player) { + + //Removed, there is a handler for when you already attack, this is redundant + /*if (attacker instanceof EntityPlayerMP player) { ItemStack weapon = player.getHeldItem(); // smithing rework for melee if (weapon !=null && (weapon.getItem() instanceof LOTRItemSpear || weapon.getItem() instanceof LOTRItemSword || weapon.getItem() instanceof LOTRItemDagger || weapon.getItem() instanceof LOTRItemBattleaxe || weapon.getItem() instanceof LOTRItemHammer || weapon.getItem() instanceof ItemSword)) { @@ -260,12 +262,12 @@ public class CinderEventHandler implements IFuelHandler { } } } - } + }*/ if (entity instanceof EntityPlayerMP player) { // Durability thresholds and corresponding probabilities for adding a negative modifier - float[] durabilityThresholds = {0.6f, 0.5f, 0.4f}; - double[] probabilities = {0.02, 0.05, 0.1}; + float[] durabilityThresholds = {0.4f, 0.3f, 0.2f}; + double[] probabilities = {0.0005, 0.001, 0.005}; // Corrected probabilities for (int i = 0; i < 4; ++i) { ItemStack armor = player.getEquipmentInSlot(i + 1);