Java Code Examples for net.minecraft.init.Items.arrow()

The following are Jave code examples for showing how to use arrow() of the net.minecraft.init.Items class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: connor41-etfuturum2   File: ServerEventHandler.java   View Source Code Vote up 6 votes
@SubscribeEvent
public void arrowNock(ArrowNockEvent event) {
	if (event.result == null)
		return;
	IInventory invt = event.entityPlayer.inventory;
	for (int i = 0; i < invt.getSizeInventory(); i++) {
		ItemStack stack = invt.getStackInSlot(i);
		if (stack == null || stack.stackSize <= 0)
			continue;
		if (stack.getItem() == Items.arrow)
			return;
		if (stack.getItem() == ModItems.tipped_arrow) {
			event.setCanceled(true);
			event.entityPlayer.setItemInUse(event.result, event.result.getItem().getMaxItemUseDuration(event.result));
			return;
		}
	}
}
 
Example 2
Project: DecompiledMinecraft   File: EntitySkeleton.java   View Source Code Vote up 4 votes
protected Item getDropItem()
{
    return Items.arrow;
}
 
Example 3
Project: DecompiledMinecraft   File: EntitySkeleton.java   View Source Code Vote up 4 votes
protected Item getDropItem()
{
    return Items.arrow;
}
 
Example 4
Project: BaseClient   File: EntitySkeleton.java   View Source Code Vote up 4 votes
protected Item getDropItem()
{
    return Items.arrow;
}
 
Example 5
Project: BaseClient   File: EntitySkeleton.java   View Source Code Vote up 4 votes
protected Item getDropItem()
{
    return Items.arrow;
}