本文整理汇总了Java中net.minecraftforge.fml.client.SplashProgress类的典型用法代码示例。如果您正苦于以下问题:Java SplashProgress类的具体用法?Java SplashProgress怎么用?Java SplashProgress使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SplashProgress类属于net.minecraftforge.fml.client包,在下文中一共展示了SplashProgress类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: bind
import net.minecraftforge.fml.client.SplashProgress; //导入依赖的package包/类
@Hook("net.minecraftforge.fml.client.SplashProgress$Texture#bind")
public static void bind(SplashProgress.Texture texture) {
if (texture != SplashProgress.forgeTexture)
return;
int f = (++index / (60 / 4)) % gifs.length;
SplashProgress.Texture gif = gifs[f];
gif.bind();
float fw = (float) gif.getWidth() / 2;
float fh = (float) gif.getHeight() / 2;
glPushMatrix();
int w = Display.getWidth(), h = Display.getHeight(), offset = 20;
glLoadIdentity();
glTranslatef(min(0, (720 - w) / 2) + offset, min(0, (480 - h) / 2) + h - fh - offset, 0);
glBegin(GL_QUADS);
gif.texCoord(0, 0, 0);
glVertex2f(-fw, -fh);
gif.texCoord(0, 0, 1);
glVertex2f(-fw, fh);
gif.texCoord(0, 1, 1);
glVertex2f(fw, fh);
gif.texCoord(0, 1, 0);
glVertex2f(fw, -fh);
glEnd();
glPopMatrix();
}
示例2: performStartupChecks
import net.minecraftforge.fml.client.SplashProgress; //导入依赖的package包/类
@Override
@SuppressWarnings("deprecated")
public void performStartupChecks()
{
//If the mod is disabled by configuration, just put back the initial value.
if(!ConfigurationHandler.instance().isFullscreenWindowedEnabled()) {
return;
}
if(ConfigurationHandler.instance().isMaximumCompatibilityEnabled()){
dsHandler.setInitialFullscreen(client.gameSettings.fullScreen, ConfigurationHandler.instance().getFullscreenMonitor());
// This is the correct way to set fullscreen at launch, but LWJGL limitations means we might crash the game if
// another mod tries to do a similar Display changing operation. Doesn't help the API says "don't use this"
}else{
try {
//FIXME: Living dangerously here... Is there a better way of doing this?
SplashProgress.pause();
toggleFullScreen(client.gameSettings.fullScreen, ConfigurationHandler.instance().getFullscreenMonitor());
SplashProgress.resume();
}catch(NoClassDefFoundError e) {
LogHelper.warn("Error while doing startup checks, are you using an old version of Forge ? " + e);
toggleFullScreen(client.gameSettings.fullScreen, ConfigurationHandler.instance().getFullscreenMonitor());
}
}
}
示例3: startToHackScreen
import net.minecraftforge.fml.client.SplashProgress; //导入依赖的package包/类
void startToHackScreen()
{
SplashProgress.pause();
DebugLogger.info("Start to check mods updatable.");
// new Checker().run();
SplashProgress.resume();
}