0.16.5-hotfix1

This commit is contained in:
sainagh
2024-10-22 15:32:10 -07:00
parent 6a6a0ba4f0
commit 9a9983c59a
5001 changed files with 257651 additions and 10123 deletions
+19
View File
@@ -0,0 +1,19 @@
#reloadable
import crafttweaker.entity.IEntityLivingBase;
val HP_THRESHOLD = 100000;
events.onPlayerAttackEntity(function(event as crafttweaker.event.PlayerAttackEntityEvent) {
if ((isNull(event.player.currentItem))) {
return;
}
if (!((event.player.currentItem.matches(<bloodarsenal:glass_dagger_of_sacrifice>)) || (event.player.currentItem.matches(<bloodmagic:dagger_of_sacrifice>)))) {
return;
}
if (event.target instanceof IEntityLivingBase) {
val target as IEntityLivingBase = event.target;
if(target.maxHealth >= HP_THRESHOLD) {
event.cancel();
}
}
});