|
6 | 6 | import com.hollingsworth.arsnouveau.api.spell.SpellContext; |
7 | 7 | import com.mystchonky.tomeofblood.TomeOfBlood; |
8 | 8 | import com.mystchonky.tomeofblood.client.ClientInfo; |
9 | | -import com.mystchonky.tomeofblood.common.config.BaseConfig; |
10 | | -import com.mystchonky.tomeofblood.common.items.LivingMageArmorItem; |
11 | 9 | import com.mystchonky.tomeofblood.common.registry.LivingUpgradeRegistry; |
12 | 10 | import com.mystchonky.tomeofblood.common.registry.MobEffectRegistry; |
13 | | -import net.minecraft.world.entity.EquipmentSlot; |
14 | 11 | import net.minecraft.world.entity.player.Player; |
15 | 12 | import net.minecraftforge.event.TickEvent; |
16 | 13 | import net.minecraftforge.eventbus.api.SubscribeEvent; |
17 | 14 | import net.minecraftforge.fml.common.Mod; |
18 | 15 | import wayoftime.bloodmagic.core.living.LivingStats; |
19 | 16 | import wayoftime.bloodmagic.core.living.LivingUtil; |
20 | | -import wayoftime.bloodmagic.event.LivingEquipmentEvent; |
21 | 17 | import wayoftime.bloodmagic.event.SacrificeKnifeUsedEvent; |
22 | 18 |
|
23 | 19 | import static com.hollingsworth.arsnouveau.api.util.ManaUtil.getPlayerDiscounts; |
@@ -45,20 +41,12 @@ public static void spellDiscount(SpellCostCalcEvent event) { |
45 | 41 | LivingStats stats = LivingStats.fromPlayer(player); |
46 | 42 | int level = stats.getLevel(LivingUpgradeRegistry.MANA_UPGRADE.getKey()); |
47 | 43 | double discount = level * 0.05; |
48 | | - event.currentCost *= (int) (1 - discount); |
| 44 | + event.currentCost = (int) ((1 - discount) * event.currentCost); |
49 | 45 | } |
50 | 46 | } |
51 | 47 |
|
52 | 48 | } |
53 | 49 |
|
54 | | - // LivingMageArmor trains slower than Normal living armor |
55 | | - @SubscribeEvent |
56 | | - public static void reduceExpGain(LivingEquipmentEvent.GainExperience event) { |
57 | | - if (event.getPlayer().getItemBySlot(EquipmentSlot.CHEST).getItem() instanceof LivingMageArmorItem) { |
58 | | - event.setExperience(event.getExperience() * BaseConfig.COMMON.LIVING_MAGE_SCALE.get()); |
59 | | - } |
60 | | - } |
61 | | - |
62 | 50 | @SubscribeEvent |
63 | 51 | public static void awardXPForSpellCast(SpellCastEvent event) { |
64 | 52 | if (event.context.getUnwrappedCaster() instanceof Player player) { |
|
0 commit comments