Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.halestormxv.entity;
- import net.minecraft.entity.Entity;
- import net.minecraft.entity.EntityLivingBase;
- import net.minecraft.entity.projectile.EntityThrowable;
- import net.minecraft.util.MovingObjectPosition;
- import net.minecraft.world.World;
- public class EntityGrenade extends EntityThrowable{
- public EntityGrenade(World p_i1776_1_) {
- super(p_i1776_1_);
- // TODO Auto-generated constructor stub
- }
- public EntityGrenade(World world, EntityLivingBase entity){
- super(world, entity);
- }
- @Override
- protected void onImpact(MovingObjectPosition var1) {
- for(int i = 0; i < 10; i++){
- this.worldObj.spawnParticle("portal", this.posX, this.posY, this.posZ, 0.9F, 0.9F, 0.9F);
- }
- if(!this.worldObj.isRemote){
- this.setDead();
- if(!this.worldObj.isRemote){
- this.worldObj.createExplosion((Entity) null, this.posX, this.posY, this.posZ, 4.5F, true); //4.5F is explosion Strength
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement