-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Forward port to 1.20.4 by RyanThePinkHacker. - Updated to 1.20 (thanks to RyanThePinkHacker) * Resolves #34 * Bumb dependencies to 1.20.1 * Fix compile errors in mixins * Bump fabric version * Fix crash from incorrect type for splash text * Reimplement vistas logo easter egg * Add SplashTextRenderer mixin * Fix easter egg logo
- Loading branch information
1 parent
23176d2
commit 57c58d4
Showing
12 changed files
with
122 additions
and
102 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
22 changes: 10 additions & 12 deletions
22
src/main/java/com/terraformersmc/vistas/mixin/MinecraftClientMixin.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
32 changes: 32 additions & 0 deletions
32
src/main/java/com/terraformersmc/vistas/mixin/SplashTextRendererMixin.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,32 @@ | ||
package com.terraformersmc.vistas.mixin; | ||
|
||
import com.terraformersmc.vistas.panorama.LogoControl; | ||
import com.terraformersmc.vistas.panorama.Panorama; | ||
import com.terraformersmc.vistas.title.VistasTitle; | ||
import net.fabricmc.api.EnvType; | ||
import net.fabricmc.api.Environment; | ||
import net.minecraft.client.font.TextRenderer; | ||
import net.minecraft.client.gui.DrawContext; | ||
import net.minecraft.client.gui.screen.SplashTextRenderer; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.ModifyArg; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
@Environment(EnvType.CLIENT) | ||
@Mixin(SplashTextRenderer.class) | ||
public abstract class SplashTextRendererMixin { | ||
@ModifyArg(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/RotationAxis;rotationDegrees(F)Lorg/joml/Quaternionf;")) | ||
private float vistas$render$changeAngle(float in) { | ||
return (float) VistasTitle.CURRENT.getValue().getLogoControl().getSplashRot(); | ||
} | ||
|
||
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/util/math/MatrixStack;multiply(Lorg/joml/Quaternionf;)V", shift = At.Shift.BEFORE)) | ||
private void vistas$render(DrawContext context, int screenWidth, TextRenderer textRenderer, int alpha, CallbackInfo ci) { | ||
Panorama panorama = VistasTitle.CURRENT.getValue(); | ||
LogoControl logo = panorama.getLogoControl(); | ||
|
||
context.getMatrices().translate(logo.getSplashX(), logo.getSplashY(), 0.0D); | ||
} | ||
} |
23 changes: 11 additions & 12 deletions
23
src/main/java/com/terraformersmc/vistas/mixin/SplashTextResourceSupplierMixin.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
Oops, something went wrong.