Open
Conversation
Author
|
oops, hit enter before writing the description lol |
b5e4ce8 to
b183d4e
Compare
Author
|
@jakobkmar is there any possibility I could get some feedback on this? because I'd love to see it merged soon-ish, if possible |
kxmpxtxnt
reviewed
Oct 6, 2024
Author
|
I'm probably actually gonna split this into two PRs:
|
b183d4e to
7899710
Compare
solonovamax
added a commit
to solonovamax/silk
that referenced
this pull request
Oct 7, 2024
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
d648345 to
66a2d96
Compare
solonovamax
commented
Oct 8, 2024
Author
solonovamax
left a comment
There was a problem hiding this comment.
Just making this review to remind myself for later.
Also add kdoc comments to all elements.
Comment on lines
+218
to
+222
| operator fun Vector3i.plus(n: Int): Vector3i = n.let { nInt -> Vector3i(this).add(nInt, nInt, nInt) } | ||
| operator fun Vector3i.plus(n: Long): Vector3i = n.toInt().let { nInt -> Vector3i(this).add(nInt, nInt, nInt) } | ||
| operator fun Vector3i.plus(n: Float): Vector3i = n.toInt().let { nInt -> Vector3i(this).add(nInt, nInt, nInt) } | ||
| operator fun Vector3i.plus(n: Double): Vector3i = n.toInt().let { nInt -> Vector3i(this).add(nInt, nInt, nInt) } | ||
| operator fun Vector3i.plus(n: Number): Vector3i = n.toInt().let { nInt -> Vector3i(this).add(nInt, nInt, nInt) } |
Author
There was a problem hiding this comment.
add Number.plus(Vector3i), etc. methods for parity with matrix extensions
Comment on lines
+26
to
+28
| fun BlockPos.toPos3i(): Pos3i = Pos3i(x, y, z) | ||
| fun BlockPos.toPos3f(): Pos3f = Pos3f(x.toFloat(), y.toFloat(), z.toFloat()) | ||
| fun BlockPos.toPos3d(): Pos3d = Pos3d(x.toDouble(), y.toDouble(), z.toDouble()) |
Author
There was a problem hiding this comment.
add BlockPos.toVec3i(), etc. methods for completeness.
Comment on lines
+2
to
+14
| "package": "net.silkmc.silk.core.mixin", | ||
| "required": true, | ||
| "compatibilityLevel": "JAVA_21", | ||
| "mixins": [ | ||
| "block.AbstractBlockAccessor", | ||
| "entity.MixinEntity", | ||
| "entity.MixinLivingEntity", | ||
| "server.MixinMinecraftServer", | ||
| "server.MixinPlayerList", | ||
| "server.MixinServerConfigurationPacketListenerImpl", | ||
| "server.MixinServerGamePacketListenerImpl", | ||
| "server.MixinServerLoginPacketListenerImpl" | ||
| ] |
Author
There was a problem hiding this comment.
revert this change completely (changes nothing, artifact of not properly reverting another other change)
- 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 <solonovamax@12oclockpoint.com>
- 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 <solonovamax@12oclockpoint.com>
Also suppress some warnings in the other *Operations files Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
Soft depends on fabric-permissions-api-v0. Falls back to vanilla permission checks if it's not present Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
See: FabricMC/fabric-loom#1153 Using layered mappings with a custom mapping is preferred.
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
66a2d96 to
2641fc5
Compare
solonovamax
added a commit
to solonovamax/silk
that referenced
this pull request
Jan 27, 2025
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
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
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 math extensions/functions, such as:
Vector3i,Vector3f,Vector3d,Vector2i,Vector2f, andVector2dPos{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. theNumberoverload is still provided if, for whatever reason, someone has like aByteorShortor 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, asVec3is namedVec3don yarn)Matrix2f,Matrix2d,Matrix3f,Matrix3d,Matrix3x2f,Matrix3x2d,Matrix4f,Matrix4d,Matrix4x3f, andMatrix4x3dAABB/Boxconvenience extensions forSplit of into a separate PR. See Misc Additions #67.World.convenience extensions for
I just find this slightly cleaner for registering things.
Split off into a separate PR. See Adds extensions for registration #66.Registry, allowing for things like~~