Enchanting
Do arrows actually get used up? I've been looking around, and I can't seem to find where that happens.
Reply
Thanks given by:
Yes, the arrows will be used and removed from the inventory. I also can't find it ...
Reply
Thanks given by:
All completely clientside I think.
Reply
Thanks given by:
src/Items/ItemBow.h line 78:
if (!a_Player->IsGameModeCreative())
{
	a_Player->UseEquippedItem();
}

EDIT: Wait, no, that only decreases bow durability. Then the arrows aren't removed server-side.
Reply
Thanks given by:
So arrow use hasn't been actually implemented yet. Huh.
Reply
Thanks given by:
So when the client remove the arrow from the inventory, mcserver don't remove it or? Then the server and client are out of sync.

EDIT: Yes, it is so. You can duplicate arrows. I will fix this.
EDIT2: Give it a method to search in the inventory for a item?
Reply
Thanks given by:
I think you'll have to make a method yourself: that was one reason why it wasn't fixed a long time back :P
Reply
Thanks given by:
Where should i add the checks for the protection enchantments?
In the "TakeDamage" method or in the "GetArmorCoverAgainst" method?
Reply
Thanks given by:
Based on the armor wiki page, I think the TakeDamage function is a better place for that calculation (but implement the core calculation in a separate function, called by TakeDamage)

Ref.: http://minecraft.gamepedia.com/Armor#Enchantments
Reply
Thanks given by:
Are you still working on this? If you aren't you could maybe do a PR of actually implemented enchantments
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)