diff --git a/gradle.properties b/gradle.properties index 1386dcf..cc53ec7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -33,7 +33,7 @@ mod_id=avaritia mod_name=Re-Avaritia-forged mod_license=MIT mod_version=1.3.9.0 -mod_version_tag=alpha1 +mod_version_tag=alpha2 mod_group_id=committee.nova.mods mod_authors=cnlimiter, Asek3, MikhailTapio mod_description=Are you the type of modded Minecraft player that makes a beeline for the designated \"end game\" and then gives up on ever playing again once you get there? Do you wish there was a way to make the process take significantly longer? Do you love GregTech, but wish it weren't so short? Do you sit down on your chest full of Galgadorian Drills and wish there was a mod that didn't just hand things to you on a silver platter?\n\n \n\nThis might be the mod for you! diff --git a/src/main/java/committee/nova/mods/avaritia/common/item/tools/blaze/BlazeSwordItem.java b/src/main/java/committee/nova/mods/avaritia/common/item/tools/blaze/BlazeSwordItem.java index 5d11093..df0f432 100644 --- a/src/main/java/committee/nova/mods/avaritia/common/item/tools/blaze/BlazeSwordItem.java +++ b/src/main/java/committee/nova/mods/avaritia/common/item/tools/blaze/BlazeSwordItem.java @@ -13,6 +13,7 @@ import net.minecraft.sounds.SoundSource; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.SwordItem; @@ -34,7 +35,7 @@ public class BlazeSwordItem extends SwordItem implements ITooltip, ISwitchable, InitEnchantItem { private final String name; public BlazeSwordItem(String name) { - super(ModToolTiers.BLAZE_SWORD, 0, -2.4f, + super(ModToolTiers.BLAZE_SWORD, 0, 0f, new Properties() .rarity(ModRarities.EPIC) .stacksTo(1) @@ -76,4 +77,11 @@ public void appendHoverText(@NotNull ItemStack stack, @Nullable Level level, Lis level.playSound(player, player.getOnPos(), SoundEvents.SNOWBALL_THROW, SoundSource.NEUTRAL, 0.5F, 0.4F / (level.random.nextFloat() * 0.4F + 0.8F)); return InteractionResultHolder.success(heldItem); } + + @Override + public boolean onLeftClickEntity(ItemStack stack, Player player, Entity entity) { + entity.setInvulnerable(false); + return super.onLeftClickEntity(stack, player, entity); + } + } diff --git a/src/main/java/committee/nova/mods/avaritia/common/item/tools/crystal/CrystalSwordItem.java b/src/main/java/committee/nova/mods/avaritia/common/item/tools/crystal/CrystalSwordItem.java index 4170add..4f5abb0 100644 --- a/src/main/java/committee/nova/mods/avaritia/common/item/tools/crystal/CrystalSwordItem.java +++ b/src/main/java/committee/nova/mods/avaritia/common/item/tools/crystal/CrystalSwordItem.java @@ -51,6 +51,7 @@ public boolean onLeftClickEntity(ItemStack stack, Player player, Entity entity) // 取消攻击冷却 serverPlayer.resetAttackStrengthTicker(); } + entity.setInvulnerable(false); return super.onLeftClickEntity(stack, player, entity); }