mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 19:05:16 +00:00
Player-fired entropic bursts now count as player kills
This commit is contained in:
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;
|
||||
|
||||
Reference in new issue
Block a user