-
Notifications
You must be signed in to change notification settings - Fork 13
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
Bedrock support #86
Merged
Merged
Bedrock support #86
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
44b6105
start bedrock implementation
CreeperG16 cc7829d
comments
CreeperG16 9a7634f
Todo comments
CreeperG16 befe982
comment
CreeperG16 c0a5b3e
return BedrockItem and run standard
CreeperG16 2e1238e
Small changes
CreeperG16 f8bc473
remove tools
CreeperG16 137af50
matchNbt in equal()
CreeperG16 821ea9a
better matchNbt
CreeperG16 f3fc3a8
remove bedrock-protocol from devDependencies
CreeperG16 58557ea
Notch -> Network in pc impl, add matchNbt to pc
CreeperG16 9e50812
canPlaceOn and canDestroy
CreeperG16 06269b8
CanPlaceOn and CanDestroy for java - NEED TO TEST
CreeperG16 a444f90
Fix weird indentation from my formatter
CreeperG16 5c182d8
notch -> network
CreeperG16 c97d5ef
revert the breaking change
CreeperG16 50d943f
clarify in comments that this is not tested
CreeperG16 397cd6b
Start bedrock support in original Item class
CreeperG16 c07449f
Linter
CreeperG16 b784243
blocksCanPlaceOn and blocksCanDestroy
CreeperG16 738356d
start implementing stack ID
CreeperG16 11b1b3e
add stack ID to fromNotch()
CreeperG16 20937d4
Initial support for <1.16.220, however item formats are inconsistent …
CreeperG16 afb0d99
<1.16.220 support, can be improved later to use supportFeature()
CreeperG16 e8d03a4
update types and docs
CreeperG16 6aaa066
update docs
CreeperG16 a81f906
use NBT builder functions where possible
CreeperG16 75c2a72
nbt.simplify() to make it more readable
CreeperG16 982d132
use optional chaining
CreeperG16 40462c3
update types
CreeperG16 e6a48f1
update docs
CreeperG16 be38e1b
Use supportFeature and bedrock features added in mcdata PR; fixes
CreeperG16 e1d8ea6
Add stack ID to tests (temp) and damage default to 0
CreeperG16 398f5c1
remove separate BedrockItem class, don't check ench len
CreeperG16 bdecc1a
linter
CreeperG16 d32d4b0
don't use Or assignment to support older node
CreeperG16 9a5e9cd
revert checking enchs length
CreeperG16 edc9aa4
use stackID parameter in tests
CreeperG16 b32b23a
remove network types and add stackID to fromNotch
CreeperG16 057f0b2
update docs and types
CreeperG16 bf66f42
stack ID is null in java (mcdata feature?)
CreeperG16 5dc0be5
Fix tests for stack ID, start adding bedrock tests
CreeperG16 c598975
clean up some unnecessary values
CreeperG16 60bbb4a
no need to test for null
CreeperG16 a42ce35
Merge branch 'master' into master
CreeperG16 96d061d
More readable notch methods
CreeperG16 497ae97
Change blocksCanPlaceOn/Destroy to return [name, properties]
CreeperG16 e3c384d
Anvil is undefined if registry type is bedrock
CreeperG16 4eae3bf
change blocksCanPlaceOn/Destroy
CreeperG16 60ec722
update types and docs
CreeperG16 916a7fa
Update index.d.ts
CreeperG16 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking this should return a [block name, properties] tuple instead of raw block strings for future proofing. It does seem odd that the matching is just done by block name here. But I'm not sure if we should block on that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returning a prismarine-block isn't what I meant. I meant returning properties associated with a block. Like
stone[variant=andersite]
-->[["stone", {"variant":"andersite"]]
as opposed to just["stone"]
.Since we don't actually have the prop data as a discriminator for these fields, returning undefined as a second param for now makes sense to me for now
[["stone"]]
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how to type/document it, if it never returns those properties anyway as there isn't a way of getting them, should they be documented to return those properties at all?