Improved parachute deployment code.
This commit is contained in:
parent
b4d97e9011
commit
384b0085b2
2 changed files with 38 additions and 22 deletions
|
@ -282,29 +282,44 @@ public class PlayerAether implements IPlayerAether {
|
|||
{
|
||||
EntityParachute parachute = null;
|
||||
|
||||
if(this.getEntity().inventory.hasItemStack(new ItemStack(ItemsAether.cloud_parachute)))
|
||||
{
|
||||
parachute = new EntityParachute(this.getEntity().worldObj, this.getEntity(), false);
|
||||
parachute.setPosition(this.getEntity().posX, this.getEntity().posY, this.getEntity().posZ);
|
||||
this.getEntity().worldObj.spawnEntityInWorld(parachute);
|
||||
this.getEntity().inventory.consumeInventoryItem(ItemsAether.cloud_parachute);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.getEntity().inventory.hasItemStack(new ItemStack(ItemsAether.golden_parachute)))
|
||||
{
|
||||
for(int i = 0; i < this.getEntity().inventory.getSizeInventory(); i++)
|
||||
{
|
||||
ItemStack itemstack = this.getEntity().inventory.getStackInSlot(i);
|
||||
ItemStack itemstack = null;
|
||||
|
||||
if(itemstack != null && itemstack.getItem() == ItemsAether.golden_parachute)
|
||||
{
|
||||
itemstack.damageItem(1, this.getEntity());
|
||||
parachute = new EntityParachute(this.getEntity().worldObj, this.getEntity(), true);
|
||||
parachute.setPosition(this.getEntity().posX, this.getEntity().posY, this.getEntity().posZ);
|
||||
this.getEntity().inventory.setInventorySlotContents(i, itemstack);
|
||||
this.getEntity().worldObj.spawnEntityInWorld(parachute);
|
||||
}
|
||||
for (int i = 0; i < this.getEntity().inventory.getSizeInventory(); i++)
|
||||
{
|
||||
ItemStack stackInSlot = this.getEntity().inventory.getStackInSlot(i);
|
||||
|
||||
if(stackInSlot != null && stackInSlot.getItem() == ItemsAether.cloud_parachute)
|
||||
{
|
||||
itemstack = stackInSlot;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (stackInSlot != null && stackInSlot.getItem() == ItemsAether.golden_parachute)
|
||||
{
|
||||
itemstack = stackInSlot;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (itemstack != null)
|
||||
{
|
||||
if (itemstack.getItem() == ItemsAether.cloud_parachute)
|
||||
{
|
||||
parachute = new EntityParachute(this.getEntity().worldObj, this.getEntity(), false);
|
||||
parachute.setPosition(this.getEntity().posX, this.getEntity().posY, this.getEntity().posZ);
|
||||
this.getEntity().worldObj.spawnEntityInWorld(parachute);
|
||||
this.getEntity().inventory.consumeInventoryItem(itemstack.getItem());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (itemstack.getItem() == ItemsAether.golden_parachute)
|
||||
{
|
||||
itemstack.damageItem(1, this.getEntity());
|
||||
parachute = new EntityParachute(this.getEntity().worldObj, this.getEntity(), true);
|
||||
parachute.setPosition(this.getEntity().posX, this.getEntity().posY, this.getEntity().posZ);
|
||||
this.getEntity().worldObj.spawnEntityInWorld(parachute);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ public class AetherRankings {
|
|||
addGGRank("58a5d694-a8a6-4605-ab33-d6904107ad5f"); // bconlon
|
||||
addGGRank("353a859b-ba16-4e6a-8f63-9a8c79ab0071"); // quek_guy
|
||||
addGGRank("c3e6871e-8e60-490a-8a8d-2bbe35ad1604"); // Raptor__
|
||||
addGGRank("d475af59-d73c-42be-90ed-f1a78f10d452"); // bumble_dani
|
||||
addGGRank("78c7f290-62aa-4afa-9d9a-f8e6b2f85206"); // NAPPUS
|
||||
|
||||
//Retired Gilded Games
|
||||
|
|
Loading…
Reference in a new issue