top.hendrixshen.magiclib.impl.compat.minecraft.client.MinecraftCompatImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of magiclib-minecraft-api-1.19.3-fabric Show documentation
Show all versions of magiclib-minecraft-api-1.19.3-fabric Show documentation
Unleash magic into Minecraft, infuse souls, ascend to heaven!
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