satoshinm / NetCraft

Web-based fork of fogleman/Craft ⛺
https://satoshinm.github.io/NetCraft/
MIT License
57 stars 13 forks source link

Add survival inventory, initial implementation. Closes GH-18 #178

Closed satoshinm closed 7 years ago

satoshinm commented 7 years ago

https://github.com/satoshinm/NetCraft/issues/18

Continuation of https://github.com/satoshinm/NetCraft/pull/177 (https://github.com/satoshinm/NetCraft/pull/175) - put the hotbar to good use (finite items)

satoshinm commented 7 years ago

Added to inventory on mine, stacks well, but it is purely client-side so far:

screenshot-netcraft-2017-06-04t06_38_01 105z

satoshinm commented 7 years ago

Coming along well, deployed for testing on https://netcraft.beerprojects.com (build 470 from this branch: https://circleci.com/gh/satoshinm/NetCraft/470). Able to mine and build, adds and subtracts from inventory.

Next up: server-side inventory: https://github.com/satoshinm/WebSandboxMC/issues/45

satoshinm commented 7 years ago

Found an issue: mine two blocks of different type, such as grass and sand. Place the grass block. The inventory shifts strangely with a "1" quantity air block and "0" quantity sand:

screen shot 2017-06-04 at 1 58 13 pm
satoshinm commented 7 years ago

This is still only client-side, but it is a good foundation to start with. The server can send m, command to change the gamemode to survival (finite inventory only what you've mined) or creative (infinite, all blocks), although there is no server-side enforcement, that is: https://github.com/satoshinm/WebSandboxMC/issues/45