Added Guardians
This commit is contained in:
parent
a2b0f59765
commit
08a8f1dc13
23 changed files with 618 additions and 65 deletions
|
@ -4,6 +4,11 @@ import net.minecraft.world.World;
|
|||
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGrunt;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntEarth;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntFire;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntGuardian;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntGuardianEarth;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntGuardianFire;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntGuardianIce;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntGuardianWind;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntIce;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntWind;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal;
|
||||
|
@ -26,26 +31,58 @@ public class DemonPacketMinorGrunt extends DemonHoardPacket
|
|||
public int summonDemons(TEDemonPortal teDemonPortal, World world, int x, int y, int z, DemonType type, int tier, boolean spawnGuardian)
|
||||
{
|
||||
EntityMinorDemonGrunt entity;
|
||||
|
||||
switch(type)
|
||||
|
||||
{
|
||||
case FIRE:
|
||||
entity = new EntityMinorDemonGruntFire(world);
|
||||
break;
|
||||
case ICE:
|
||||
entity = new EntityMinorDemonGruntIce(world);
|
||||
break;
|
||||
case WATER:
|
||||
entity = new EntityMinorDemonGruntEarth(world);
|
||||
break;
|
||||
case WIND:
|
||||
entity = new EntityMinorDemonGruntWind(world);
|
||||
break;
|
||||
case NORMAL:
|
||||
default:
|
||||
entity = new EntityMinorDemonGrunt(world);
|
||||
break;
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case FIRE:
|
||||
if(spawnGuardian)
|
||||
{
|
||||
entity = new EntityMinorDemonGruntGuardianFire(world);
|
||||
}else
|
||||
{
|
||||
entity = new EntityMinorDemonGruntFire(world);
|
||||
}
|
||||
break;
|
||||
case ICE:
|
||||
if(spawnGuardian)
|
||||
{
|
||||
entity = new EntityMinorDemonGruntGuardianIce(world);
|
||||
}else
|
||||
{
|
||||
entity = new EntityMinorDemonGruntIce(world);
|
||||
}
|
||||
break;
|
||||
case EARTH:
|
||||
if(spawnGuardian)
|
||||
{
|
||||
entity = new EntityMinorDemonGruntGuardianEarth(world);
|
||||
}else
|
||||
{
|
||||
entity = new EntityMinorDemonGruntEarth(world);
|
||||
}
|
||||
break;
|
||||
case WIND:
|
||||
if(spawnGuardian)
|
||||
{
|
||||
entity = new EntityMinorDemonGruntGuardianWind(world);
|
||||
}else
|
||||
{
|
||||
entity = new EntityMinorDemonGruntWind(world);
|
||||
}
|
||||
break;
|
||||
case NORMAL:
|
||||
default:
|
||||
if(spawnGuardian)
|
||||
{
|
||||
entity = new EntityMinorDemonGruntGuardian(world);
|
||||
}else
|
||||
{
|
||||
entity = new EntityMinorDemonGrunt(world);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
entity.setPosition(x, y, z);
|
||||
|
|
|
@ -4,7 +4,7 @@ public enum DemonType
|
|||
{
|
||||
NORMAL,
|
||||
FIRE,
|
||||
WATER,
|
||||
EARTH,
|
||||
ICE,
|
||||
WIND
|
||||
}
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityMinorDemonGruntGuardian extends EntityMinorDemonGrunt
|
||||
{
|
||||
public EntityMinorDemonGruntGuardian(World par1World)
|
||||
{
|
||||
super(par1World);
|
||||
this.setDemonID(AlchemicalWizardry.entityMinorDemonGruntGuardianID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean attackEntityAsMob(Entity par1Entity)
|
||||
{
|
||||
int i = this.isTamed() ? 25 : 25;
|
||||
|
||||
if(par1Entity instanceof IHoardDemon && ((IHoardDemon) par1Entity).isSamePortal(this))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attack the specified entity using a ranged attack.
|
||||
*/
|
||||
@Override
|
||||
public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2)
|
||||
{
|
||||
if(par1EntityLivingBase instanceof IHoardDemon && ((IHoardDemon) par1EntityLivingBase).isSamePortal(this))
|
||||
{
|
||||
return;
|
||||
}
|
||||
double xCoord;
|
||||
double yCoord;
|
||||
double zCoord;
|
||||
HolyProjectile hol = new HolyProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 20, 600);
|
||||
this.worldObj.spawnEntityInWorld(hol);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.ExplosionProjectile;
|
||||
|
||||
public class EntityMinorDemonGruntGuardianEarth extends EntityMinorDemonGruntGuardian
|
||||
{
|
||||
public EntityMinorDemonGruntGuardianEarth(World par1World)
|
||||
{
|
||||
super(par1World);
|
||||
this.setDemonID(AlchemicalWizardry.entityMinorDemonGruntGuardianEarthID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean attackEntityAsMob(Entity par1Entity)
|
||||
{
|
||||
int i = this.isTamed() ? 25 : 25;
|
||||
|
||||
if(par1Entity instanceof IHoardDemon && ((IHoardDemon) par1Entity).isSamePortal(this))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(par1Entity instanceof EntityLivingBase)
|
||||
{
|
||||
((EntityLivingBase) par1Entity).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 200, 4));
|
||||
}
|
||||
|
||||
return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attack the specified entity using a ranged attack.
|
||||
*/
|
||||
@Override
|
||||
public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2)
|
||||
{
|
||||
if(par1EntityLivingBase instanceof IHoardDemon && ((IHoardDemon) par1EntityLivingBase).isSamePortal(this))
|
||||
{
|
||||
return;
|
||||
}
|
||||
double xCoord;
|
||||
double yCoord;
|
||||
double zCoord;
|
||||
ExplosionProjectile hol = new ExplosionProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 20, 600, false);
|
||||
this.worldObj.spawnEntityInWorld(hol);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile;
|
||||
|
||||
public class EntityMinorDemonGruntGuardianFire extends EntityMinorDemonGruntGuardian
|
||||
{
|
||||
public EntityMinorDemonGruntGuardianFire(World par1World)
|
||||
{
|
||||
super(par1World);
|
||||
this.setDemonID(AlchemicalWizardry.entityMinorDemonGruntGuardianFireID);
|
||||
this.isImmuneToFire = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean attackEntityAsMob(Entity par1Entity)
|
||||
{
|
||||
int i = this.isTamed() ? 25 : 25;
|
||||
|
||||
if(par1Entity instanceof IHoardDemon && ((IHoardDemon) par1Entity).isSamePortal(this))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
par1Entity.setFire(15);
|
||||
|
||||
return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attack the specified entity using a ranged attack.
|
||||
*/
|
||||
@Override
|
||||
public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2)
|
||||
{
|
||||
if(par1EntityLivingBase instanceof IHoardDemon && ((IHoardDemon) par1EntityLivingBase).isSamePortal(this))
|
||||
{
|
||||
return;
|
||||
}
|
||||
double xCoord;
|
||||
double yCoord;
|
||||
double zCoord;
|
||||
FireProjectile hol = new FireProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 20, 600);
|
||||
this.worldObj.spawnEntityInWorld(hol);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile;
|
||||
|
||||
public class EntityMinorDemonGruntGuardianIce extends EntityMinorDemonGruntGuardian
|
||||
{
|
||||
public EntityMinorDemonGruntGuardianIce(World par1World)
|
||||
{
|
||||
super(par1World);
|
||||
this.setDemonID(AlchemicalWizardry.entityMinorDemonGruntGuardianIceID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean attackEntityAsMob(Entity par1Entity)
|
||||
{
|
||||
int i = this.isTamed() ? 25 : 25;
|
||||
|
||||
if(par1Entity instanceof IHoardDemon && ((IHoardDemon) par1Entity).isSamePortal(this))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attack the specified entity using a ranged attack.
|
||||
*/
|
||||
@Override
|
||||
public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2)
|
||||
{
|
||||
if(par1EntityLivingBase instanceof IHoardDemon && ((IHoardDemon) par1EntityLivingBase).isSamePortal(this))
|
||||
{
|
||||
return;
|
||||
}
|
||||
double xCoord;
|
||||
double yCoord;
|
||||
double zCoord;
|
||||
IceProjectile hol = new IceProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 20, 600);
|
||||
this.worldObj.spawnEntityInWorld(hol);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
package WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class EntityMinorDemonGruntGuardianWind extends EntityMinorDemonGruntGuardian
|
||||
{
|
||||
public EntityMinorDemonGruntGuardianWind(World par1World)
|
||||
{
|
||||
super(par1World);
|
||||
this.setDemonID(AlchemicalWizardry.entityMinorDemonGruntGuardianWindID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean attackEntityAsMob(Entity par1Entity)
|
||||
{
|
||||
int i = this.isTamed() ? 25 : 25;
|
||||
|
||||
if(par1Entity instanceof IHoardDemon && ((IHoardDemon) par1Entity).isSamePortal(this))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (par1Entity instanceof EntityPlayer)
|
||||
{
|
||||
SpellHelper.setPlayerSpeedFromServer((EntityPlayer) par1Entity, par1Entity.motionX, par1Entity.motionY + 4, par1Entity.motionZ);
|
||||
} else if (par1Entity instanceof EntityLivingBase)
|
||||
{
|
||||
((EntityLivingBase) par1Entity).motionY += 4.0D;
|
||||
}
|
||||
|
||||
return par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLivingUpdate()
|
||||
{
|
||||
super.onLivingUpdate();
|
||||
this.fallDistance = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attack the specified entity using a ranged attack.
|
||||
*/
|
||||
@Override
|
||||
public void attackEntityWithRangedAttack(EntityLivingBase par1EntityLivingBase, float par2)
|
||||
{
|
||||
if(par1EntityLivingBase instanceof IHoardDemon && ((IHoardDemon) par1EntityLivingBase).isSamePortal(this))
|
||||
{
|
||||
return;
|
||||
}
|
||||
double xCoord;
|
||||
double yCoord;
|
||||
double zCoord;
|
||||
WindGustProjectile hol = new WindGustProjectile(worldObj, this, par1EntityLivingBase, 1.8f, 0f, 20, 600);
|
||||
this.worldObj.spawnEntityInWorld(hol);
|
||||
}
|
||||
}
|
|
@ -46,7 +46,7 @@ public class TEDemonPortal extends TileEntity
|
|||
{
|
||||
public DemonType type = DemonType.FIRE;
|
||||
|
||||
public static boolean printDebug = false;
|
||||
public static boolean printDebug = true;
|
||||
|
||||
public static int limit = 100;
|
||||
|
||||
|
@ -576,6 +576,9 @@ public class TEDemonPortal extends TileEntity
|
|||
return 0;
|
||||
}
|
||||
|
||||
if(TEDemonPortal.printDebug)
|
||||
System.out.println("Spawning Demons");
|
||||
|
||||
return DemonPacketRegistry.spawnDemons(teDemonPortal, worldObj, xCoord + road.xCoord * 5, road.yCoord + 1, zCoord + road.zCoord * 5, type, tier, spawnGuardian);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.mob;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGrunt;
|
||||
|
||||
public class RenderGrunt extends RenderLiving
|
||||
{
|
||||
private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/ShadeMob.png");
|
||||
|
||||
public RenderGrunt(ModelBase par1ModelBase, float par2)
|
||||
{
|
||||
super(par1ModelBase, par2);
|
||||
}
|
||||
|
||||
public ResourceLocation func_110832_a(EntityMinorDemonGrunt par1EntityShade)
|
||||
{
|
||||
return field_110833_a;
|
||||
}
|
||||
|
||||
public ResourceLocation getEntityTexture(Entity par1Entity)
|
||||
{
|
||||
return this.func_110832_a((EntityMinorDemonGrunt) par1Entity);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.mob;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntGuardian;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntGuardianEarth;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntGuardianFire;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntGuardianIce;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.EntityMinorDemonGruntGuardianWind;
|
||||
|
||||
public class RenderMinorDemonGruntGuardian extends RenderLiving
|
||||
{
|
||||
private static final ResourceLocation normalTexture = new ResourceLocation("alchemicalwizardry", "textures/models/MinorDemonGruntGuardian_normal.png");
|
||||
private static final ResourceLocation fireTexture = new ResourceLocation("alchemicalwizardry", "textures/models/MinorDemonGruntGuardian_fire.png");
|
||||
private static final ResourceLocation iceTexture = new ResourceLocation("alchemicalwizardry", "textures/models/MinorDemonGruntGuardian_ice.png");
|
||||
private static final ResourceLocation windTexture = new ResourceLocation("alchemicalwizardry", "textures/models/MinorDemonGruntGuardian_wind.png");
|
||||
private static final ResourceLocation earthTexture = new ResourceLocation("alchemicalwizardry", "textures/models/MinorDemonGruntGuardian_earth.png");
|
||||
|
||||
public RenderMinorDemonGruntGuardian(ModelBase par1ModelBase, float par2)
|
||||
{
|
||||
super(par1ModelBase, par2);
|
||||
}
|
||||
|
||||
public ResourceLocation func_110832_a(EntityMinorDemonGruntGuardian entity)
|
||||
{
|
||||
if(entity instanceof EntityMinorDemonGruntGuardianFire)
|
||||
{
|
||||
return fireTexture;
|
||||
}else if(entity instanceof EntityMinorDemonGruntGuardianWind)
|
||||
{
|
||||
return windTexture;
|
||||
}else if(entity instanceof EntityMinorDemonGruntGuardianIce)
|
||||
{
|
||||
return iceTexture;
|
||||
}else if(entity instanceof EntityMinorDemonGruntGuardianEarth)
|
||||
{
|
||||
return earthTexture;
|
||||
}
|
||||
|
||||
return normalTexture;
|
||||
}
|
||||
|
||||
public ResourceLocation getEntityTexture(Entity entity)
|
||||
{
|
||||
return this.func_110832_a((EntityMinorDemonGruntGuardian) entity);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,181 @@
|
|||
package WayofTime.alchemicalWizardry.common.renderer.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class ModelMinorDemonGruntGuardian extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer head;
|
||||
ModelRenderer chest;
|
||||
ModelRenderer midrift;
|
||||
ModelRenderer rightarm;
|
||||
ModelRenderer leftarm;
|
||||
ModelRenderer rightleg;
|
||||
ModelRenderer leftleg;
|
||||
ModelRenderer middle;
|
||||
ModelRenderer helmet;
|
||||
ModelRenderer leftClaw;
|
||||
ModelRenderer rightClaw;
|
||||
ModelRenderer leftShoulder;
|
||||
ModelRenderer rightShoulder;
|
||||
ModelRenderer bar1;
|
||||
ModelRenderer bar2;
|
||||
|
||||
public ModelMinorDemonGruntGuardian()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 64;
|
||||
|
||||
head = new ModelRenderer(this, 0, 0);
|
||||
head.addBox(-4F, -8F, -4F, 8, 8, 8);
|
||||
head.setRotationPoint(0F, 0F, 0F);
|
||||
head.setTextureSize(128, 64);
|
||||
head.mirror = true;
|
||||
setRotation(head, 0F, 0F, 0F);
|
||||
chest = new ModelRenderer(this, 16, 16);
|
||||
chest.addBox(-5F, 0F, -3.5F, 10, 7, 7);
|
||||
chest.setRotationPoint(0F, 0F, 0F);
|
||||
chest.setTextureSize(128, 64);
|
||||
chest.mirror = true;
|
||||
setRotation(chest, 0F, 0F, 0F);
|
||||
midrift = new ModelRenderer(this, 16, 33);
|
||||
midrift.addBox(-4F, 7F, -2F, 8, 5, 4);
|
||||
midrift.setRotationPoint(0F, 0F, 0F);
|
||||
midrift.setTextureSize(128, 64);
|
||||
midrift.mirror = true;
|
||||
setRotation(midrift, 0F, 0F, 0F);
|
||||
rightarm = new ModelRenderer(this, 50, 16);
|
||||
rightarm.mirror = true;
|
||||
rightarm.addBox(-3F, -2F, -2F, 4, 12, 4);
|
||||
rightarm.setRotationPoint(-6F, 2F, 0F);
|
||||
rightarm.setTextureSize(128, 64);
|
||||
rightarm.mirror = true;
|
||||
setRotation(rightarm, 0F, 0F, 0F);
|
||||
rightarm.mirror = false;
|
||||
leftarm = new ModelRenderer(this, 50, 16);
|
||||
leftarm.addBox(-1F, -2F, -2F, 4, 12, 4);
|
||||
leftarm.setRotationPoint(6F, 2F, 0F);
|
||||
leftarm.setTextureSize(128, 64);
|
||||
leftarm.mirror = true;
|
||||
setRotation(leftarm, 0F, 0F, 0F);
|
||||
rightleg = new ModelRenderer(this, 0, 16);
|
||||
rightleg.mirror = true;
|
||||
rightleg.addBox(-2F, 0F, -2F, 4, 12, 4);
|
||||
rightleg.setRotationPoint(-2F, 12F, 0F);
|
||||
rightleg.setTextureSize(128, 64);
|
||||
rightleg.mirror = true;
|
||||
setRotation(rightleg, 0F, 0F, 0F);
|
||||
rightleg.mirror = false;
|
||||
leftleg = new ModelRenderer(this, 0, 16);
|
||||
leftleg.addBox(-2F, 0F, -2F, 4, 12, 4);
|
||||
leftleg.setRotationPoint(2F, 12F, 0F);
|
||||
leftleg.setTextureSize(128, 64);
|
||||
leftleg.mirror = true;
|
||||
setRotation(leftleg, 0F, 0F, 0F);
|
||||
middle = new ModelRenderer(this, 16, 43);
|
||||
middle.addBox(-2F, 7F, -3F, 4, 3, 1);
|
||||
middle.setRotationPoint(0F, 0F, 0F);
|
||||
middle.setTextureSize(128, 64);
|
||||
middle.mirror = true;
|
||||
setRotation(middle, 0F, 0F, 0F);
|
||||
helmet = new ModelRenderer(this, 67, 0);
|
||||
helmet.addBox(-4.5F, -8.5F, -4.5F, 9, 9, 9);
|
||||
helmet.setRotationPoint(0F, 0F, 0F);
|
||||
helmet.setTextureSize(128, 64);
|
||||
helmet.mirror = true;
|
||||
setRotation(helmet, 0F, 0F, 0F);
|
||||
leftClaw = new ModelRenderer(this, 67, 23);
|
||||
leftClaw.addBox(1.5F, 6F, -2.5F, 2, 6, 5);
|
||||
leftClaw.setRotationPoint(6F, 2F, 0F);
|
||||
leftClaw.setTextureSize(128, 64);
|
||||
leftClaw.mirror = true;
|
||||
setRotation(leftClaw, 0F, 0F, 0F);
|
||||
rightClaw = new ModelRenderer(this, 67, 23);
|
||||
rightClaw.mirror = true;
|
||||
rightClaw.addBox(-3.5F, 6F, -2.5F, 2, 6, 5);
|
||||
rightClaw.setRotationPoint(-6F, 2F, 0F);
|
||||
rightClaw.setTextureSize(128, 64);
|
||||
rightClaw.mirror = true;
|
||||
setRotation(rightClaw, 0F, 0F, 0F);
|
||||
rightClaw.mirror = false;
|
||||
leftShoulder = new ModelRenderer(this, 67, 35);
|
||||
leftShoulder.addBox(-1F, -2.5F, -2.5F, 5, 4, 5);
|
||||
leftShoulder.setRotationPoint(6F, 2F, 0F);
|
||||
leftShoulder.setTextureSize(128, 64);
|
||||
leftShoulder.mirror = true;
|
||||
setRotation(leftShoulder, 0F, 0F, 0F);
|
||||
rightShoulder = new ModelRenderer(this, 67, 35);
|
||||
rightShoulder.mirror = true;
|
||||
rightShoulder.addBox(-4F, -2.5F, -2.5F, 5, 4, 5);
|
||||
rightShoulder.setRotationPoint(-6F, 2F, 0F);
|
||||
rightShoulder.setTextureSize(128, 64);
|
||||
rightShoulder.mirror = true;
|
||||
setRotation(rightShoulder, 0F, 0F, 0F);
|
||||
rightShoulder.mirror = false;
|
||||
bar1 = new ModelRenderer(this, 67, 20);
|
||||
bar1.addBox(-3F, 3F, 4F, 14, 1, 1);
|
||||
bar1.setRotationPoint(0F, 0F, 0F);
|
||||
bar1.setTextureSize(128, 64);
|
||||
bar1.mirror = true;
|
||||
setRotation(bar1, 0F, 0F, 0.7853982F);
|
||||
bar2 = new ModelRenderer(this, 67, 20);
|
||||
bar2.addBox(-11F, 3F, 4F, 14, 1, 1);
|
||||
bar2.setRotationPoint(0F, 0F, 0F);
|
||||
bar2.setTextureSize(128, 64);
|
||||
bar2.mirror = true;
|
||||
setRotation(bar2, 0F, 0F, -0.7853982F);
|
||||
}
|
||||
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
head.render(f5);
|
||||
chest.render(f5);
|
||||
midrift.render(f5);
|
||||
rightarm.render(f5);
|
||||
leftarm.render(f5);
|
||||
rightleg.render(f5);
|
||||
leftleg.render(f5);
|
||||
middle.render(f5);
|
||||
helmet.render(f5);
|
||||
leftClaw.render(f5);
|
||||
rightClaw.render(f5);
|
||||
leftShoulder.render(f5);
|
||||
rightShoulder.render(f5);
|
||||
bar1.render(f5);
|
||||
bar2.render(f5);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
|
||||
{
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
|
||||
this.head.rotateAngleX = f4 / (180F / (float) Math.PI);
|
||||
this.head.rotateAngleY = f3 / (180F / (float) Math.PI);
|
||||
|
||||
this.helmet.rotateAngleX = this.head.rotateAngleX;
|
||||
this.helmet.rotateAngleY = this.head.rotateAngleY;
|
||||
|
||||
this.leftleg.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
|
||||
this.rightleg.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.0F * f1;
|
||||
this.rightarm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 1.0F * f1;
|
||||
this.leftarm.rotateAngleX = MathHelper.cos(f * 0.6662F) * 1.4F * f1;
|
||||
|
||||
this.leftClaw.rotateAngleX = this.leftarm.rotateAngleX;
|
||||
this.leftShoulder.rotateAngleX = this.leftarm.rotateAngleX;
|
||||
|
||||
this.rightClaw.rotateAngleX = this.rightarm.rotateAngleX;
|
||||
this.rightShoulder.rotateAngleX = this.rightarm.rotateAngleX;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue