Fixed shockwave and infernal touch

This commit is contained in:
Auxilor 2021-02-23 19:10:47 +00:00
parent 0a35e86677
commit 8eef4b6449
2 changed files with 3 additions and 1 deletions

View File

@ -80,7 +80,7 @@ public class InfernalTouch extends EcoEnchant {
return;
}
if (event.getBlock().getState() instanceof Container) {
if (event.getBlockState() instanceof Container) {
return;
}

View File

@ -1,6 +1,7 @@
package com.willfp.ecoenchants.enchantments.ecoenchants.normal;
import com.willfp.eco.util.TridentUtils;
import com.willfp.eco.util.integrations.antigrief.AntigriefManager;
import com.willfp.ecoenchants.enchantments.EcoEnchant;
import com.willfp.ecoenchants.enchantments.EcoEnchants;
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
@ -61,6 +62,7 @@ public class Shockwave extends EcoEnchant {
.filter(entity1 -> entity1 instanceof LivingEntity)
.filter(entity1 -> entity1 != player)
.filter(entity1 -> !entity1.hasMetadata("shockwaved"))
.filter(entity1 -> AntigriefManager.canInjure(player, (LivingEntity) entity1))
.forEach((mob -> {
((LivingEntity) mob).damage(finalDamage, entity);
mob.setMetadata("shockwaved", this.getPlugin().getMetadataValueFactory().create(true));