Small stuff
This commit is contained in:
parent
0f3c0196cd
commit
8d2ab7aa7a
6 changed files with 35 additions and 15 deletions
|
@ -6,6 +6,7 @@ import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil;
|
|||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.item.EntityXPOrb;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -153,6 +154,7 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHol
|
|||
float posY = (float) (par3Entity.posY - par3Entity.getEyeHeight());
|
||||
float posZ = Math.round(par3Entity.posZ);
|
||||
List<EntityItem> entities = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range));
|
||||
List<EntityXPOrb> xpOrbs = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityXPOrb.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range));
|
||||
|
||||
for (EntityItem entity : entities)
|
||||
{
|
||||
|
@ -161,9 +163,15 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHol
|
|||
entity.onCollideWithPlayer(par3EntityPlayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
for (EntityXPOrb xpOrb : xpOrbs)
|
||||
{
|
||||
if (xpOrb != null && !par2World.isRemote)
|
||||
{
|
||||
xpOrb.onCollideWithPlayer(par3EntityPlayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -175,6 +183,7 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHol
|
|||
float posY = (float) (player.posY - player.getEyeHeight());
|
||||
float posZ = Math.round(player.posZ);
|
||||
List<EntityItem> entities = player.worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range));
|
||||
List<EntityXPOrb> xpOrbs = player.worldObj.getEntitiesWithinAABB(EntityXPOrb.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range));
|
||||
|
||||
for (EntityItem entity : entities)
|
||||
{
|
||||
|
@ -183,6 +192,14 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHol
|
|||
entity.onCollideWithPlayer(player);
|
||||
}
|
||||
}
|
||||
|
||||
for (EntityXPOrb xpOrb : xpOrbs)
|
||||
{
|
||||
if (xpOrb != null && !world.isRemote)
|
||||
{
|
||||
xpOrb.onCollideWithPlayer(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue