forked from modmuss50/OptiFabric
-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Turns out part of the old mixin was useful after all Closes #1224 Fixes #1218 Fixes #1164 Fixes #1149 Fixes #1107 Fixes #1089 Fixes #1036 Fixes #1011 Fixes #980
- Loading branch information
Showing
4 changed files
with
31 additions
and
1 deletion.
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
21 changes: 21 additions & 0 deletions
21
src/main/java/me/modmuss50/optifabric/mixin/DefaultResourcePackMixin.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,21 @@ | ||
package me.modmuss50.optifabric.mixin; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
import net.minecraft.resource.DefaultResourcePack; | ||
|
||
import me.modmuss50.optifabric.mod.OptifineResources; | ||
|
||
@Mixin(value = DefaultResourcePack.class, priority = 400) | ||
abstract class DefaultResourcePackMixin { | ||
@Redirect(method = "getResourceOF", remap = false, | ||
at = @At(value = "INVOKE", target = "Lnet/optifine/reflect/ReflectorForge;getOptiFineResourceStream(Ljava/lang/String;)Ljava/io/InputStream;")) | ||
private InputStream onFindInputStream(String path) throws IOException { | ||
return OptifineResources.INSTANCE.getResource(path); | ||
} | ||
} |
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,7 @@ | ||
{ | ||
"parent": "optifabric.optifine.mixins.json", | ||
"package": "me.modmuss50.optifabric.mixin", | ||
"mixins": [ | ||
"DefaultResourcePackMixin" | ||
] | ||
} |