2017-06-17 00:48:49 +02:00
|
|
|
//TODO Achievement GUI?
|
|
|
|
/*
|
2020-09-09 16:48:43 +02:00
|
|
|
package de.ellpeck.actuallyadditions.booklet.misc;
|
2015-08-28 21:17:09 +02:00
|
|
|
|
2020-09-09 16:48:43 +02:00
|
|
|
import de.ellpeck.actuallyadditions.common.achievement.InitAchievements;
|
|
|
|
import de.ellpeck.actuallyadditions.common.util.ModUtil;
|
2015-08-28 21:17:09 +02:00
|
|
|
import net.minecraft.client.gui.GuiScreen;
|
|
|
|
import net.minecraft.client.gui.achievement.GuiAchievements;
|
2016-05-19 20:05:12 +02:00
|
|
|
import net.minecraft.stats.StatisticsManager;
|
2016-01-07 18:20:59 +01:00
|
|
|
import net.minecraftforge.fml.relauncher.ReflectionHelper;
|
2016-11-10 19:50:01 +01:00
|
|
|
import net.minecraftforge.fml.relauncher.Side;
|
|
|
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
2016-11-17 17:36:00 +01:00
|
|
|
import org.lwjgl.input.Keyboard;
|
|
|
|
|
|
|
|
import java.io.IOException;
|
2015-08-28 21:17:09 +02:00
|
|
|
|
2015-09-30 19:18:13 +02:00
|
|
|
/**
|
|
|
|
* (Partially excerpted from Botania by Vazkii with permission, thanks!)
|
2017-06-17 00:48:49 +02:00
|
|
|
*
|
2016-11-10 19:50:01 +01:00
|
|
|
@SideOnly(Side.CLIENT)
|
2015-08-28 21:17:09 +02:00
|
|
|
public class GuiAAAchievements extends GuiAchievements{
|
|
|
|
|
2016-05-19 20:05:12 +02:00
|
|
|
public GuiAAAchievements(GuiScreen screen, StatisticsManager statistics){
|
|
|
|
super(screen, statistics);
|
2016-01-16 20:06:25 +01:00
|
|
|
try{
|
|
|
|
ReflectionHelper.setPrivateValue(GuiAchievements.class, this, InitAchievements.pageNumber, 20);
|
|
|
|
}
|
|
|
|
catch(Exception e){
|
|
|
|
ModUtil.LOGGER.error("Something went wrong trying to open the Achievements GUI!", e);
|
|
|
|
}
|
2015-08-28 21:17:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void initGui(){
|
|
|
|
super.initGui();
|
2016-11-17 17:36:00 +01:00
|
|
|
|
|
|
|
try{
|
|
|
|
this.buttonList.remove(1);
|
|
|
|
}
|
|
|
|
catch(Exception e){
|
|
|
|
ModUtil.LOGGER.error("Something went wrong trying to initialize the Achievements GUI!", e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void keyTyped(char typedChar, int key) throws IOException{
|
|
|
|
if(key == Keyboard.KEY_ESCAPE || key == this.mc.gameSettings.keyBindInventory.getKeyCode()){
|
|
|
|
this.mc.displayGuiScreen(this.parentScreen);
|
|
|
|
}
|
2016-11-26 21:32:27 +01:00
|
|
|
else{
|
|
|
|
super.keyTyped(typedChar, key);
|
|
|
|
}
|
2015-08-28 21:17:09 +02:00
|
|
|
}
|
|
|
|
}
|
2019-02-27 19:53:05 +01:00
|
|
|
*/
|