Skip to content

Commit b95c89f

Browse files
committed
Fix outdated mixins.
1 parent d4b5200 commit b95c89f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

common/src/main/java/net/darkhax/splashy/mixin/MixinSplashManager.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
import net.darkhax.splashy.Config;
44
import net.darkhax.splashy.platform.Services;
55
import net.minecraft.client.Minecraft;
6+
import net.minecraft.client.gui.components.SplashRenderer;
67
import net.minecraft.client.resources.SplashManager;
78
import net.minecraft.client.resources.language.I18n;
89
import net.minecraft.server.packs.resources.ResourceManager;
910
import net.minecraft.util.profiling.ProfilerFiller;
1011
import org.spongepowered.asm.mixin.Final;
1112
import org.spongepowered.asm.mixin.Mixin;
1213
import org.spongepowered.asm.mixin.Shadow;
14+
import org.spongepowered.asm.mixin.Unique;
1315
import org.spongepowered.asm.mixin.injection.At;
1416
import org.spongepowered.asm.mixin.injection.Inject;
1517
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@@ -22,6 +24,9 @@
2224
@Mixin(value = SplashManager.class)
2325
public class MixinSplashManager {
2426

27+
@Unique
28+
private static final SplashRenderer JARED_BIRTHDAY = new SplashRenderer("Happy Birthday Jared <3");
29+
2530
@Final
2631
@Shadow
2732
private List<String> splashes;
@@ -60,15 +65,15 @@ private void apply(List<String> vanillaValues, ResourceManager resources, Profil
6065
}
6166
}
6267

63-
@Inject(method = "getSplash()Ljava/lang/String;", at = @At("RETURN"), cancellable = true)
64-
private void getSplash(CallbackInfoReturnable<String> cir) {
68+
@Inject(method = "getSplash()Lnet/minecraft/client/gui/components/SplashRenderer;", at = @At("RETURN"), cancellable = true)
69+
private void getSplash(CallbackInfoReturnable<SplashRenderer> cir) {
6570

6671
// Special Days
6772
final LocalDateTime now = LocalDateTime.now();
6873

6974
if (now.getMonth() == Month.JUNE && now.getDayOfMonth() == 29) {
7075

71-
cir.setReturnValue("Happy Birthday Jared <3");
76+
cir.setReturnValue(JARED_BIRTHDAY);
7277
}
7378
}
7479
}

0 commit comments

Comments
 (0)