That's one heck of a commit you've got there...

I may have got a bit behind with version control. A lot behind, in fact. Maybe I'll go back and split this sometime - then again, I probably won't. But hey, at least it's here!
This commit is contained in:
Electroblob77
2019-08-18 00:04:18 +01:00
parent 2680d02304
commit f37812be3e
1564 changed files with 47652 additions and 12984 deletions
@@ -1,17 +1,21 @@
package electroblob.wizardry.entity.construct;
import java.util.List;
import electroblob.wizardry.registry.Spells;
import electroblob.wizardry.registry.WizardrySounds;
import electroblob.wizardry.spell.Spell;
import electroblob.wizardry.util.MagicDamage;
import electroblob.wizardry.util.MagicDamage.DamageType;
import electroblob.wizardry.util.WizardryUtilities;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.init.SoundEvents;
import net.minecraft.util.DamageSource;
import net.minecraft.world.World;
import java.util.List;
public class EntityFireRing extends EntityMagicConstruct {
// TODO: Implement blast modifiers
public EntityFireRing(World world){
super(world);
this.height = 1.0f;
@@ -21,7 +25,7 @@ public class EntityFireRing extends EntityMagicConstruct {
public void onUpdate(){
if(this.ticksExisted % 40 == 1){
this.playSound(SoundEvents.BLOCK_FIRE_AMBIENT, 4.0f, 0.7f);
this.playSound(WizardrySounds.ENTITY_FIRE_RING_AMBIENT, 4.0f, 0.7f);
}
super.onUpdate();
@@ -41,14 +45,15 @@ public class EntityFireRing extends EntityMagicConstruct {
if(!MagicDamage.isEntityImmune(DamageType.FIRE, target)){
target.setFire(10);
target.setFire(Spells.ring_of_fire.getProperty(Spell.BURN_DURATION).intValue());
float damage = Spells.ring_of_fire.getProperty(Spell.DAMAGE).floatValue() * damageMultiplier;
if(this.getCaster() != null){
target.attackEntityFrom(
MagicDamage.causeIndirectMagicDamage(this, getCaster(), DamageType.FIRE),
1 * damageMultiplier);
target.attackEntityFrom(MagicDamage.causeIndirectMagicDamage(this, getCaster(),
DamageType.FIRE), damage);
}else{
target.attackEntityFrom(DamageSource.MAGIC, 1 * damageMultiplier);
target.attackEntityFrom(DamageSource.MAGIC, damage);
}
}