Inspired by 2020's April Fools' 20w14infinite Snapshot, this mod brings endless randomly generated dimensions into Minecraft.
at master 20 lines 773 B view raw
1package net.lerariemann.infinity.util; 2 3import net.lerariemann.infinity.registry.core.ModStatusEffects; 4import net.lerariemann.infinity.util.screen.F4Screen; 5import net.minecraft.client.Minecraft; 6import net.minecraft.world.entity.player.Player; 7 8/** Mod methods that should only be loaded on the client (trying to load these on the server crashes it, don't do that). 9 * @see InfinityMethods */ 10public interface ClientMethods { 11 static void setF4Screen(Player player) { 12 if (player.isLocalPlayer()) { 13 Minecraft.getInstance().setScreen(F4Screen.of(player)); 14 } 15 } 16 17 static void tryApplySpecial(ModStatusEffects.SpecialEffect eff, int duration, int amplifier) { 18 eff.tryApplySpecial(Minecraft.getInstance().player, duration, amplifier); 19 } 20}