All Downloads are FREE. Search and download functionalities are using the official Maven repository.

top.hendrixshen.magiclib.impl.compat.minecraft.client.MinecraftCompatImpl Maven / Gradle / Ivy

There is a newer version: 0.6.59
Show newest version
package top.hendrixshen.magiclib.impl.compat.minecraft.client;

import lombok.Getter;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.class_1041;
import net.minecraft.class_310;
import org.jetbrains.annotations.NotNull;
import top.hendrixshen.magiclib.api.compat.AbstractCompat;
import top.hendrixshen.magiclib.api.compat.minecraft.client.MinecraftCompat;

@Environment(EnvType.CLIENT)
public class MinecraftCompatImpl extends AbstractCompat implements MinecraftCompat {
    @Getter(lazy = true)
    private static final MinecraftCompatImpl instance = new MinecraftCompatImpl(class_310.method_1551());

    private MinecraftCompatImpl(@NotNull class_310 type) {
        super(type);
    }

    @Override
    public class_1041 getWindow() {
        //#if MC > 11404
        return this.get().method_22683();
        //#else
        //$$ return this.get().window;
        //#endif
    }

    @Override
    public @NotNull class_310 get() {
        return MinecraftCompat.super.get();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy