-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Badtz
committed
Mar 5, 2024
1 parent
c9d6e7b
commit e796390
Showing
6 changed files
with
72 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package me.woach.bone.effects; | ||
|
||
import me.woach.bone.effects.bonetype.GenericBoneType; | ||
import net.minecraft.entity.Entity; | ||
import net.minecraft.entity.EquipmentSlot; | ||
import net.minecraft.entity.LivingEntity; | ||
import net.minecraft.entity.effect.StatusEffectInstance; | ||
import net.minecraft.entity.effect.StatusEffects; | ||
|
||
public class PoisonEffect extends BoneEffect { | ||
public PoisonEffect() { | ||
super(Rarity.RARE, new GenericBoneType(), EquipmentSlot.MAINHAND); | ||
} | ||
|
||
@Override | ||
public void onTargetDamaged(LivingEntity user, Entity target, int level) { | ||
if (target instanceof LivingEntity) { | ||
((LivingEntity) target) | ||
.addStatusEffect(new StatusEffectInstance(StatusEffects.POISON, (level + 1) * 20, level, | ||
false, true, false)); | ||
} | ||
super.onTargetDamaged(user, target, level); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package me.woach.bone.effects; | ||
|
||
import me.woach.bone.effects.bonetype.GenericBoneType; | ||
import net.minecraft.entity.Entity; | ||
import net.minecraft.entity.EquipmentSlot; | ||
import net.minecraft.entity.LivingEntity; | ||
import net.minecraft.entity.effect.StatusEffectInstance; | ||
import net.minecraft.entity.effect.StatusEffects; | ||
|
||
public class WitherEffect extends BoneEffect { | ||
public WitherEffect() { | ||
super(Rarity.RARE, new GenericBoneType(), EquipmentSlot.MAINHAND); | ||
} | ||
|
||
@Override | ||
public void onTargetDamaged(LivingEntity user, Entity target, int level) { | ||
if (target instanceof LivingEntity) { | ||
((LivingEntity) target) | ||
.addStatusEffect(new StatusEffectInstance(StatusEffects.WITHER, (level + 1) * 20, level, | ||
false, true, false)); | ||
} | ||
super.onTargetDamaged(user, target, level); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"enabled": true, | ||
"chance": 125, | ||
"effects": { | ||
"WEAPON": "bone:wither", | ||
"DIGGER": "bone:wither" | ||
}, | ||
"entity": "minecraft:wither_skeleton" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"enabled": true, | ||
"chance": 125, | ||
"effects": { | ||
"WEAPON": "bone:poison", | ||
"DIGGER": "bone:poison" | ||
}, | ||
"entity": "minecraft:zombie_villager" | ||
} |