This commit is contained in:
@@ -24,7 +24,7 @@ public record CripplingEnchantmentEffect(LevelBasedValue duration) implements En
|
|||||||
public void apply(ServerLevel world, int level, EnchantedItemInUse context, Entity target, Vec3 pos) {
|
public void apply(ServerLevel world, int level, EnchantedItemInUse context, Entity target, Vec3 pos) {
|
||||||
if (target instanceof LivingEntity victim) {
|
if (target instanceof LivingEntity victim) {
|
||||||
if (context.owner() != null && context.owner() instanceof Player player) {
|
if (context.owner() != null && context.owner() instanceof Player player) {
|
||||||
int Duration = (int) (this.duration.calculate(level) * 40); // Convert to ticks
|
int Duration = (int) (this.duration.calculate(level) * 50); // Convert to ticks
|
||||||
victim.addEffect(new MobEffectInstance(
|
victim.addEffect(new MobEffectInstance(
|
||||||
MobEffects.SLOWNESS,
|
MobEffects.SLOWNESS,
|
||||||
Duration,
|
Duration,
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public record PoisonEnchantmentEffect(LevelBasedValue duration) implements Encha
|
|||||||
public void apply(ServerLevel world, int level, EnchantedItemInUse context, Entity target, Vec3 pos) {
|
public void apply(ServerLevel world, int level, EnchantedItemInUse context, Entity target, Vec3 pos) {
|
||||||
if (target instanceof LivingEntity victim) {
|
if (target instanceof LivingEntity victim) {
|
||||||
if (context.owner() != null && context.owner() instanceof Player player) {
|
if (context.owner() != null && context.owner() instanceof Player player) {
|
||||||
int poisonDuration = (int) (this.duration.calculate(level) * 40); // Convert to ticks
|
int poisonDuration = (int) (this.duration.calculate(level) * 50); // Convert to ticks
|
||||||
|
|
||||||
victim.addEffect(new MobEffectInstance(
|
victim.addEffect(new MobEffectInstance(
|
||||||
MobEffects.POISON,
|
MobEffects.POISON,
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public record WitheringEnchantmentEffect(LevelBasedValue duration) implements En
|
|||||||
public void apply(ServerLevel world, int level, EnchantedItemInUse context, Entity target, Vec3 pos) {
|
public void apply(ServerLevel world, int level, EnchantedItemInUse context, Entity target, Vec3 pos) {
|
||||||
if (target instanceof LivingEntity victim) {
|
if (target instanceof LivingEntity victim) {
|
||||||
if (context.owner() != null && context.owner() instanceof Player player) {
|
if (context.owner() != null && context.owner() instanceof Player player) {
|
||||||
int witherDuration = (int) (this.duration.calculate(level) * 40); // Convert to ticks
|
int witherDuration = (int) (this.duration.calculate(level) * 50); // Convert to ticks
|
||||||
|
|
||||||
victim.addEffect(new MobEffectInstance(
|
victim.addEffect(new MobEffectInstance(
|
||||||
MobEffects.WITHER,
|
MobEffects.WITHER,
|
||||||
|
|||||||
Reference in New Issue
Block a user