mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
port in everything from 1.6 but labotimizetools(will do that later this weekend)
This commit is contained in:
1 parent
aa8d70d4c4
commit
66a4ece284
21 files changed
+8806
-131
No files matched your search
@@ -523,22 +523,26 @@ public class AbilityHelper
|
||||
}
|
||||
}
|
||||
|
||||
public static void spawnItemAtEntity (Entity entity, ItemStack stack, int delay)
|
||||
{
|
||||
if (!entity.worldObj.isRemote)
|
||||
{
|
||||
EntityItem entityitem = new EntityItem(entity.worldObj, entity.posX + 0.5D, entity.posY + 0.5D, entity.posZ + 0.5D, stack);
|
||||
entityitem.delayBeforeCanPickup = delay;
|
||||
entity.worldObj.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
}
|
||||
|
||||
public static void spawnItemAtPlayer (EntityPlayer player, ItemStack stack)
|
||||
{
|
||||
EntityItem entityitem = new EntityItem(player.worldObj, player.posX + 0.5D, player.posY + 0.5D, player.posZ + 0.5D, stack);
|
||||
player.worldObj.spawnEntityInWorld(entityitem);
|
||||
if (!(player instanceof FakePlayer))
|
||||
entityitem.onCollideWithPlayer(player);
|
||||
/*
|
||||
* if (!player.inventory.addItemStackToInventory(stack)) { if
|
||||
* (!player.worldObj.isRemote) { EntityItem entityitem = new
|
||||
* EntityItem(player.worldObj, player.posX + 0.5D, player.posY + 0.5D,
|
||||
* player.posZ + 0.5D, stack);
|
||||
* player.worldObj.spawnEntityInWorld(entityitem);
|
||||
* entityitem.onCollideWithPlayer(player); } } else {
|
||||
* player.worldObj.playSoundAtEntity(player, "random.pop", 0.2F,
|
||||
* ((random.nextFloat() - random.nextFloat()) * 0.7F + 1.0F) * 2.0F); }
|
||||
*/
|
||||
if (!player.worldObj.isRemote)
|
||||
{
|
||||
EntityItem entityitem = new EntityItem(player.worldObj, player.posX + 0.5D, player.posY + 0.5D, player.posZ + 0.5D, stack);
|
||||
player.worldObj.spawnEntityInWorld(entityitem);
|
||||
if (!(player instanceof FakePlayer))
|
||||
entityitem.onCollideWithPlayer(player);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* Ranged weapons */
|
||||
@@ -632,4 +636,5 @@ public class AbilityHelper
|
||||
Vec3 vec31 = vec3.addVector((double) f7 * d3, (double) f6 * d3, (double) f8 * d3);
|
||||
return world.func_147447_a(vec3, vec31, par3, !par3, par3);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user