-
Notifications
You must be signed in to change notification settings - Fork 11
AABBUtils and Vector3Utils.ceil #99
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
Merged
Merged
Changes from 12 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
df46000
Added AABBUtils and Vector3Utils.ceil
sweetniamhy a26c746
Change files
sweetniamhy f03dbf9
Merge remote-tracking branch 'origin/main' into niamh.cuileann/aabbutils
sweetniamhy 993f331
Removing AABB temp interface
sweetniamhy 4a615cb
API report
sweetniamhy bf4c372
Added error for invalid AABB
sweetniamhy 911c092
Cleanup error message to only specify extent
sweetniamhy 31e37cd
Adjusted block volume tests to be more clear of the expected block di…
sweetniamhy abb4f43
Changed the zero extent check to use epsilon
sweetniamhy 0e80561
Reworded EPSILON doc
sweetniamhy 69e143f
Added throw comments, cleaned up docs
sweetniamhy 2c857e6
Merge branch 'main' into niamh.cuileann/aabbutils
sweetniamhy 4e03814
Update change/@minecraft-math-13da4e91-9583-4450-b4b9-a00da5a6a7c9.json
sweetniamhy 514e924
PR feedback, removed beachball to regen
sweetniamhy 0197b10
Merge branch 'niamh.cuileann/aabbutils' of github.com:Mojang/minecraf…
sweetniamhy 4b7fa28
Adding min/max to Vector3Utils and builder. Added tests for min/max/c…
sweetniamhy 36f56fa
Change files
sweetniamhy 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
7 changes: 7 additions & 0 deletions
7
change/@minecraft-math-13da4e91-9583-4450-b4b9-a00da5a6a7c9.json
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "none", | ||
sweetniamhy marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "comment": "Added AABBUtils for performing functional operations on AABB objects, added Vector3Utils.ceil", | ||
| "packageName": "@minecraft/math", | ||
| "email": "niamh.cuileann@skyboxlabs.com", | ||
| "dependentChangeType": "none" | ||
| } | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT License. | ||
|
|
||
| import type { Vector3 } from '@minecraft/server'; | ||
|
|
||
| export class BlockVolume { | ||
| constructor(from: Vector3, to: Vector3) { | ||
sweetniamhy marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| this.from = from; | ||
| this.to = to; | ||
|
|
||
| this.from.x = Math.floor(this.from.x); | ||
| this.from.y = Math.floor(this.from.y); | ||
| this.from.z = Math.floor(this.from.z); | ||
|
|
||
| this.to.x = Math.floor(this.to.x); | ||
| this.to.y = Math.floor(this.to.y); | ||
| this.to.z = Math.floor(this.to.z); | ||
sweetniamhy marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| from: Vector3; | ||
| to: Vector3; | ||
| } | ||
|
|
||
| export const createMockServerBindings = () => { | ||
| return { BlockVolume }; | ||
| }; | ||
This file contains hidden or 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 hidden or 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 hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.