use of net.minecraft.dispenser.IPosition in project MineFactoryReloaded by powercrystals.
the class BehaviorDispenseSafariNet method dispenseStack.
@Override
public ItemStack dispenseStack(IBlockSource dispenser, ItemStack stack) {
World world = dispenser.getWorld();
IPosition dispenserPos = BlockDispenser.getIPositionFromBlockSource(dispenser);
EnumFacing dispenserFacing = BlockDispenser.getFacing(dispenser.getBlockMetadata());
EntitySafariNet proj = new EntitySafariNet(world, dispenserPos.getX(), dispenserPos.getY(), dispenserPos.getZ(), stack.copy());
proj.setThrowableHeading(dispenserFacing.getFrontOffsetX(), dispenserFacing.getFrontOffsetY() + 0.1, dispenserFacing.getFrontOffsetZ(), 1.1F, 6.0F);
world.spawnEntityInWorld(proj);
stack.splitStack(1);
return stack;
}
use of net.minecraft.dispenser.IPosition in project ClaySoldiersMod by SanAndreasP.
the class Handler_BehaviorDispenseItem method dispense2.
protected ItemStack dispense2(IBlockSource par1IBlockSource, ItemStack par2ItemStack) {
EnumFacing var3 = EnumFacing.getFront(par1IBlockSource.getBlockMetadata());
IPosition var4 = BlockDispenser.getIPositionFromBlockSource(par1IBlockSource);
ItemStack var5 = par2ItemStack.splitStack(1);
func_82486_a(par1IBlockSource.getWorld(), var5, 6, var3, var4);
return par2ItemStack;
}
Aggregations