Enchanting - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html) +--- Forum: Development (https://forum.cuberite.org/forum-13.html) +--- Thread: Enchanting (/thread-1321.html) |
RE: Enchanting - SamJBarney - 04-26-2014 Do arrows actually get used up? I've been looking around, and I can't seem to find where that happens. RE: Enchanting - daniel0916 - 04-26-2014 Yes, the arrows will be used and removed from the inventory. I also can't find it ... RE: Enchanting - tigerw - 04-26-2014 All completely clientside I think. RE: Enchanting - xoft - 04-26-2014 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. RE: Enchanting - SamJBarney - 04-26-2014 So arrow use hasn't been actually implemented yet. Huh. RE: Enchanting - daniel0916 - 04-27-2014 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? RE: Enchanting - tigerw - 04-27-2014 I think you'll have to make a method yourself: that was one reason why it wasn't fixed a long time back :P RE: Enchanting - daniel0916 - 04-28-2014 Where should i add the checks for the protection enchantments? In the "TakeDamage" method or in the "GetArmorCoverAgainst" method? RE: Enchanting - xoft - 04-28-2014 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 RE: Enchanting - tonibm19 - 06-18-2014 Are you still working on this? If you aren't you could maybe do a PR of actually implemented enchantments |