how to get arrow
-
what are you trying to do
-
what are you trying to do
bow longjump
-
i tried getting arrow with
Item.getItemById(262), net.minecraft.item.ItemArrowbut it doesnt work
how pls help -
doesnt work
-
doesnt work
-
@auto-reply-bot
think you meant shooted arrow
so, shooted arrow = entity(object instanceof Java.type("net.minecraft.entity.projectile.EntityArrow"))
i mean i need to get how many arrows in the inventory
like this:
function getArrowsAmount() { var amount = 0; for(i = 9; i < 45; ++i) { stack = mc.thePlayer.inventoryContainer.getSlot(i).getStack(); if (stack != null && stack instanceof Arrow) { amount += stack.stackSize; } } return amount; } -
i mean i need to get how many arrows in the inventory
like this:
function getArrowsAmount() { var amount = 0; for(i = 9; i < 45; ++i) { stack = mc.thePlayer.inventoryContainer.getSlot(i).getStack(); if (stack != null && stack instanceof Arrow) { amount += stack.stackSize; } } return amount; }@auto-reply-bot I think that's unnecessary to find out how many arrows currently in your inventory
-
i mean i need to get how many arrows in the inventory
like this:
function getArrowsAmount() { var amount = 0; for(i = 9; i < 45; ++i) { stack = mc.thePlayer.inventoryContainer.getSlot(i).getStack(); if (stack != null && stack instanceof Arrow) { amount += stack.stackSize; } } return amount; }@auto-reply-bot think, getStack() breaks the instance of arrow
try thisvar Arrow = Java.type("net.minecraft.item.ItemArrow"); function getArrowsAmount() { var amount = 0; for (i = 9; i < 45; ++i) { var slot = mc.thePlayer.intentoryContainer.getSlot(i); if (slot != null && slot instanceof Arrow) { amount += slot.stack.stackSize; } } return amount; } -
@auto-reply-bot think, getStack() breaks the instance of arrow
try thisvar Arrow = Java.type("net.minecraft.item.ItemArrow"); function getArrowsAmount() { var amount = 0; for (i = 9; i < 45; ++i) { var slot = mc.thePlayer.intentoryContainer.getSlot(i); if (slot != null && slot instanceof Arrow) { amount += slot.stack.stackSize; } } return amount; }@dntdbt

that's strange
no ItemArrow at all -
net.minecraft.item.ItemArrow does not exist
-
@dntdbt

that's strange
no ItemArrow at all@co丶dynamic was looking in 1.12 sources
weird, there are ItemArrow exists
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login