diff --git a/src/main/java/ru/dbotthepony/mc/otm/mixin/SplashManagerMixin.java b/src/main/java/ru/dbotthepony/mc/otm/mixin/SplashManagerMixin.java new file mode 100644 index 000000000..99e17c70e --- /dev/null +++ b/src/main/java/ru/dbotthepony/mc/otm/mixin/SplashManagerMixin.java @@ -0,0 +1,40 @@ +package ru.dbotthepony.mc.otm.mixin; + +import net.minecraft.client.resources.SplashManager; +import net.minecraft.server.packs.resources.ResourceManager; +import net.minecraft.util.profiling.ProfilerFiller; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +import java.util.List; + +@Mixin(SplashManager.class) +public abstract class SplashManagerMixin { + @Shadow + public List splashes; + + @Inject( + at = @At("TAIL"), + method = "apply(Ljava/util/List;Lnet/minecraft/server/packs/resources/ResourceManager;Lnet/minecraft/util/profiling/ProfilerFiller;)V" + ) + public void otmSplashes(List splashes, ResourceManager p_118879_, ProfilerFiller p_118880_, CallbackInfo ci) { + this.splashes.add("42 is the answer!"); + this.splashes.add("Now with matter!"); + this.splashes.add("Now with four dimensions!"); + this.splashes.add("Now with more ways to slice Creepers!"); + this.splashes.add("Batteries not included!"); + this.splashes.add("As it was 13 nanoseconds ago!"); + this.splashes.add("Smart AI is smart enough to fail Turing test!"); + this.splashes.add("Neural computing!"); + this.splashes.add("Swimming through quantum field!"); + this.splashes.add("For biological and digital alike!"); + this.splashes.add("Digital is the next form of Biological!"); + + this.splashes.add("Also try Starbound!"); + this.splashes.add("Also try No Man's Sky!"); + this.splashes.add("Also try Factorio!"); + } +} diff --git a/src/main/resources/overdrive_that_matters.mixins.json b/src/main/resources/overdrive_that_matters.mixins.json index 37f1c45b8..95ba2b017 100644 --- a/src/main/resources/overdrive_that_matters.mixins.json +++ b/src/main/resources/overdrive_that_matters.mixins.json @@ -23,6 +23,7 @@ ], "client": [ "MixinGameRenderer", - "MixinMinecraft" + "MixinMinecraft", + "SplashManagerMixin" ] }