-
Notifications
You must be signed in to change notification settings - Fork 15
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
Utility Extensions #59
Draft
solonovamax
wants to merge
13
commits into
SilkMC:main
Choose a base branch
from
solonovamax:feature/utility-extensions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
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
- Add operators for - Vector3i - Vector3f - Vector3d - Vector2i - Vector2f - Vector2d - Add new operators - cross product & dot product - overloads to avoid boxing & unboxing - initialization functions similar to listOf() for vectors - conversion functions for `Vec*`/`Vector*` -> `Pos*` - some function aliases for yarn mappings
- Add operators for all JOML matrix types
Signed-off-by: solonovamax <[email protected]>
- Utility extensions for registering so you can do smth like val MY_ITEM = Registries.ITEM.register("mymod:myid", MyItem()) - convenience methods for getting entities in an area Signed-off-by: solonovamax <[email protected]>
oops, hit enter before writing the description lol |
Also suppress some warnings in the other *Operations files Signed-off-by: solonovamax <[email protected]>
Signed-off-by: solonovamax <[email protected]>
Signed-off-by: solonovamax <[email protected]>
Signed-off-by: solonovamax <[email protected]>
Soft depends on fabric-permissions-api-v0. Falls back to vanilla permission checks if it's not present Signed-off-by: solonovamax <[email protected]>
Signed-off-by: solonovamax <[email protected]>
See: FabricMC/fabric-loom#1153 Using layered mappings with a custom mapping is preferred.
solonovamax
force-pushed
the
feature/utility-extensions
branch
from
August 27, 2024 18:21
b5e4ce8
to
b183d4e
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR contains a bunch of additional utility extensions, such as:
Vector3i
,Vector3f
,Vector3d
,Vector2i
,Vector2f
, andVector2d
Pos{2,3}{i,d,f}
(ie. convert from mcVec*
,BlockPos
, and jomlVector*
classes to thePos*
classes)Int
,Long
,Float
, andDouble
. this is to avoid the overhead that comes with boxing & unboxing when usingNumber
. theNumber
overload is still provided if, for whatever reason, someone has like aByte
orShort
or smth and wants to multiply it)pos*Of
,vec*Of
, andvector*Of
(eg.pos3dOf(x, y, z): Pos3d
,vec3Of(x, y, z): Vec3
,vector3dOf(x, y, z): Vector3d
, etc.)toMcVec3d
, which is an alias fortoMcVec3
, asVec3
is namedVec3d
on yarn)Matrix2f
,Matrix2d
,Matrix3f
,Matrix3d
,Matrix3x2f
,Matrix3x2d
,Matrix4f
,Matrix4d
,Matrix4x3f
, andMatrix4x3d
AABB
/Box
World
Registry
, allowing for things like