Auto Format code
This commit is contained in:
parent
112b1657cf
commit
796df6c055
503 changed files with 12260 additions and 16291 deletions
|
@ -1,82 +1,68 @@
|
|||
package techreborn.manual;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import techreborn.manual.pages.BasePage;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
public class PageCollection extends Gui
|
||||
{
|
||||
public class PageCollection extends Gui {
|
||||
|
||||
public final List<BasePage> pages = Lists.newArrayList();
|
||||
protected int x;
|
||||
protected int y;
|
||||
private String ACTIVE_PAGE = Reference.pageNames.CONTENTS_PAGE;
|
||||
|
||||
public PageCollection()
|
||||
{
|
||||
public PageCollection() {
|
||||
this.x = 0;
|
||||
this.y = 0;
|
||||
}
|
||||
|
||||
public void addPage(BasePage page)
|
||||
{
|
||||
public void addPage(BasePage page) {
|
||||
pages.add(page);
|
||||
}
|
||||
|
||||
public BasePage getPageByName(String name)
|
||||
{
|
||||
for (BasePage component : pages)
|
||||
{
|
||||
if (component.getReferenceName().equals(ACTIVE_PAGE))
|
||||
{
|
||||
public BasePage getPageByName(String name) {
|
||||
for (BasePage component : pages) {
|
||||
if (component.getReferenceName().equals(ACTIVE_PAGE)) {
|
||||
return component;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public BasePage getActivePage()
|
||||
{
|
||||
for (BasePage component : pages)
|
||||
{
|
||||
if (component.getReferenceName().equals(ACTIVE_PAGE))
|
||||
{
|
||||
public BasePage getActivePage() {
|
||||
for (BasePage component : pages) {
|
||||
if (component.getReferenceName().equals(ACTIVE_PAGE)) {
|
||||
return component;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public final void drawScreen(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
public final void drawScreen(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
if (getActivePage() == null)
|
||||
return;
|
||||
getActivePage().drawScreen(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
}
|
||||
|
||||
public final void renderBackgroundLayer(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
public final void renderBackgroundLayer(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
if (getActivePage() == null)
|
||||
return;
|
||||
getActivePage().renderBackgroundLayer(minecraft, offsetX, offsetY, mouseX, mouseY);
|
||||
}
|
||||
|
||||
public void changeActivePage(String newPage)
|
||||
{
|
||||
public void changeActivePage(String newPage) {
|
||||
ACTIVE_PAGE = newPage;
|
||||
if (getActivePage() == null)
|
||||
return;
|
||||
getActivePage().setWorldAndResolution(Minecraft.getMinecraft(), x, y);
|
||||
}
|
||||
|
||||
public void setWorldAndResolution(Minecraft minecraft, int x, int y)
|
||||
{
|
||||
public void setWorldAndResolution(Minecraft minecraft, int x, int y) {
|
||||
if (getActivePage() == null)
|
||||
return;
|
||||
getActivePage().setWorldAndResolution(minecraft, x, y);
|
||||
|
@ -84,8 +70,7 @@ public class PageCollection extends Gui
|
|||
this.y = y;
|
||||
}
|
||||
|
||||
protected void actionPerformed(GuiButton button)
|
||||
{
|
||||
protected void actionPerformed(GuiButton button) {
|
||||
if (getActivePage() == null)
|
||||
return;
|
||||
getActivePage().actionPerformed(button);
|
||||
|
@ -96,8 +81,7 @@ public class PageCollection extends Gui
|
|||
// getActivePage().mo(par1, par2, par3);
|
||||
// }
|
||||
|
||||
protected void mouseClicked(int par1, int par2, int par3) throws IOException
|
||||
{
|
||||
protected void mouseClicked(int par1, int par2, int par3) throws IOException {
|
||||
if (getActivePage() == null)
|
||||
return;
|
||||
getActivePage().mouseClicked(par1, par2, par3);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue