diff --git a/gradle.properties b/gradle.properties index 502bb37b8..f6484e9d3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -35,6 +35,6 @@ modAuthors=Sammy Semicolon # The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list. modDescription=A dark magic mod focused on soul and spirit magic. # Mod Dependency Versions -lodestoneVersion=1.4.2.36 +lodestoneVersion=1.4.2.37 jeiVersion=15.2.0.22 curiosVersion=5.4.0+1.20.1 \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/effect/WickedIntentEffect.java b/src/main/java/com/sammy/malum/common/effect/WickedIntentEffect.java index 89bc3bc6a..e50f23925 100644 --- a/src/main/java/com/sammy/malum/common/effect/WickedIntentEffect.java +++ b/src/main/java/com/sammy/malum/common/effect/WickedIntentEffect.java @@ -15,6 +15,7 @@ import net.minecraft.world.level.Level; import net.minecraftforge.event.entity.living.LivingDamageEvent; import team.lodestar.lodestone.helpers.ColorHelper; +import team.lodestar.lodestone.registry.common.tag.*; public class WickedIntentEffect extends MobEffect { public WickedIntentEffect() { @@ -24,7 +25,7 @@ public WickedIntentEffect() { public static void removeWickedIntent(LivingDamageEvent event) { DamageSource source = event.getSource(); - if (source.is(DamageTypes.MAGIC) || (source.is(DamageTypes.THORNS))) { + if (source.is(LodestoneDamageTypeTags.IS_MAGIC) || (source.is(DamageTypes.THORNS))) { return; } if (source.getEntity() instanceof LivingEntity livingEntity) { diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/soulward/CurioMagebaneBelt.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/soulward/CurioMagebaneBelt.java index 88f12cc8c..0c393be19 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/soulward/CurioMagebaneBelt.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/soulward/CurioMagebaneBelt.java @@ -13,6 +13,7 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraftforge.event.entity.living.LivingHurtEvent; +import team.lodestar.lodestone.registry.common.tag.*; import top.theillusivec4.curios.api.SlotContext; public class CurioMagebaneBelt extends MalumCurioItem implements IMalumEventResponderItem { @@ -26,7 +27,7 @@ public void onSoulwardAbsorbDamage(LivingHurtEvent event, Player wardedPlayer, I DamageSource source = event.getSource(); if (source.getEntity() != null) { if (true) { - if (source.is(DamageTypes.MAGIC) && !source.is(DamageTypes.THORNS)) { + if (source.is(LodestoneDamageTypeTags.IS_MAGIC) && !source.is(DamageTypes.THORNS)) { SoulWardHandler handler = MalumPlayerDataCapability.getCapability(wardedPlayer).soulWardHandler; handler.soulWardProgress = 0; } diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/weapons/MalumScytheItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/weapons/MalumScytheItem.java index 93ecef33b..39b444a26 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/weapons/MalumScytheItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/weapons/MalumScytheItem.java @@ -21,6 +21,7 @@ import net.minecraft.world.item.enchantment.Enchantments; import net.minecraftforge.event.entity.living.LivingHurtEvent; import team.lodestar.lodestone.helpers.CurioHelper; +import team.lodestar.lodestone.registry.common.tag.*; import team.lodestar.lodestone.systems.item.ModCombatItem; public class MalumScytheItem extends ModCombatItem implements IMalumEventResponderItem { @@ -45,7 +46,7 @@ public void hurtEvent(LivingHurtEvent event, LivingEntity attacker, LivingEntity attacker.level().playSound(null, target.getX(), target.getY(), target.getZ(), sound, attacker.getSoundSource(), 1, 1); } - if (!canSweep || event.getSource().is(DamageTypes.MAGIC) || event.getSource().getMsgId().equals(DamageSourceRegistry.SCYTHE_SWEEP_IDENTIFIER)) { + if (!canSweep || event.getSource().is(LodestoneDamageTypeTags.IS_MAGIC) || event.getSource().getMsgId().equals(DamageSourceRegistry.SCYTHE_SWEEP_IDENTIFIER)) { return; } int level = EnchantmentHelper.getEnchantmentLevel(Enchantments.SWEEPING_EDGE, attacker); diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/weapons/unique/TyrvingItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/weapons/unique/TyrvingItem.java index 45adaa9da..4a14b92e5 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/weapons/unique/TyrvingItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/weapons/unique/TyrvingItem.java @@ -16,6 +16,7 @@ import net.minecraftforge.common.ToolActions; import net.minecraftforge.event.entity.living.LivingHurtEvent; import net.minecraftforge.network.PacketDistributor; +import team.lodestar.lodestone.registry.common.tag.*; import team.lodestar.lodestone.systems.item.tools.LodestoneSwordItem; import static com.sammy.malum.registry.common.PacketRegistry.MALUM_CHANNEL; @@ -27,7 +28,7 @@ public TyrvingItem(Tier material, int attackDamage, float attackSpeed, Propertie @Override public void hurtEvent(LivingHurtEvent event, LivingEntity attacker, LivingEntity target, ItemStack stack) { - if (event.getSource().is(DamageTypes.MAGIC)) { + if (event.getSource().is(LodestoneDamageTypeTags.IS_MAGIC)) { return; } if (attacker.level() instanceof ServerLevel) { diff --git a/src/main/java/com/sammy/malum/core/handlers/MalumAttributeEventHandler.java b/src/main/java/com/sammy/malum/core/handlers/MalumAttributeEventHandler.java index 18ccf9c8c..07e774bb4 100644 --- a/src/main/java/com/sammy/malum/core/handlers/MalumAttributeEventHandler.java +++ b/src/main/java/com/sammy/malum/core/handlers/MalumAttributeEventHandler.java @@ -8,6 +8,7 @@ import net.minecraft.world.entity.ai.attributes.AttributeInstance; import net.minecraft.world.item.ItemStack; import net.minecraftforge.event.entity.living.LivingHurtEvent; +import team.lodestar.lodestone.registry.common.tag.*; public class MalumAttributeEventHandler { public static void processAttributes(LivingHurtEvent event) { @@ -21,12 +22,10 @@ public static void processAttributes(LivingHurtEvent event) { if (stack.isEmpty()) { return; } - if (true) { - if (source.is(DamageTypes.THORNS)) { - return; - } + if (source.is(DamageTypes.THORNS)) { + return; } - if (!event.getSource().is(DamageTypes.MAGIC)) { + if (!event.getSource().is(LodestoneDamageTypeTags.IS_MAGIC)) { AttributeInstance scytheProficiency = attacker.getAttribute(AttributeRegistry.SCYTHE_PROFICIENCY.get()); if (scytheProficiency != null && scytheProficiency.getValue() > 0) { event.setAmount((float) (amount + scytheProficiency.getValue() * 0.5f)); diff --git a/src/main/java/com/sammy/malum/core/handlers/SoulWardHandler.java b/src/main/java/com/sammy/malum/core/handlers/SoulWardHandler.java index 11494342b..a21a10415 100644 --- a/src/main/java/com/sammy/malum/core/handlers/SoulWardHandler.java +++ b/src/main/java/com/sammy/malum/core/handlers/SoulWardHandler.java @@ -30,6 +30,7 @@ import team.lodestar.lodestone.helpers.ItemHelper; import team.lodestar.lodestone.registry.client.*; import team.lodestar.lodestone.registry.common.particle.*; +import team.lodestar.lodestone.registry.common.tag.*; import team.lodestar.lodestone.systems.particle.builder.ScreenParticleBuilder; import team.lodestar.lodestone.systems.particle.data.GenericParticleData; import team.lodestar.lodestone.systems.particle.data.color.ColorParticleData; @@ -92,7 +93,7 @@ public static void shieldPlayer(LivingHurtEvent event) { DamageSource source = event.getSource(); float amount = event.getAmount(); - float multiplier = source.is(DamageTypes.MAGIC) ? CommonConfig.SOUL_WARD_MAGIC.getConfigValue().floatValue() : CommonConfig.SOUL_WARD_PHYSICAL.getConfigValue().floatValue(); + float multiplier = source.is(LodestoneDamageTypeTags.IS_MAGIC) ? CommonConfig.SOUL_WARD_MAGIC.getConfigValue().floatValue() : CommonConfig.SOUL_WARD_PHYSICAL.getConfigValue().floatValue(); for (ItemStack s : ItemHelper.getEventResponders(player)) { if (s.getItem() instanceof IMalumEventResponderItem eventItem) {