Initial 1.11.2 update

This commit is contained in:
Electroblob
2018-02-07 21:15:50 +00:00
parent 67f6be0671
commit 3df5597dcc
368 changed files with 17234 additions and 15082 deletions
@@ -25,13 +25,13 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class EntityShadowWraith extends EntitySummonedCreature implements ISpellCaster {
// TODO: This currently doesn't fly like it used to. Should it, or does it not matter?
private double AISpeed = 1.0;
private EntityAIAttackSpell spellAttackAI = new EntityAIAttackSpell(this, AISpeed, 15f, 30, 0);
private double AISpeed = 1.0;
private EntityAIAttackSpell spellAttackAI = new EntityAIAttackSpell(this, AISpeed, 15f, 30, 0);
private static final List<Spell> attack = Collections.singletonList(Spells.darkness_orb);
public EntityShadowWraith(World world){
@@ -41,24 +41,24 @@ public class EntityShadowWraith extends EntitySummonedCreature implements ISpell
public EntityShadowWraith(World world, double x, double y, double z, EntityLivingBase caster, int lifetime){
super(world, x, y, z, caster, lifetime);
// For some reason this can't be in initEntityAI
this.tasks.addTask(0, this.spellAttackAI);
this.tasks.addTask(0, this.spellAttackAI);
}
@Override
protected void initEntityAI(){
this.tasks.addTask(1, new EntityAIAttackMelee(this, AISpeed, false));
this.tasks.addTask(1, new EntityAIAttackMelee(this, AISpeed, false));
this.tasks.addTask(2, new EntityAIWander(this, AISpeed));
this.tasks.addTask(3, new EntityAILookIdle(this));
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget<EntityLivingBase>(this, EntityLivingBase.class,
0, false, true, this.getTargetSelector()));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget<EntityLivingBase>(this, EntityLivingBase.class,
0, false, true, this.getTargetSelector()));
this.setAIMoveSpeed((float)AISpeed);
this.setAIMoveSpeed((float)AISpeed);
}
@Override
public boolean hasRangedAttack() {
public boolean hasRangedAttack(){
return true;
}
@@ -85,32 +85,32 @@ public class EntityShadowWraith extends EntitySummonedCreature implements ISpell
@Override
protected void applyEntityAttributes(){
super.applyEntityAttributes();
this.getAttributeMap().registerAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(6.0D);
this.getAttributeMap().registerAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(6.0D);
this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(AISpeed);
this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(30.0D);
this.getEntityAttribute(SharedMonsterAttributes.FOLLOW_RANGE).setBaseValue(16.0D);
}
@Override
public boolean isPotionApplicable(PotionEffect potion){
return potion.getPotion() == MobEffects.WITHER ? false : super.isPotionApplicable(potion);
}
@Override
protected SoundEvent getAmbientSound(){
return SoundEvents.ENTITY_BLAZE_AMBIENT;
}
@Override
protected SoundEvent getAmbientSound(){
return SoundEvents.ENTITY_BLAZE_AMBIENT;
}
@Override
protected SoundEvent getHurtSound(){
return SoundEvents.ENTITY_BLAZE_HURT;
}
@Override
protected SoundEvent getHurtSound(){
return SoundEvents.ENTITY_BLAZE_HURT;
}
@Override
protected SoundEvent getDeathSound(){
return SoundEvents.ENTITY_BLAZE_DEATH;
}
@Override
protected SoundEvent getDeathSound(){
return SoundEvents.ENTITY_BLAZE_DEATH;
}
@Override
@SideOnly(Side.CLIENT)
public int getBrightnessForRender(float partialTicks){
@@ -124,10 +124,12 @@ public class EntityShadowWraith extends EntitySummonedCreature implements ISpell
@Override
public void onSpawn(){
if(this.worldObj.isRemote){
for(int i=0;i<15;i++){
float brightness = rand.nextFloat()*0.4f;
Wizardry.proxy.spawnParticle(WizardryParticleType.SPARKLE, worldObj, this.posX - 0.5d + rand.nextDouble(), this.posY + this.height/2 - 0.5d + rand.nextDouble(), this.posZ - 0.5d + rand.nextDouble(), 0, 0.05f, 0, 20 + rand.nextInt(10), brightness, 0.0f, brightness);
if(this.world.isRemote){
for(int i = 0; i < 15; i++){
float brightness = rand.nextFloat() * 0.4f;
Wizardry.proxy.spawnParticle(WizardryParticleType.SPARKLE, world, this.posX - 0.5d + rand.nextDouble(),
this.posY + this.height / 2 - 0.5d + rand.nextDouble(), this.posZ - 0.5d + rand.nextDouble(), 0,
0.05f, 0, 20 + rand.nextInt(10), brightness, 0.0f, brightness);
}
}
}
@@ -136,7 +138,8 @@ public class EntityShadowWraith extends EntitySummonedCreature implements ISpell
public void onLivingUpdate(){
if(this.rand.nextInt(24) == 0){
this.playSound(SoundEvents.BLOCK_PORTAL_AMBIENT, 1.0F + this.rand.nextFloat(), this.rand.nextFloat() * 0.7F + 0.3F);
this.playSound(SoundEvents.BLOCK_PORTAL_AMBIENT, 1.0F + this.rand.nextFloat(),
this.rand.nextFloat() * 0.7F + 0.3F);
}
// Slow fall
@@ -144,22 +147,36 @@ public class EntityShadowWraith extends EntitySummonedCreature implements ISpell
this.motionY *= 0.6D;
}
if(worldObj.isRemote){
for(int i=0; i<2; i++){
worldObj.spawnParticle(EnumParticleTypes.PORTAL, this.posX + (this.rand.nextDouble() - 0.5D) * (double)this.width, this.posY + this.rand.nextDouble() * (double)this.height, this.posZ + (this.rand.nextDouble() - 0.5D) * (double)this.width, 0, 0, 0);
worldObj.spawnParticle(EnumParticleTypes.SMOKE_LARGE, this.posX + (this.rand.nextDouble() - 0.5D) * (double)this.width, this.posY + this.rand.nextDouble() * (double)this.height, this.posZ + (this.rand.nextDouble() - 0.5D) * (double)this.width, 0, 0, 0);
float brightness = rand.nextFloat()*0.2f;
Wizardry.proxy.spawnParticle(WizardryParticleType.SPARKLE, worldObj, this.posX + (this.rand.nextDouble() - 0.5D) * (double)this.width, this.posY + this.rand.nextDouble() * (double)this.height, this.posZ + (this.rand.nextDouble() - 0.5D) * (double)this.width, 0, 0.05f, 0, 20 + rand.nextInt(10), brightness, 0.0f, brightness);
Wizardry.proxy.spawnParticle(WizardryParticleType.DARK_MAGIC, worldObj, this.posX + (this.rand.nextDouble() - 0.5D) * (double)this.width, this.posY + this.rand.nextDouble() * (double)this.height, this.posZ + (this.rand.nextDouble() - 0.5D) * (double)this.width, 0.0d, 0.0d, 0.0d, 0, 0.1f, 0.0f, 0.0f);
if(world.isRemote){
for(int i = 0; i < 2; i++){
world.spawnParticle(EnumParticleTypes.PORTAL,
this.posX + (this.rand.nextDouble() - 0.5D) * (double)this.width,
this.posY + this.rand.nextDouble() * (double)this.height,
this.posZ + (this.rand.nextDouble() - 0.5D) * (double)this.width, 0, 0, 0);
world.spawnParticle(EnumParticleTypes.SMOKE_LARGE,
this.posX + (this.rand.nextDouble() - 0.5D) * (double)this.width,
this.posY + this.rand.nextDouble() * (double)this.height,
this.posZ + (this.rand.nextDouble() - 0.5D) * (double)this.width, 0, 0, 0);
float brightness = rand.nextFloat() * 0.2f;
Wizardry.proxy.spawnParticle(WizardryParticleType.SPARKLE, world,
this.posX + (this.rand.nextDouble() - 0.5D) * (double)this.width,
this.posY + this.rand.nextDouble() * (double)this.height,
this.posZ + (this.rand.nextDouble() - 0.5D) * (double)this.width, 0, 0.05f, 0,
20 + rand.nextInt(10), brightness, 0.0f, brightness);
Wizardry.proxy.spawnParticle(WizardryParticleType.DARK_MAGIC, world,
this.posX + (this.rand.nextDouble() - 0.5D) * (double)this.width,
this.posY + this.rand.nextDouble() * (double)this.height,
this.posZ + (this.rand.nextDouble() - 0.5D) * (double)this.width, 0.0d, 0.0d, 0.0d, 0, 0.1f,
0.0f, 0.0f);
}
}
super.onLivingUpdate();
}
@Override
public void fall(float distance, float damageMultiplier){
// Immune to fall damage.
}
}