Initial 1.11.2 update
This commit is contained in:
@@ -7,32 +7,34 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityArrowRain extends EntityMagicConstruct {
|
||||
|
||||
public EntityArrowRain(World par1World) {
|
||||
|
||||
public EntityArrowRain(World par1World){
|
||||
super(par1World);
|
||||
this.height = 3.0f;
|
||||
this.width = 5.0f;
|
||||
}
|
||||
|
||||
public EntityArrowRain(World world, double x, double y, double z, EntityLivingBase caster, int lifetime, float damageMultiplier) {
|
||||
|
||||
public EntityArrowRain(World world, double x, double y, double z, EntityLivingBase caster, int lifetime,
|
||||
float damageMultiplier){
|
||||
super(world, x, y, z, caster, lifetime, damageMultiplier);
|
||||
this.height = 3.0f;
|
||||
this.width = 5.0f;
|
||||
}
|
||||
|
||||
|
||||
public void onUpdate(){
|
||||
|
||||
|
||||
super.onUpdate();
|
||||
|
||||
if(!this.worldObj.isRemote){
|
||||
EntityTippedArrow arrow = new EntityTippedArrow(worldObj, this.posX + rand.nextDouble()*6 - 3, this.posY + rand.nextDouble()*4 - 2, this.posZ + rand.nextDouble()*6 - 3);
|
||||
|
||||
if(!this.world.isRemote){
|
||||
EntityTippedArrow arrow = new EntityTippedArrow(world, this.posX + rand.nextDouble() * 6 - 3,
|
||||
this.posY + rand.nextDouble() * 4 - 2, this.posZ + rand.nextDouble() * 6 - 3);
|
||||
arrow.motionX = Math.cos(Math.toRadians(this.rotationYaw + 90));
|
||||
arrow.motionY = -0.6;
|
||||
arrow.motionZ = Math.sin(Math.toRadians(this.rotationYaw + 90));
|
||||
arrow.shootingEntity = this.getCaster();
|
||||
arrow.setDamage(7.0d*damageMultiplier);
|
||||
arrow.setDamage(7.0d * damageMultiplier);
|
||||
arrow.setPotionEffect(new ItemStack(Items.ARROW));
|
||||
this.worldObj.spawnEntityInWorld(arrow);
|
||||
this.world.spawnEntity(arrow);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user