jeremium update

This commit is contained in:
RyanTLG
2022-04-11 14:52:24 +02:00
parent 04c7e396e4
commit 879271705a
16 changed files with 101 additions and 9 deletions

View File

@@ -2,6 +2,10 @@ package net.arcmods.ryantlg.customToolItemClasses.jeremium;
import java.util.List;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.effect.StatusEffectInstance;
import net.minecraft.entity.effect.StatusEffects;
import net.minecraft.client.item.TooltipContext;
import net.minecraft.item.ItemStack;
import net.minecraft.item.SwordItem;
@@ -18,5 +22,12 @@ public class JeremiumSwordItem extends SwordItem {
@Override
public void appendTooltip(ItemStack itemStack, World world, List<Text> tooltip, TooltipContext tooltipContext) {
tooltip.add( new TranslatableText("item.gamermod.jeremium_sword.tooltip").formatted(Formatting.DARK_PURPLE, Formatting.ITALIC) );
}
}
@Override
public boolean postHit(ItemStack stack, LivingEntity attackee, LivingEntity attacker) {
attackee.addStatusEffect(new StatusEffectInstance(StatusEffects.SLOWNESS, 200, 3), attacker);
return super.postHit(stack, attackee, attacker);
}
}

View File

@@ -18,5 +18,5 @@ public class OmniumSwordItem extends SwordItem {
@Override
public void appendTooltip(ItemStack itemStack, World world, List<Text> tooltip, TooltipContext tooltipContext) {
tooltip.add( new TranslatableText("item.gamermod.omnium_sword.tooltip").formatted(Formatting.DARK_PURPLE, Formatting.ITALIC) );
}
}
}