ImmersiveMC

ImmersiveMC

683k Downloads

Anvil/Smithing Table

hammy275 opened this issue ยท 3 comments

commented

Should track contents server-side, taking the items when you put them in. Items are stored by the block position, not the player. Once a second, if a player is looking at an anvil or smithing table, it sends a ping packet. The server sees the ping, gets the anvil/smithing table the player is looking at, and resets a cooldown. If the cooldown reaches 0, the items inside drop back to the ground.

commented

Note: Very large change of plans.

We're now doing something similar to the crafting table, and storing the info client-side. When we go to do the crafting, we send the slot numbers of the items we want to craft to the server, which does the work from there.

commented

Re-opening. We need to show the experience level requirement to the user in some way. Probably look at the code for custom names as a starting point.

commented

Also send the hand we want in the DoAnvilPacket so we can place the item in that hand (only if it's empty, though!) during a craft, rather than just putting it somewhere in the player's inventory