added support to throwing blocks in stripes pipe
This commit is contained in:
parent
3b3100e9cf
commit
56699cf352
1 changed files with 37 additions and 37 deletions
|
@ -132,46 +132,46 @@ public class PipeItemsStripes extends Pipe<PipeTransportItems> {
|
||||||
direction.offsetY * 1.8d + getWorld().rand.nextGaussian() * 0.007499999832361937D,
|
direction.offsetY * 1.8d + getWorld().rand.nextGaussian() * 0.007499999832361937D,
|
||||||
direction.offsetZ * 1.8d + getWorld().rand.nextGaussian() * 0.007499999832361937D);
|
direction.offsetZ * 1.8d + getWorld().rand.nextGaussian() * 0.007499999832361937D);
|
||||||
getWorld().spawnEntityInWorld(entityArrow);
|
getWorld().spawnEntityInWorld(entityArrow);
|
||||||
} else if (stack.getItem() == Items.potionitem) {
|
} else if ((stack.getItem() == Items.potionitem && ItemPotion.isSplash(stack.getItemDamage()))
|
||||||
if (ItemPotion.isSplash(stack.getItemDamage())) {
|
|| stack.getItem() == Items.egg
|
||||||
EntityPlayer player = CoreProxy.proxy.getBuildCraftPlayer(getWorld(),
|
|| stack.getItem() == Items.snowball) {
|
||||||
|
EntityPlayer player = CoreProxy.proxy.getBuildCraftPlayer(getWorld(),
|
||||||
(int) p.x, (int) p.y, (int) p.z);
|
(int) p.x, (int) p.y, (int) p.z);
|
||||||
|
|
||||||
switch (event.direction) {
|
switch (event.direction) {
|
||||||
case DOWN:
|
case DOWN:
|
||||||
player.rotationPitch = 90;
|
player.rotationPitch = 90;
|
||||||
player.rotationYaw = 0;
|
player.rotationYaw = 0;
|
||||||
break;
|
break;
|
||||||
case UP:
|
case UP:
|
||||||
player.rotationPitch = 270;
|
player.rotationPitch = 270;
|
||||||
player.rotationYaw = 0;
|
player.rotationYaw = 0;
|
||||||
break;
|
break;
|
||||||
case NORTH:
|
case NORTH:
|
||||||
player.rotationPitch = 0;
|
player.rotationPitch = 0;
|
||||||
player.rotationYaw = 180;
|
player.rotationYaw = 180;
|
||||||
break;
|
break;
|
||||||
case SOUTH:
|
case SOUTH:
|
||||||
player.rotationPitch = 0;
|
player.rotationPitch = 0;
|
||||||
player.rotationYaw = 0;
|
player.rotationYaw = 0;
|
||||||
break;
|
break;
|
||||||
case WEST:
|
case WEST:
|
||||||
player.rotationPitch = 0;
|
player.rotationPitch = 0;
|
||||||
player.rotationYaw = 90;
|
player.rotationYaw = 90;
|
||||||
break;
|
break;
|
||||||
case EAST:
|
case EAST:
|
||||||
player.rotationPitch = 0;
|
player.rotationPitch = 0;
|
||||||
player.rotationYaw = 270;
|
player.rotationYaw = 270;
|
||||||
break;
|
break;
|
||||||
case UNKNOWN:
|
case UNKNOWN:
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
stack.getItem().onItemRightClick(
|
|
||||||
stack,
|
|
||||||
getWorld(),
|
|
||||||
CoreProxy.proxy.getBuildCraftPlayer(getWorld(),
|
|
||||||
(int) p.x, (int) p.y, (int) p.z));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stack.getItem().onItemRightClick(
|
||||||
|
stack,
|
||||||
|
getWorld(),
|
||||||
|
CoreProxy.proxy.getBuildCraftPlayer(getWorld(),
|
||||||
|
(int) p.x, (int) p.y, (int) p.z));
|
||||||
} else if (getWorld().getBlock((int) p.x, (int) p.y, (int) p.z) == Blocks.air) {
|
} else if (getWorld().getBlock((int) p.x, (int) p.y, (int) p.z) == Blocks.air) {
|
||||||
if (stack.getItem() instanceof ItemBucket) {
|
if (stack.getItem() instanceof ItemBucket) {
|
||||||
Block underblock = getWorld().getBlock((int) p.x, (int) p.y - 1, (int) p.z);
|
Block underblock = getWorld().getBlock((int) p.x, (int) p.y - 1, (int) p.z);
|
||||||
|
|
Loading…
Reference in a new issue