Skip to content

Commit

Permalink
Fixed Killaura Projectiles not working
Browse files Browse the repository at this point in the history
  • Loading branch information
BleachDev committed Dec 19, 2021
1 parent 293d4fa commit 1827942
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/bleachhack/module/mods/Killaura.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.bleachhack.util.world.EntityUtils;
import org.bleachhack.util.world.WorldUtils;

import net.minecraft.entity.projectile.FireballEntity;
import net.minecraft.entity.projectile.AbstractFireballEntity;
import net.minecraft.entity.projectile.ShulkerBulletEntity;

import com.google.common.collect.Streams;
Expand Down Expand Up @@ -143,7 +143,7 @@ private List<Entity> getEntities() {
|| (EntityUtils.isMob(e) && getSetting(2).asToggle().state)
|| (EntityUtils.isAnimal(e) && getSetting(3).asToggle().state)
|| (e instanceof ArmorStandEntity && getSetting(4).asToggle().state)
|| ((e instanceof ShulkerBulletEntity || e instanceof FireballEntity) && getSetting(5).asToggle().state))
|| ((e instanceof ShulkerBulletEntity || e instanceof AbstractFireballEntity) && getSetting(5).asToggle().state))
.sorted(comparator)
.limit(getSetting(7).asToggle().state ? getSetting(7).asToggle().getChild(0).asSlider().getValueLong() : 1L)
.collect(Collectors.toList());
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/org/bleachhack/util/world/EntityUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import net.minecraft.entity.passive.PassiveEntity;
import net.minecraft.entity.passive.SnowGolemEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.projectile.AbstractFireballEntity;
import net.minecraft.entity.projectile.ShulkerBulletEntity;

public class EntityUtils {

Expand All @@ -46,7 +48,7 @@ public static boolean isOtherServerPlayer(Entity e) {
}

public static boolean isAttackable(Entity e, boolean ignoreFriends) {
return e instanceof LivingEntity
return (e instanceof LivingEntity || e instanceof ShulkerBulletEntity || e instanceof AbstractFireballEntity)
&& e.isAlive()
&& e != MinecraftClient.getInstance().player
&& !e.isConnectedThroughVehicle(MinecraftClient.getInstance().player)
Expand Down

0 comments on commit 1827942

Please sign in to comment.