Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 17 commits into from
Jun 4, 2017

Conversation

satoshinm
Copy link
Owner

#18

Continuation of #177 (#175) - put the hotbar to good use (finite items)

@satoshinm
Copy link
Owner Author

satoshinm commented Jun 4, 2017

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

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

@satoshinm
Copy link
Owner Author

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: satoshinm/WebSandboxMC#45

@satoshinm
Copy link
Owner Author

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 satoshinm changed the title [WIP] Inventory. GH-18 Add inventory (client-side). Closes GH-18 Jun 4, 2017
@satoshinm satoshinm changed the title Add inventory (client-side). Closes GH-18 Add inventory, initial implementation. Closes GH-18 Jun 4, 2017
@satoshinm
Copy link
Owner Author

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: satoshinm/WebSandboxMC#45

@satoshinm satoshinm changed the title Add inventory, initial implementation. Closes GH-18 Add survival inventory, initial implementation. Closes GH-18 Jun 4, 2017
@satoshinm satoshinm merged commit df4d60f into master Jun 4, 2017
@satoshinm satoshinm deleted the inventory2 branch June 4, 2017 21:29
satoshinm added a commit to satoshinm/WebSandboxMC that referenced this pull request Jun 4, 2017
satoshinm added a commit that referenced this pull request Jun 4, 2017
Arguable, but for now opting to not allow creative mode to break blocks
of infinite hardness, to better match previous behavior before
#178 which added a creative
/survival mode distinction, but before that, there was a combination of
both: block hardness but infinite inventory. To preserve this useful
behavior, so server admins can setup bedrock or barrier blocks, prevent
creative mode even though it mines other blocks quickly from breaking
unbreakable blocks at all.
satoshinm added a commit that referenced this pull request Jun 4, 2017
…H-172 (#182)

* Generate bedrock at layer y=0

* Remove special case no build/break at y=0

* Prevent breaking undestructable blocks even in creative mode

Arguable, but for now opting to not allow creative mode to break blocks
of infinite hardness, to better match previous behavior before
#178 which added a creative
/survival mode distinction, but before that, there was a combination of
both: block hardness but infinite inventory. To preserve this useful
behavior, so server admins can setup bedrock or barrier blocks, prevent
creative mode even though it mines other blocks quickly from breaking
unbreakable blocks at all.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant