Created all code necessary to summon the portal. I'm awesome, I know.
This commit is contained in:
parent
832ed15060
commit
9b0fa9b052
37 changed files with 915 additions and 89 deletions
|
@ -15,12 +15,26 @@ public class EntityDemon extends EntityTameable implements IDemon
|
|||
{
|
||||
private boolean isAggro;
|
||||
private String demonID;
|
||||
|
||||
protected boolean dropCrystal = true;
|
||||
|
||||
public EntityDemon(World par1World, String demonID)
|
||||
{
|
||||
super(par1World);
|
||||
this.demonID = demonID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getDoesDropCrystal()
|
||||
{
|
||||
return dropCrystal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDropCrystal(boolean crystal)
|
||||
{
|
||||
this.dropCrystal = crystal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSummonedConditions()
|
||||
|
@ -49,21 +63,24 @@ public class EntityDemon extends EntityTameable implements IDemon
|
|||
|
||||
protected void dropFewItems(boolean par1, int par2)
|
||||
{
|
||||
ItemStack drop = new ItemStack(ModItems.demonPlacer);
|
||||
|
||||
DemonPlacer.setDemonString(drop, this.getDemonID());
|
||||
if(this.getDoesDropCrystal())
|
||||
{
|
||||
ItemStack drop = new ItemStack(ModItems.demonPlacer);
|
||||
|
||||
DemonPlacer.setDemonString(drop, this.getDemonID());
|
||||
|
||||
if ((this.getOwner() instanceof EntityPlayer))
|
||||
{
|
||||
DemonPlacer.setOwnerName(drop, SpellHelper.getUsername((EntityPlayer) this.getOwner()));
|
||||
}
|
||||
if ((this.getOwner() instanceof EntityPlayer))
|
||||
{
|
||||
DemonPlacer.setOwnerName(drop, SpellHelper.getUsername((EntityPlayer) this.getOwner()));
|
||||
}
|
||||
|
||||
if (this.hasCustomNameTag())
|
||||
{
|
||||
drop.setStackDisplayName(this.getCustomNameTag());
|
||||
}
|
||||
if (this.hasCustomNameTag())
|
||||
{
|
||||
drop.setStackDisplayName(this.getCustomNameTag());
|
||||
}
|
||||
|
||||
this.entityDropItem(drop, 0.0f);
|
||||
this.entityDropItem(drop, 0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
public void onLivingUpdate()
|
||||
|
@ -98,4 +115,9 @@ public class EntityDemon extends EntityTameable implements IDemon
|
|||
{
|
||||
return this.demonID;
|
||||
}
|
||||
|
||||
protected void setDemonID(String id)
|
||||
{
|
||||
this.demonID = id;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue