mirror of
https://github.com/GTNewHorizons/Draconic-Evolution.git
synced 2026-11-20 20:22:10 +00:00
25/9/2014
This commit is contained in:
1 parent
b3ec26e2ad
commit
0bfcc29d4d
29 files changed
+692
-140
No files matched your search
+3
-1
@@ -21,6 +21,8 @@ public class BasePage extends GuiScreen {
|
||||
private final int ySize = 202;
|
||||
protected PageCollection collection;
|
||||
|
||||
public BasePage(){}
|
||||
|
||||
public BasePage(String referenceName, PageCollection collection) {
|
||||
this.REFERENCE_NAME = referenceName;
|
||||
this.mc = Minecraft.getMinecraft();
|
||||
@@ -83,7 +85,7 @@ public class BasePage extends GuiScreen {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(GuiButton button) {
|
||||
collection.changeActivePage("INDEX");
|
||||
if (button.id == 0)collection.changeActivePage("INDEX");
|
||||
}
|
||||
@Override
|
||||
public void mouseMovedOrUp(int par1, int par2, int par3){super.mouseMovedOrUp(par1, par2, par3);}
|
||||
|
||||
+2
-2
@@ -25,7 +25,7 @@ import java.util.Map;
|
||||
/**
|
||||
* Created by Brandon on 18/09/2014.
|
||||
*/
|
||||
public class CraftingPage extends TitledPage {
|
||||
public class CraftingInfoPage extends TitledPage {
|
||||
protected static RenderItem itemRenderer = new RenderItem();
|
||||
public ItemStack result;
|
||||
private boolean isSmelting = false;
|
||||
@@ -35,7 +35,7 @@ public class CraftingPage extends TitledPage {
|
||||
private List<String> formattedDescription;
|
||||
private float descriptionScale = 0.66f;
|
||||
|
||||
public CraftingPage(String name, PageCollection collection, ItemStack itemStack, String unlocalizedDescription) {
|
||||
public CraftingInfoPage(String name, PageCollection collection, ItemStack itemStack, String unlocalizedDescription) {
|
||||
super(name, true, collection, itemStack.getUnlocalizedName()+".name", 0x00ff00);
|
||||
this.result = itemStack;
|
||||
this.recipe = getFirstRecipeForItem(itemStack);
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.brandon3055.draconicevolution.client.interfaces.manual;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by Brandon on 20/09/2014.
|
||||
*/
|
||||
public class DescriptionPage extends TutorialPage {
|
||||
private String rawDescription;
|
||||
public DescriptionPage(String name, PageCollection collection, String unlocalizedDescription) {
|
||||
super(name, collection, null);
|
||||
this.rawDescription = unlocalizedDescription;
|
||||
this.formattedDescription = new List[1];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderBackgroundLayer(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
super.renderBackgroundLayer(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
super.drawScreen(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
addDescription(minecraft, offsetX, offsetY-50, getFormattedText(fontRendererObj, ttl(rawDescription), 0));
|
||||
}
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
package com.brandon3055.draconicevolution.client.interfaces.manual;
|
||||
|
||||
import com.brandon3055.draconicevolution.common.lib.References;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by Brandon on 20/09/2014.
|
||||
*/
|
||||
public class EnderResurrectionTutorialPage extends TutorialPage {
|
||||
public static final ResourceLocation image = new ResourceLocation(References.RESOURCESPREFIX + "textures/gui/images/Ritual_of_ender_Resurrection.png");
|
||||
public EnderResurrectionTutorialPage(String name, PageCollection collection) {
|
||||
super(name, collection, StatCollector.translateToLocal("manual.de.roerth.txt"));
|
||||
this.lastPage = 1;
|
||||
this.formattedDescription = new List[6];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderBackgroundLayer(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
super.renderBackgroundLayer(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
super.drawScreen(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
GL11.glColor4f(1f, 1f, 1f, 1f);
|
||||
switch (page) {
|
||||
case 0:
|
||||
page0(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
break;
|
||||
case 1:
|
||||
page1(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void page0(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY){
|
||||
minecraft.renderEngine.bindTexture(image);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.5f, 0.5f, 1f);
|
||||
drawTexturedModalRect((offsetX+64)*2, (offsetY+14)*2, 0, 0, 256, 256);
|
||||
GL11.glPopMatrix();
|
||||
addDescription(minecraft, offsetX, offsetY+38, getFormattedText(fontRendererObj, ttl("manual.de.roertpage0a.txt"), 0));
|
||||
addDescription(minecraft, offsetX, offsetY+94, getFormattedText(fontRendererObj, ttl("manual.de.roertpage0b.txt"), 1));
|
||||
}
|
||||
|
||||
private void page1(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY){
|
||||
addDescription(minecraft, offsetX, offsetY-50, getFormattedText(fontRendererObj, ttl("manual.de.roertpage1a.txt"), 2));
|
||||
addDescription(minecraft, offsetX, offsetY-28, getFormattedText(fontRendererObj, ttl("manual.de.roertpage1b.txt"), 3));
|
||||
addDescription(minecraft, offsetX, offsetY-6, getFormattedText(fontRendererObj, ttl("manual.de.roertpage1c.txt"), 4));
|
||||
addDescription(minecraft, offsetX, offsetY+23, getFormattedText(fontRendererObj, ttl("manual.de.roertpage1d.txt"), 5));
|
||||
}
|
||||
}
|
||||
+231
@@ -0,0 +1,231 @@
|
||||
package com.brandon3055.draconicevolution.client.interfaces.manual;
|
||||
|
||||
import com.brandon3055.draconicevolution.common.lib.References;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by Brandon on 20/09/2014.
|
||||
*/
|
||||
public class EnergyCoreTutorialPage extends TutorialPage {
|
||||
public static final ResourceLocation Energy_Core = new ResourceLocation(References.RESOURCESPREFIX + "textures/gui/images/T5_Energy_Core.png");
|
||||
public static final ResourceLocation Stabilizer_Placement = new ResourceLocation(References.RESOURCESPREFIX + "textures/gui/images/Stabilizer_Placement.png");
|
||||
public static final ResourceLocation Core_Tiers = new ResourceLocation(References.RESOURCESPREFIX + "textures/gui/images/Core_Tiers.png");
|
||||
public static final ResourceLocation Pylon = new ResourceLocation(References.RESOURCESPREFIX + "textures/gui/images/Energy_Pylon.png");
|
||||
public static final ResourceLocation Pylon_Particles = new ResourceLocation(References.RESOURCESPREFIX + "textures/gui/images/Energy_Pylon_Particles.png");
|
||||
public static final ResourceLocation Pylon_Particles_2 = new ResourceLocation(References.RESOURCESPREFIX + "textures/gui/images/Energy_Pylon_Particles_2.png");
|
||||
public static final ResourceLocation Pylon_y_Placement = new ResourceLocation(References.RESOURCESPREFIX + "textures/gui/images/Pylon_y_Placement.png");
|
||||
|
||||
|
||||
public EnergyCoreTutorialPage(String name, PageCollection collection) {
|
||||
super(name, collection, StatCollector.translateToLocal("manual.de.ecth.txt"));
|
||||
this.lastPage = 11;
|
||||
this.formattedDescription = new List[15];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderBackgroundLayer(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
super.renderBackgroundLayer(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
super.drawScreen(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
GL11.glColor4f(1f, 1f, 1f, 1f);
|
||||
switch (page){
|
||||
case 0:
|
||||
page0(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
break;
|
||||
case 1:
|
||||
page1(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
break;
|
||||
case 2:
|
||||
page2(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
break;
|
||||
case 3:
|
||||
page3(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
break;
|
||||
case 4:
|
||||
page4(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
break;
|
||||
case 5:
|
||||
page5(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
break;
|
||||
case 6:
|
||||
page6(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
break;
|
||||
case 7:
|
||||
page7(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
break;
|
||||
case 8:
|
||||
page8(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
break;
|
||||
case 9:
|
||||
page9(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
break;
|
||||
case 10:
|
||||
page10(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
break;
|
||||
case 11:
|
||||
page11(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void page0(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY){
|
||||
minecraft.renderEngine.bindTexture(Energy_Core);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.5f, 0.5f, 1f);
|
||||
drawTexturedModalRect((offsetX+64)*2, (offsetY+35)*2, 0, 0, 256, 256);
|
||||
GL11.glPopMatrix();
|
||||
addDescription(minecraft, offsetX, offsetY-60, getFormattedText(fontRendererObj, ttl("manual.de.ectdpage0a.txt"), 0));
|
||||
addDescription(minecraft, offsetX, offsetY+55, getFormattedText(fontRendererObj, ttl("manual.de.ectdpage0b.txt"), 1));
|
||||
}
|
||||
|
||||
private void page1(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY){
|
||||
minecraft.renderEngine.bindTexture(Stabilizer_Placement);
|
||||
GL11.glPushMatrix();
|
||||
double imageScale = 0.75 ;
|
||||
GL11.glScaled(imageScale, imageScale, 1D);
|
||||
double scaleMult = 1.125;
|
||||
drawTexturedModalRect((int)((offsetX+64)*scaleMult), (int)((offsetY+40)*scaleMult), 0, 0, 256, 256);
|
||||
GL11.glPopMatrix();
|
||||
addDescription(minecraft, offsetX, offsetY-60, getFormattedText(fontRendererObj, ttl("manual.de.ectdpage1a.txt"), 2));
|
||||
addDescription(minecraft, offsetX, offsetY+45, getFormattedText(fontRendererObj, ttl("manual.de.ectdpage1b.txt"), 3));
|
||||
}
|
||||
|
||||
private void page2(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY){
|
||||
minecraft.renderEngine.bindTexture(Core_Tiers);
|
||||
GL11.glPushMatrix();
|
||||
double imageScale = 5 ;
|
||||
GL11.glScaled(imageScale, imageScale, 1D);
|
||||
double scaleMult = 0.21;
|
||||
|
||||
int yOffset = (int)((minecraft.getSystemTime()/2000 % 2)*22);
|
||||
drawTexturedModalRect((int)((offsetX+49)*scaleMult), (int)((offsetY+15)*scaleMult), 180, 0+yOffset, 30, 20);
|
||||
GL11.glPopMatrix();
|
||||
drawCenteredString(fontRendererObj, "Tier 2", offsetX+128, offsetY+107, 0xff0000);
|
||||
addDescription(minecraft, offsetX, offsetY+45, getFormattedText(fontRendererObj, ttl("manual.de.ectdpage2.txt"), 4));
|
||||
}
|
||||
|
||||
private void page3(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY){
|
||||
minecraft.renderEngine.bindTexture(Core_Tiers);
|
||||
GL11.glPushMatrix();
|
||||
double imageScale = 5 ;
|
||||
GL11.glScaled(imageScale, imageScale, 1D);
|
||||
double scaleMult = 0.21;
|
||||
|
||||
int yOffset = (int)((minecraft.getSystemTime()/2000 % 2)*22);
|
||||
drawTexturedModalRect((int)((offsetX+54)*scaleMult), (int)((offsetY+15)*scaleMult), 151, 0+yOffset, 28, 20);
|
||||
GL11.glPopMatrix();
|
||||
drawCenteredString(fontRendererObj, "Tier 3", offsetX+128, offsetY+107, 0xff0000);
|
||||
addDescription(minecraft, offsetX, offsetY+45, getFormattedText(fontRendererObj, ttl("manual.de.ectdpage3.txt"), 5));
|
||||
}
|
||||
|
||||
private void page4(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY){
|
||||
minecraft.renderEngine.bindTexture(Core_Tiers);
|
||||
GL11.glPushMatrix();
|
||||
double imageScale = 5 ;
|
||||
GL11.glScaled(imageScale, imageScale, 1D);
|
||||
double scaleMult = 0.21;
|
||||
|
||||
int yOffset = (int)((minecraft.getSystemTime()/2000 % 3)*22);
|
||||
drawTexturedModalRect((int)((offsetX+54)*scaleMult), (int)((offsetY+15)*scaleMult), 123, 0+yOffset, 28, 20);
|
||||
GL11.glPopMatrix();
|
||||
drawCenteredString(fontRendererObj, "Tier 4", offsetX+128, offsetY+107, 0xff0000);
|
||||
addDescription(minecraft, offsetX, offsetY+45, getFormattedText(fontRendererObj, ttl("manual.de.ectdpage4.txt"), 6));
|
||||
}
|
||||
|
||||
private void page5(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY){
|
||||
minecraft.renderEngine.bindTexture(Core_Tiers);
|
||||
GL11.glPushMatrix();
|
||||
double imageScale = 5 ;
|
||||
GL11.glScaled(imageScale, imageScale, 1D);
|
||||
double scaleMult = 0.21;
|
||||
|
||||
int yOffset = (int)((minecraft.getSystemTime()/2000 % 4)*22);
|
||||
drawTexturedModalRect((int)((offsetX+60)*scaleMult), (int)((offsetY+15)*scaleMult), 98, 0+yOffset, 25, 20);
|
||||
GL11.glPopMatrix();
|
||||
drawCenteredString(fontRendererObj, "Tier 5", offsetX+128, offsetY+107, 0xff0000);
|
||||
addDescription(minecraft, offsetX, offsetY+45, getFormattedText(fontRendererObj, ttl("manual.de.ectdpage5.txt"), 7));
|
||||
}
|
||||
|
||||
private void page6(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY){
|
||||
minecraft.renderEngine.bindTexture(Core_Tiers);
|
||||
GL11.glPushMatrix();
|
||||
double imageScale = 3 ;
|
||||
GL11.glScaled(imageScale, imageScale, 1D);
|
||||
double scaleMult = 0.338;
|
||||
|
||||
int yOffset = (int)((minecraft.getSystemTime()/2000 % 5)*43 );
|
||||
drawTexturedModalRect((int)((offsetX+60)*scaleMult), (int)((offsetY+15)*scaleMult), 53, 0+yOffset, 44, 41);
|
||||
GL11.glPopMatrix();
|
||||
drawCenteredString(fontRendererObj, "Tier 6", offsetX+128, offsetY+130, 0xff0000);
|
||||
addDescription(minecraft, offsetX, offsetY+65, getFormattedText(fontRendererObj, ttl("manual.de.ectdpage6.txt"), 8));
|
||||
}
|
||||
|
||||
private void page7(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY){
|
||||
minecraft.renderEngine.bindTexture(Core_Tiers);
|
||||
GL11.glPushMatrix();
|
||||
double imageScale = 3 ;
|
||||
GL11.glScaled(imageScale, imageScale, 1D);
|
||||
double scaleMult = 0.338;
|
||||
|
||||
int yOffset = (int)((minecraft.getSystemTime()/2000 % 6)*43 );
|
||||
drawTexturedModalRect((int)((offsetX+49)*scaleMult), (int)((offsetY+15)*scaleMult), 0, 0+yOffset, 52, 41);
|
||||
GL11.glPopMatrix();
|
||||
drawCenteredString(fontRendererObj, "Tier 7", offsetX+128, offsetY+130, 0xff0000);
|
||||
addDescription(minecraft, offsetX, offsetY+65, getFormattedText(fontRendererObj, ttl("manual.de.ectdpage7.txt"), 9));
|
||||
}
|
||||
|
||||
private void page8(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY){
|
||||
minecraft.renderEngine.bindTexture(Pylon);
|
||||
GL11.glPushMatrix();
|
||||
double imageScale = 0.75 ;
|
||||
GL11.glScaled(imageScale, imageScale, 1D);
|
||||
double scaleMult = 1.34;
|
||||
drawTexturedModalRect((int)((offsetX+32)*scaleMult), (int)((offsetY+15)*scaleMult), 0, 20, 256, 127);
|
||||
GL11.glPopMatrix();
|
||||
addDescription(minecraft, offsetX, offsetY+35, getFormattedText(fontRendererObj, ttl("manual.de.ectdpage8a.txt"), 10));
|
||||
addDescription(minecraft, offsetX, offsetY+75, getFormattedText(fontRendererObj, ttl("manual.de.ectdpage8b.txt"), 11));
|
||||
}
|
||||
|
||||
private void page9(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY){
|
||||
minecraft.renderEngine.bindTexture(Pylon_Particles);
|
||||
GL11.glPushMatrix();
|
||||
double imageScale = 0.75 ;
|
||||
GL11.glScaled(imageScale, imageScale, 1D);
|
||||
double scaleMult = 1.34;
|
||||
drawTexturedModalRect((int)((offsetX+32)*scaleMult), (int)((offsetY+15)*scaleMult), 0, 30, 256, 177);
|
||||
GL11.glPopMatrix();
|
||||
addDescription(minecraft, offsetX, offsetY+45, getFormattedText(fontRendererObj, ttl("manual.de.ectdpage9a.txt"), 11));
|
||||
addDescription(minecraft, offsetX, offsetY+75, getFormattedText(fontRendererObj, ttl("manual.de.ectdpage9b.txt"), 12));
|
||||
}
|
||||
|
||||
private void page10(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY){
|
||||
minecraft.renderEngine.bindTexture(Pylon_Particles_2);
|
||||
GL11.glPushMatrix();
|
||||
double imageScale = 0.75 ;
|
||||
GL11.glScaled(imageScale, imageScale, 1D);
|
||||
double scaleMult = 1.34;
|
||||
drawTexturedModalRect((int)((offsetX+32)*scaleMult), (int)((offsetY+15)*scaleMult), 0, 0, 256, 167);
|
||||
GL11.glPopMatrix();
|
||||
addDescription(minecraft, offsetX, offsetY+75, getFormattedText(fontRendererObj, ttl("manual.de.ectdpage10.txt"), 13));
|
||||
}
|
||||
|
||||
private void page11(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY){
|
||||
minecraft.renderEngine.bindTexture(Pylon_y_Placement);
|
||||
GL11.glPushMatrix();
|
||||
double imageScale = 0.75 ;
|
||||
GL11.glScaled(imageScale, imageScale, 1D);
|
||||
double scaleMult = 1.34;
|
||||
drawTexturedModalRect((int)((offsetX+32)*scaleMult), (int)((offsetY+15)*scaleMult), 0, 4, 256, 197);
|
||||
GL11.glPopMatrix();
|
||||
addDescription(minecraft, offsetX, offsetY+90, getFormattedText(fontRendererObj, ttl("manual.de.ectdpage11.txt"), 14));
|
||||
}
|
||||
}
|
||||
-1
@@ -49,7 +49,6 @@ public class GuiButtonAHeight extends GuiButton{
|
||||
{
|
||||
l = 16777120;
|
||||
}
|
||||
|
||||
this.drawCenteredString(fontrenderer, this.displayString, this.xPosition + this.width / 2, this.yPosition + (this.height - 8) / 2, l);
|
||||
}
|
||||
}
|
||||
|
||||
+9
-8
@@ -12,10 +12,12 @@ import org.lwjgl.opengl.GL11;
|
||||
*/
|
||||
public class GuiButtonTextOnly extends GuiButton{
|
||||
public String LINKED_PAGE;
|
||||
public int textColour;
|
||||
|
||||
public GuiButtonTextOnly(int id, int xPos, int yPos, int width, int hight, String displayString, String linkedPage) {
|
||||
public GuiButtonTextOnly(int id, int xPos, int yPos, int width, int hight, String displayString, String linkedPage, int colour) {
|
||||
super(id, xPos, yPos, width, hight, displayString);
|
||||
this.LINKED_PAGE = linkedPage;
|
||||
this.textColour = colour;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -31,7 +33,6 @@ public class GuiButtonTextOnly extends GuiButton{
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
this.mouseDragged(minecraft, mouseX, mouseY);
|
||||
int l = 0x777777;
|
||||
|
||||
String trimmedDisplayString = displayString;
|
||||
if (fontrenderer.getStringWidth(displayString) > width+30 && !this.field_146123_n){
|
||||
@@ -47,15 +48,15 @@ public class GuiButtonTextOnly extends GuiButton{
|
||||
if (this.field_146123_n)
|
||||
{
|
||||
trimmedDisplayString = EnumChatFormatting.BOLD+""+EnumChatFormatting.ITALIC+trimmedDisplayString;
|
||||
l = 0x000000;
|
||||
|
||||
} {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.7F, 0.7F, 1);
|
||||
fontrenderer.drawString(trimmedDisplayString, (int)(xPosition*1.45), (int)((yPosition + (height - 8) / 2)*1.45), l);
|
||||
GL11.glColor4f(0f, 0f, 0f, 1f);
|
||||
drawTexturedModalRect(xPosition, yPosition, 0, 46, (int)(fontrenderer.getStringWidth(trimmedDisplayString)*0.72)+2, 8);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.7F, 0.7F, 1);
|
||||
fontrenderer.drawString(trimmedDisplayString, (int)(xPosition*1.45), (int)((yPosition + (height - 8) / 2)*1.45), textColour);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+61
-54
@@ -11,6 +11,7 @@ import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
@@ -42,63 +43,67 @@ public class GuiManual extends GuiScreen {
|
||||
pageCollection.addPage(new IntroPage("INTRO", pageCollection));
|
||||
//pageCollection.addPage(new TitledPage("TITLED_PAGE_1", true, pageCollection, "manual.de.Page Title.txt", 0xff0000).setIndexName("manual.de.TitledPage.txt"));
|
||||
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.draconiumOre), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconiumDust), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconiumBlend), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconiumIngot, 2), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicCore), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.infusedCompound), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.dragonHeart), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicCompound, 2), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.sunFocus), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.draconiumOre), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconiumDust), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconiumBlend), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconiumIngot, 2), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicCore), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.infusedCompound), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.dragonHeart), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicCompound, 2), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.sunFocus), ""));
|
||||
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.wyvernPickaxe), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.wyvernShovel), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.wyvernSword), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.wyvernBow), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.wyvernPickaxe), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.wyvernShovel), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.wyvernSword), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.wyvernBow), ""));
|
||||
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicPickaxe), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicShovel), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicHoe), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicAxe), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicSword), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicBow), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicDistructionStaff), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicPickaxe), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicShovel), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicHoe), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicAxe), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicSword), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicBow), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicDistructionStaff), ""));
|
||||
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.wyvernHelm), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.wyvernChest), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.wyvernLeggs), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.wyvernBoots), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicHelm), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicChest), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicLeggs), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicBoots), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.wyvernHelm), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.wyvernChest), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.wyvernLeggs), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.wyvernBoots), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicHelm), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicChest), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicLeggs), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.draconicBoots), ""));
|
||||
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.teleporterMKI), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.teleporterMKII), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.enderArrow), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModItems.safetyMatch), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, mobSoul, ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.teleporterMKI), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.teleporterMKII), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.enderArrow), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModItems.safetyMatch), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, mobSoul, ""));
|
||||
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.weatherController), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.sunDial), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.playerDetector), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.playerDetectorAdvanced), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.grinder), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.energyInfuser), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.customSpawner), ""));
|
||||
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.particleGenerator), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.xRayBlock), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.potentiometer), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.rainSensor), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.draconium), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.energyStorageCore), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.energyPylon), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.draconium, 1, 1), ""));
|
||||
pageCollection.addPage(new CraftingPage("CRAFTING_PAGE_"+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.draconium, 1, 2), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.weatherController), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.sunDial), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.playerDetector), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.playerDetectorAdvanced), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.grinder, 1, 3), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.energyInfuser), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.customSpawner), ""));
|
||||
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.particleGenerator), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.xRayBlock), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.potentiometer), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.rainSensor), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.draconium), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.energyStorageCore), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.energyPylon), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.draconium, 1, 1), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.draconium, 1, 2), ""));
|
||||
|
||||
pageCollection.addPage(new EnergyCoreTutorialPage("TUTORIAL."+getNextPageIndex(), pageCollection).setIndexName(StatCollector.translateToLocal("manual.de.ecth.txt")));
|
||||
pageCollection.addPage(new EnderResurrectionTutorialPage("TUTORIAL."+getNextPageIndex(), pageCollection).setIndexName("manual.de.roerth.txt"));
|
||||
pageCollection.addPage(new DescriptionPage("INFO"+getNextPageIndex(), pageCollection, "manual.de.endercomet.description").setIndexName("manual.de.endercomet.txt"));
|
||||
pageCollection.addPage(new DescriptionPage("INFO"+getNextPageIndex(), pageCollection, "manual.de.chaosisland.description").setIndexName("manual.de.enderisland.txt"));
|
||||
pageCollection.addPage(new DescriptionPage("INFO"+getNextPageIndex(), pageCollection, "manual.de.placeditems.description").setIndexName("manual.de.placeditems.txt"));
|
||||
|
||||
pageCollection.addPage(new IndexPage("INDEX", pageCollection));
|
||||
return pageCollection;
|
||||
@@ -112,10 +117,12 @@ public class GuiManual extends GuiScreen {
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float par3) {
|
||||
super.drawScreen(mouseX, mouseY, par3);
|
||||
drawGuiBackgroundLayer(par3, mouseX, mouseY);
|
||||
super.drawScreen(mouseX, mouseY, par3);
|
||||
|
||||
prepareRenderState();
|
||||
GL11.glPushMatrix();
|
||||
|
||||
root.drawScreen(this.mc, this.guiLeft, this.guiTop, mouseX - this.guiLeft, mouseY - this.guiTop);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
@@ -150,17 +157,17 @@ public class GuiManual extends GuiScreen {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton button) {
|
||||
public void actionPerformed(GuiButton button) {
|
||||
root.actionPerformed(button);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseMovedOrUp(int par1, int par2, int par3){
|
||||
public void mouseMovedOrUp(int par1, int par2, int par3){
|
||||
root.mouseMovedOrUp(par1, par2, par3);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int par1, int par2, int par3){
|
||||
public void mouseClicked(int par1, int par2, int par3){
|
||||
root.mouseClicked(par1, par2, par3);
|
||||
}
|
||||
|
||||
|
||||
+21
-4
@@ -7,7 +7,10 @@ import net.minecraft.client.gui.GuiButton;
|
||||
* Created by Brandon on 17/09/2014.
|
||||
*/
|
||||
public class IndexPage extends TitledPage {
|
||||
|
||||
private int itemPageColour = 0xab373f;
|
||||
private int blockPageColour = 0x7729a7;
|
||||
private int tutorialPageColour = 0x000080;
|
||||
private int otherPageColour = 0x228B22;
|
||||
public IndexPage(String name, PageCollection collection) {
|
||||
super(name, false, collection, "manual.de.indexTitle.txt", 0xffa600);
|
||||
}
|
||||
@@ -22,9 +25,14 @@ public class IndexPage extends TitledPage {
|
||||
for (BasePage page : collection.pages){
|
||||
if (page.hasIndexButton){
|
||||
String indexName = page.INDEX_NAME;
|
||||
if (indexName==null && page instanceof CraftingPage) indexName = ttl(((CraftingPage)page).result.getUnlocalizedName()+".name");
|
||||
if (indexName==null && page instanceof CraftingInfoPage) indexName = ttl(((CraftingInfoPage)page).result.getUnlocalizedName()+".name");
|
||||
else if (indexName==null) indexName = page.getReferenceName();
|
||||
buttonList.add(new GuiButtonTextOnly(999, getXMin()+5+collum*81, getYMin()+20+(row*7), 82, 7, indexName, page.getReferenceName()));
|
||||
int colour = otherPageColour;
|
||||
if (page.getReferenceName() != null && page.getReferenceName().contains("ITEM_PAGE")) colour = itemPageColour;
|
||||
if (page.getReferenceName() != null && page.getReferenceName().contains("BLOCK_PAGE")) colour = blockPageColour;
|
||||
if (page.getReferenceName() != null && page.getReferenceName().contains("TUTORIAL")) colour = tutorialPageColour;
|
||||
|
||||
buttonList.add(new GuiButtonTextOnly(999, getXMin()+5+collum*81, getYMin()+20+(row*7), 82, 7, indexName, page.getReferenceName(), colour));
|
||||
row++;
|
||||
if (row > 21){
|
||||
row = 0;
|
||||
@@ -44,13 +52,22 @@ public class IndexPage extends TitledPage {
|
||||
collection.changeActivePage(((GuiButtonTextOnly)button).LINKED_PAGE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderBackgroundLayer(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
super.renderBackgroundLayer(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
fontRendererObj.drawString("Items", offsetX+10, offsetY+179, itemPageColour);
|
||||
fontRendererObj.drawString("Blocks", offsetX+10, offsetY+189, blockPageColour);
|
||||
fontRendererObj.drawString("Tutorials", offsetX+200, offsetY+179, tutorialPageColour);
|
||||
fontRendererObj.drawString("Other", offsetX+200, offsetY+189, otherPageColour);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
super.drawScreen(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
for (int k = 0; k < this.buttonList.size(); ++k)
|
||||
{
|
||||
if (buttonList.get(k) instanceof GuiButtonTextOnly && ((GuiButtonTextOnly) buttonList.get(k)).getIsHovering()) {
|
||||
((GuiButtonTextOnly) this.buttonList.get(k)).drawButton(this.mc, mouseX+offsetX, mouseY+offsetY);
|
||||
((GuiButtonTextOnly) this.buttonList.get(k)).drawButton(this.mc, mouseX + offsetX, mouseY + offsetY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import org.lwjgl.opengl.GL11;
|
||||
* Created by Brandon on 17/09/2014.
|
||||
*/
|
||||
public class IntroPage extends BasePage {
|
||||
public static final ResourceLocation logo = new ResourceLocation(References.RESOURCESPREFIX + "textures/gui/ManualIntro.png");
|
||||
public static final ResourceLocation logo = new ResourceLocation(References.RESOURCESPREFIX + "textures/gui/images/ManualIntro.png");
|
||||
public IntroPage(String name, PageCollection collection) {
|
||||
super(name, collection);
|
||||
}
|
||||
|
||||
+3
-1
@@ -7,6 +7,7 @@ import net.minecraft.client.Minecraft;
|
||||
*/
|
||||
public class TitledPage extends BasePage {
|
||||
private String title;
|
||||
public boolean drawTitle = true;
|
||||
private int colour;
|
||||
|
||||
public TitledPage(String name, boolean showInMenue, PageCollection collection, String unlocalizedTitle, int colour) {
|
||||
@@ -17,6 +18,7 @@ public class TitledPage extends BasePage {
|
||||
|
||||
@Override
|
||||
public void renderOverlayComponents(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
drawCenteredString(minecraft.fontRenderer, ttl(title), offsetX + 128, offsetY + 5, colour);
|
||||
if (title == null) title = INDEX_NAME;
|
||||
if (drawTitle)drawCenteredString(minecraft.fontRenderer, ttl(title), offsetX + 128, offsetY + 5, colour);
|
||||
}
|
||||
}
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
package com.brandon3055.draconicevolution.client.interfaces.manual;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by Brandon on 18/09/2014.
|
||||
*/
|
||||
public class TutorialPage extends TitledPage {
|
||||
private float descriptionScale = 0.66f;
|
||||
public String[] rawDescription;
|
||||
public List<String>[] formattedDescription;
|
||||
public int page = 0;
|
||||
public int lastPage = 0;
|
||||
|
||||
public TutorialPage(String name, PageCollection collection, String title) {
|
||||
super(name, true, collection, title, 0x00ff00);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderBackgroundLayer(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
super.renderBackgroundLayer(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
if (lastPage == 0) return;
|
||||
String s = "page " + page + "/" + lastPage;
|
||||
fontRendererObj.drawString(s, offsetX+195, offsetY+185, 0x000000);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
if (lastPage == 0) return;
|
||||
buttonList.add(new GuiButtonAHeight(1, getXMin()+62, getYMin()+181, 25, 16, ttl("button.de.previous.txt")));
|
||||
buttonList.add(new GuiButtonAHeight(2, getXMin()+170, getYMin()+181, 25, 16, ttl("button.de.next.txt")));
|
||||
if (buttonList.get(1) instanceof GuiButton) ((GuiButton)buttonList.get(1)).enabled = !(page == 0);
|
||||
if (buttonList.get(2) instanceof GuiButton) ((GuiButton)buttonList.get(2)).enabled = !(page == lastPage);
|
||||
}
|
||||
|
||||
public void drawScreen(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
super.drawScreen(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
|
||||
}
|
||||
|
||||
public void addDescription(Minecraft minecraft, int offsetX, int offsetY, List<String> description){
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(offsetX+5, offsetY+75, 1);
|
||||
GL11.glScalef(descriptionScale, descriptionScale, descriptionScale);
|
||||
int offset = 0;
|
||||
for (String s : description) {
|
||||
if (s == null) break;
|
||||
fontRendererObj.drawString(s, 0, offset, 4210752);
|
||||
offset += fontRendererObj.FONT_HEIGHT;
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<String> getFormattedText(FontRenderer fr, String raw, int descriptionIndex) {
|
||||
if (formattedDescription[descriptionIndex] == null) {
|
||||
if (Strings.isNullOrEmpty(raw)) formattedDescription[descriptionIndex] = ImmutableList.of();
|
||||
else formattedDescription[descriptionIndex] = ImmutableList.copyOf(fr.listFormattedStringToWidth(raw, 370));
|
||||
List<String> modified = new ArrayList();
|
||||
for (int i = 0; i < formattedDescription[descriptionIndex].size(); i++){
|
||||
String line = formattedDescription[descriptionIndex].get(i);
|
||||
if (!line.contains("/n")) modified.add(line);
|
||||
else {
|
||||
String joinedLine = "";
|
||||
for (i=i; i < formattedDescription[descriptionIndex].size(); i++) joinedLine = joinedLine + formattedDescription[descriptionIndex].get(i);
|
||||
int escape = 0;
|
||||
while (!joinedLine.isEmpty() && escape < 20) {
|
||||
int index = 0;
|
||||
if (joinedLine.contains("/n")) index = joinedLine.indexOf("/n");
|
||||
else index = joinedLine.length();
|
||||
String s = joinedLine.substring(0, index);
|
||||
modified.add(s);
|
||||
joinedLine = joinedLine.substring(index);
|
||||
joinedLine = joinedLine.replaceFirst("/n", "");
|
||||
escape++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
formattedDescription[descriptionIndex] = modified;
|
||||
}
|
||||
return formattedDescription[descriptionIndex];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(GuiButton button) {
|
||||
super.actionPerformed(button);
|
||||
if (lastPage == 0) return;
|
||||
if (button.id == 1) page = Math.max(0, page-1);
|
||||
if (button.id == 2) page = Math.min(lastPage, page+1);
|
||||
if (buttonList.get(1) instanceof GuiButton) ((GuiButton)buttonList.get(1)).enabled = !(page == 0);
|
||||
if (buttonList.get(2) instanceof GuiButton) ((GuiButton)buttonList.get(2)).enabled = !(page == lastPage);
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
package com.brandon3055.draconicevolution.common.blocks;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||
import com.brandon3055.draconicevolution.common.blocks.itemblocks.TestItemBlock;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.TileTestBlock;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -18,7 +16,9 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class TestBlock extends BlockDE {
|
||||
|
||||
@@ -108,7 +108,6 @@ public class TestBlock extends BlockDE {
|
||||
@Override
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return super.getItemDropped( p_149650_1_, p_149650_2_, p_149650_3_);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package com.brandon3055.draconicevolution.common.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||
import com.brandon3055.draconicevolution.common.core.handler.ParticleHandler;
|
||||
import com.brandon3055.draconicevolution.common.items.ModItems;
|
||||
import com.brandon3055.draconicevolution.common.lib.Strings;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
@@ -11,12 +15,8 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||
import com.brandon3055.draconicevolution.common.core.handler.ParticleHandler;
|
||||
import com.brandon3055.draconicevolution.common.items.ModItems;
|
||||
import com.brandon3055.draconicevolution.common.lib.Strings;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class XRayBlock extends BlockDE {
|
||||
|
||||
@@ -40,7 +40,6 @@ public class XRayBlock extends BlockDE {
|
||||
@Override
|
||||
public boolean isReplaceable(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return super.isReplaceable(world, x, y, z);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ public class Teleporter
|
||||
if (thePlayer.isRiding())
|
||||
thePlayer.dismountEntity(thePlayer.ridingEntity);
|
||||
thePlayer.mcServer.getConfigurationManager().transferPlayerToDimension(thePlayer, thePlayer.dimension, new CustomTeleporter(thePlayer.mcServer.worldServerForDimension(thePlayer.dimension), x, y, z, 0, 0));
|
||||
thePlayer.mcServer.getConfigurationManager().transferPlayerToDimension(thePlayer, thePlayer.dimension, new CustomTeleporter(thePlayer.mcServer.worldServerForDimension(thePlayer.dimension), x, y, z, 0, 0));
|
||||
//thePlayer.mcServer.getConfigurationManager().transferPlayerToDimension(thePlayer, thePlayer.dimension, new CustomTeleporter(thePlayer.mcServer.worldServerForDimension(thePlayer.dimension), x, y, z, 0, 0));
|
||||
} else
|
||||
{
|
||||
if (thePlayer.isRiding())
|
||||
|
||||
+2
@@ -4,6 +4,7 @@ package com.brandon3055.draconicevolution.common.core.handler;
|
||||
import com.brandon3055.draconicevolution.common.blocks.ModBlocks;
|
||||
import com.brandon3055.draconicevolution.common.core.utills.ItemNBTHelper;
|
||||
import com.brandon3055.draconicevolution.common.core.utills.LogHelper;
|
||||
import com.brandon3055.draconicevolution.common.entity.EntityCustomDragon;
|
||||
import com.brandon3055.draconicevolution.common.entity.ExtendedPlayer;
|
||||
import com.brandon3055.draconicevolution.common.items.ModItems;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
@@ -87,6 +88,7 @@ public class MinecraftForgeEventHandler {
|
||||
if (event.entity instanceof EntityDragon && !event.entity.worldObj.isRemote){
|
||||
EntityItem item = new EntityItem(event.entity.worldObj, event.entity.posX, event.entity.posY, event.entity.posZ, new ItemStack(ModItems.dragonHeart));
|
||||
event.entity.worldObj.spawnEntityInWorld(item);
|
||||
if (event.entity instanceof EntityCustomDragon && ((EntityCustomDragon)event.entity).getIsUber()) event.entity.worldObj.spawnEntityInWorld(item);
|
||||
|
||||
int count = 30 + event.entity.worldObj.rand.nextInt(30);
|
||||
for (int i = 0; i < count; i++) {
|
||||
|
||||
@@ -622,4 +622,7 @@ public class EntityCustomDragon extends EntityDragon {
|
||||
this.dataWatcher.updateObject(12, b ? (byte)1: (byte)0);
|
||||
}
|
||||
|
||||
public boolean getIsUber(){
|
||||
return isUber;
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
@@ -78,11 +79,15 @@ public class Tclogo extends ItemDE {
|
||||
for (int x = xi-rad; x < xi+rad; x++){
|
||||
for (int y = yi-5; y < yi+5; y++){
|
||||
for (int z = zi-rad; z < zi+rad; z++){
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
//world.markBlockForUpdate(x, y, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.markBlockRangeForRenderUpdate(xi-rad, yi-rad, zi-rad, xi+rad, yi+rad, zi+rad);
|
||||
//world.markBlockRangeForRenderUpdate(xi-rad, yi-rad, zi-rad, xi+rad, yi+rad, zi+rad);
|
||||
//if (world.isRemote)player.displayGUIWorkbench((int)player.posX, (int)player.posY, (int)player.posZ);
|
||||
world.setBlock(0, 0, 0, Blocks.crafting_table);
|
||||
if (!world.isRemote)player.displayGUIWorkbench(0, 0, 0);
|
||||
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user