mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-23 21:39:55 +00:00
Created all code necessary to summon the portal. I'm awesome, I know.
This commit is contained in:
1 parent
832ed15060
commit
9b0fa9b052
37 files changed
+915
-89
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user