mirror of
https://github.com/GTNewHorizons/Hardcore-Ender-Expansion.git
synced 2026-10-26 14:24:03 +00:00
Tweaked help and finished achievement screen, TODO test
This commit is contained in:
1 parent
38eda0ac53
commit
92c47223e6
3 files changed
+32
-13
No files matched your search
@@ -4,9 +4,15 @@ import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.achievement.GuiAchievements;
|
||||
import net.minecraft.stats.Achievement;
|
||||
import net.minecraft.stats.AchievementList;
|
||||
import net.minecraft.stats.StatFileWriter;
|
||||
import net.minecraftforge.common.AchievementPage;
|
||||
import chylex.hee.mechanics.compendium.content.KnowledgeObject;
|
||||
import chylex.hee.mechanics.compendium.events.CompendiumEventsClient;
|
||||
import chylex.hee.mechanics.compendium.objects.IKnowledgeObjectInstance;
|
||||
import chylex.hee.mechanics.compendium.util.KnowledgeUtils;
|
||||
import chylex.hee.system.achievements.AchievementManager;
|
||||
import chylex.hee.system.util.MathUtil;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -27,7 +33,7 @@ public class GuiAchievementsCustom extends GuiAchievements{
|
||||
GuiButton btn = iter.next();
|
||||
|
||||
if (btn.id == 1){
|
||||
btn.width = 140;
|
||||
btn.width = 120;
|
||||
btn.xPosition = (width>>1)-(btn.width>>1);
|
||||
}
|
||||
else if (btn.id == 2){
|
||||
@@ -40,8 +46,23 @@ public class GuiAchievementsCustom extends GuiAchievements{
|
||||
@Override
|
||||
protected void mouseClicked(int mouseX, int mouseY, int buttonId){
|
||||
if (buttonId == 0 && achievements != null){
|
||||
for(Achievement achievement:achievements.getAchievements()){
|
||||
// TODO detect click and return to Compendium
|
||||
int offsetX = MathUtil.clamp(MathUtil.floor(field_146567_u),AchievementList.minDisplayColumn*24-112,AchievementList.maxDisplayColumn*24-78); // OBFUSCATED viewportX
|
||||
int offsetY = MathUtil.clamp(MathUtil.floor(field_146566_v),AchievementList.minDisplayRow*24-112,AchievementList.maxDisplayRow*24-78); // OBFUSCATED viewportY
|
||||
|
||||
int centerX = (width-field_146555_f)/2+16; // OBFUSCATED viewportWidth, 256
|
||||
int centerY = (height-field_146557_g)/2+17; // OBFUSCATED viewportHeight, 202
|
||||
|
||||
float realMouseX = (mouseX-centerX)*field_146570_r; // OBFUSCATED viewportScale
|
||||
float realMouseY = (mouseY-centerY)*field_146570_r;
|
||||
|
||||
for(Achievement achievement:achievements.getAchievements()){ // TODO ignore achievements that are not on the screen
|
||||
int x = achievement.displayColumn*24-offsetX;
|
||||
int y = achievement.displayRow*24-offsetY;
|
||||
|
||||
if (x >= -24 && y >= -24 && x <= 224F*field_146570_r && y <= 155F*field_146570_r && realMouseX >= x && realMouseX <= x+22 && realMouseY >= y && realMouseY <= y+22){
|
||||
KnowledgeObject<? extends IKnowledgeObjectInstance<?>> obj = KnowledgeUtils.tryGetFromItemStack(achievement.theItemStack);
|
||||
if (obj != null)CompendiumEventsClient.openCompendium(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -272,7 +272,6 @@ public final class KnowledgeRegistrations{
|
||||
new KnowledgeFragmentText(7),
|
||||
new KnowledgeFragmentText(8),
|
||||
new KnowledgeFragmentText(9),
|
||||
new KnowledgeFragmentText(17),
|
||||
new KnowledgeFragmentText(18)
|
||||
});
|
||||
|
||||
|
||||
@@ -22,16 +22,15 @@ ec.help.requirements=Another fragment must be bought first
|
||||
|
||||
ec.reg.0=Welcome to the Ender Compendium, the source of all knowledge about the End!
|
||||
ec.reg.1=The Compendium is divided into phases, each contains blocks, items and mobs you can find in that phase.
|
||||
ec.reg.2=In order to reveal information about these objects, you have to either discover them or pay extra Knowledge Points to unlock them.
|
||||
ec.reg.3=Then you can spend your points on individual Knowledge Fragments, which hold the information.
|
||||
ec.reg.4=Newly discovered object will show up in the bottom right corner of your screen. Opening the Compendium right after that will open the object.
|
||||
ec.reg.5=Note that discovering objects also unlocks some of their fragments and gives you points, whereas buying the object does neither.
|
||||
ec.reg.6=Prices of objects and fragments will gradually increase the further you progress.
|
||||
ec.reg.2=To reveal information about these objects, you have to discover them or unlock them using Knowledge Points.
|
||||
ec.reg.3=Then you can spend your points on Knowledge Fragments, which hold the information.
|
||||
ec.reg.4=Newly discovered object will appear in the bottom right corner of your screen. Opening the Compendium will then show the object.
|
||||
ec.reg.5=Note that discovering objects also unlocks some of their fragments and gives you points.
|
||||
ec.reg.6=Prices of objects and fragments gradually increase the further you progress.
|
||||
ec.reg.7=Knowledge Notes are items found in dungeons and traded by villagers. Using them gives you Knowledge Points.
|
||||
ec.reg.8=Important progression points are shown in the Achievements screen.
|
||||
ec.reg.9=For easier control of the Compendium, you can use the right mouse button instead of the Back button, and mouse wheel to scroll objects and pages.
|
||||
ec.reg.17=Opening the Compendium while looking at a block, item, or a mob opens the appropriate object.
|
||||
ec.reg.18=The same happens when you press the Compendium key while hovering over and item in a GUI.
|
||||
ec.reg.8=Important progression points are shown in the Achievements screen. Click an achievement to open it in the Compendium.
|
||||
ec.reg.9=You can use the right mouse button instead of the Back button, and mouse wheel to scroll objects and pages.
|
||||
ec.reg.18=Pressing the Compendium key while looking at an object or hovering over an item in a GUI will show it in the Compendium.
|
||||
ec.reg.19=This behavior works with Not Enough Items too, but you can bypass it by holding CTRL.
|
||||
|
||||
ec.reg.80=Essence is used to unleash power of altars.
|
||||
|
||||
Reference in new issue
Block a user