Player-fired entropic bursts now count as player kills

This commit is contained in:
Vincent Lee committed 2020-01-23 10:14:51 -06:00
1 parent ea0201ec0e
commit 947b591c9c
1 file changed
+5 -2
@@ -11,6 +11,7 @@
*/
package vazkii.botania.common.item.lens;
import net.minecraft.entity.Entity;
import net.minecraft.entity.projectile.ThrowableEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
@@ -25,9 +26,11 @@ public class LensExplosive extends Lens {
public boolean collideBurst(IManaBurst burst, ThrowableEntity entity, RayTraceResult pos, boolean isManaBlock, boolean dead, ItemStack stack) {
if(!entity.world.isRemote && !burst.isFake() && pos.getType() == RayTraceResult.Type.BLOCK) {
BlockPos coords = burst.getBurstSourceBlockPos();
if(!isManaBlock && !coords.equals(((BlockRayTraceResult) pos).getPos()))
entity.world.createExplosion(entity, entity.posX, entity.posY, entity.posZ,
if(!isManaBlock && !coords.equals(((BlockRayTraceResult) pos).getPos())) {
Entity cause = entity.getThrower() != null ? entity.getThrower() : entity;
entity.world.createExplosion(cause, entity.posX, entity.posY, entity.posZ,
burst.getMana() / 50F, Explosion.Mode.BREAK);
}
} else dead = false;
return dead;