Cuberite Forum

Full Version: Enchanting
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11
Do arrows actually get used up? I've been looking around, and I can't seem to find where that happens.
Yes, the arrows will be used and removed from the inventory. I also can't find it ...
All completely clientside I think.
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.
So arrow use hasn't been actually implemented yet. Huh.
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?
I think you'll have to make a method yourself: that was one reason why it wasn't fixed a long time back :P
Where should i add the checks for the protection enchantments?
In the "TakeDamage" method or in the "GetArmorCoverAgainst" method?
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
Are you still working on this? If you aren't you could maybe do a PR of actually implemented enchantments
Pages: 1 2 3 4 5 6 7 8 9 10 11