generated from jaredlll08/MultiLoader-Template
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
52562a1
commit 8f5f872
Showing
10 changed files
with
95 additions
and
81 deletions.
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
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
33 changes: 33 additions & 0 deletions
33
common/src/main/java/foundry/veil/mixin/fix/MemUtilMixin.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package foundry.veil.mixin.fix; | ||
|
||
import org.joml.Matrix3f; | ||
import org.spongepowered.asm.mixin.Final; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Overwrite; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import sun.misc.Unsafe; | ||
|
||
@Mixin(targets = "org.joml.MemUtil$MemUtilUnsafe", remap = false) | ||
public class MemUtilMixin { | ||
|
||
@Shadow | ||
@Final | ||
public static Unsafe UNSAFE; | ||
|
||
@Shadow | ||
@Final | ||
public static long Matrix3f_m00; | ||
|
||
/** | ||
* @author Ocelot | ||
* @reason Apply the fix from <a href="https://github.com/JOML-CI/JOML/commit/933eb412bb19ce7b6f98062e1c94449c50d92dca">933eb41</a> | ||
*/ | ||
@Overwrite | ||
public static void put3x4(Matrix3f m, long destAddr) { | ||
for (int i = 0; i < 3; i++) { | ||
UNSAFE.putLong(null, destAddr + (i << 4), UNSAFE.getLong(m, Matrix3f_m00 + 12 * i)); | ||
UNSAFE.putFloat(null, destAddr + (i << 4) + 8, UNSAFE.getFloat(m, Matrix3f_m00 + 8 + 12 * i)); | ||
UNSAFE.putFloat(null, destAddr + (i << 4) + 12, 0.0f); | ||
} | ||
} | ||
} |
7 changes: 6 additions & 1 deletion
7
common/src/main/resources/assets/veil/pinwheel/shaders/program/necromancer/skinned_mesh.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
{ | ||
"vertex": "veil:necromancer/skinned_mesh", | ||
"fragment": "veil:necromancer/skinned_mesh" | ||
"fragment": "veil:necromancer/skinned_mesh", | ||
"definitions": [ | ||
{ | ||
"NECROMANCER_BONE_BUFFER_SIZE": 1 | ||
} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"required": true, | ||
"minVersion": "0.8", | ||
"package": "foundry.veil.mixin.fix", | ||
"compatibilityLevel": "JAVA_21", | ||
"refmap": "${mod_id}.refmap.json", | ||
"mixins": [ | ||
"MemUtilMixin" | ||
], | ||
"client": [], | ||
"injectors": { | ||
"defaultRequire": 1 | ||
} | ||
} | ||
|
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