-
Notifications
You must be signed in to change notification settings - Fork 13
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
f5018e9
commit 91d7cf9
Showing
11 changed files
with
131 additions
and
17 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
common/src/main/java/com/github/dimadencep/mods/rrls/ConfigExpectPlatform.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
10 changes: 10 additions & 0 deletions
10
common/src/main/java/com/github/dimadencep/mods/rrls/config/AprilFool.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
10 changes: 10 additions & 0 deletions
10
common/src/main/java/com/github/dimadencep/mods/rrls/config/HideType.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
10 changes: 10 additions & 0 deletions
10
common/src/main/java/com/github/dimadencep/mods/rrls/config/ShowIn.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
10 changes: 10 additions & 0 deletions
10
common/src/main/java/com/github/dimadencep/mods/rrls/config/Type.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
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
57 changes: 57 additions & 0 deletions
57
common/src/main/java/com/github/dimadencep/mods/rrls/mixins/workaround/DrawContentMixin.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,57 @@ | ||
package com.github.dimadencep.mods.rrls.mixins.workaround; | ||
|
||
import com.llamalad7.mixinextras.injector.wrapoperation.Operation; | ||
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; | ||
import net.minecraft.client.gui.DrawContext; | ||
import net.minecraft.client.texture.GuiAtlasManager; | ||
import net.minecraft.client.texture.Scaling; | ||
import net.minecraft.client.texture.Sprite; | ||
import net.minecraft.util.Identifier; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
|
||
@Mixin(DrawContext.class) | ||
public abstract class DrawContentMixin { | ||
@WrapOperation( | ||
method = "*", | ||
at = @At( | ||
value = "INVOKE", | ||
target = "Lnet/minecraft/client/texture/GuiAtlasManager;getSprite(Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/texture/Sprite;" | ||
) | ||
) | ||
public Sprite rrls$fixSpriteCrash(GuiAtlasManager instance, Identifier objectId, Operation<Sprite> original) { | ||
try { | ||
return original.call(instance, objectId); | ||
} catch (Throwable th) { | ||
return null; | ||
} | ||
} | ||
|
||
@WrapOperation( | ||
method = "*", | ||
at = @At( | ||
value = "INVOKE", | ||
target = "Lnet/minecraft/client/texture/GuiAtlasManager;getScaling(Lnet/minecraft/client/texture/Sprite;)Lnet/minecraft/client/texture/Scaling;" | ||
) | ||
) | ||
public Scaling rrls$fixSpriteCrash(GuiAtlasManager instance, Sprite sprite, Operation<Scaling> original) { | ||
if (sprite == null) | ||
return null; | ||
|
||
return original.call(instance, sprite); | ||
} | ||
|
||
@WrapOperation( | ||
method = "drawGuiTexture(Lnet/minecraft/util/Identifier;IIIIIIIII)V", | ||
at = @At( | ||
value = "INVOKE", | ||
target = "Lnet/minecraft/client/gui/DrawContext;drawSprite(Lnet/minecraft/client/texture/Sprite;IIIII)V" | ||
) | ||
) | ||
public void rrls$fixSpriteCrash(DrawContext instance, Sprite sprite, int x, int y, int z, int width, int height, Operation<Void> original) { | ||
if (sprite == null) | ||
return; | ||
|
||
original.call(instance, sprite, x, y, z, width, height); | ||
} | ||
} |
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
10 changes: 10 additions & 0 deletions
10
fabric/src/main/java/com/github/dimadencep/mods/rrls/fabric/ConfigExpectPlatformImpl.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
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 |
---|---|---|
|
@@ -8,6 +8,8 @@ pluginManagement { | |
} | ||
} | ||
|
||
rootProject.name = "rrls" | ||
|
||
include("common") | ||
include("fabric") | ||
include("forge") |