removed all references to clientplayer in guihandler

This commit is contained in:
MachineMuse 2013-04-30 23:28:07 -06:00
parent 06591d47a0
commit 1a973f8658
4 changed files with 11 additions and 8 deletions

View file

@ -5,6 +5,7 @@ import net.machinemuse.general.geometry.MusePoint2D;
import net.machinemuse.general.gui.frame.*; import net.machinemuse.general.gui.frame.*;
import net.machinemuse.utils.MuseRenderer; import net.machinemuse.utils.MuseRenderer;
import net.minecraft.client.entity.EntityClientPlayerMP; import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.entity.player.EntityPlayer;
/** /**
* The gui class for the TinkerTable block. * The gui class for the TinkerTable block.
@ -21,8 +22,8 @@ public class GuiFieldTinker extends MuseGui {
* *
* @param player * @param player
*/ */
public GuiFieldTinker(EntityClientPlayerMP player) { public GuiFieldTinker(EntityPlayer player) {
this.player = player; this.player = (EntityClientPlayerMP) player;
this.xSize = 256; this.xSize = 256;
this.ySize = 200; this.ySize = 200;
} }

View file

@ -6,6 +6,7 @@ import net.machinemuse.general.gui.MuseGui;
import net.machinemuse.general.gui.frame.*; import net.machinemuse.general.gui.frame.*;
import net.machinemuse.utils.MuseRenderer; import net.machinemuse.utils.MuseRenderer;
import net.minecraft.client.entity.EntityClientPlayerMP; import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.entity.player.EntityPlayer;
/** /**
* The gui class for the TinkerTable block. * The gui class for the TinkerTable block.
@ -22,8 +23,8 @@ public class GuiTinkerTable extends MuseGui {
* *
* @param player * @param player
*/ */
public GuiTinkerTable(EntityClientPlayerMP player) { public GuiTinkerTable(EntityPlayer player) {
this.player = player; this.player = (EntityClientPlayerMP) player;
this.xSize = 256; this.xSize = 256;
this.ySize = 200; this.ySize = 200;
} }

View file

@ -15,6 +15,7 @@ import net.machinemuse.utils.MuseItemUtils;
import net.machinemuse.utils.MuseRenderer; import net.machinemuse.utils.MuseRenderer;
import net.machinemuse.utils.MuseStringUtils; import net.machinemuse.utils.MuseStringUtils;
import net.minecraft.client.entity.EntityClientPlayerMP; import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
@ -70,7 +71,7 @@ public class ModuleTweakFrame extends ScrollableFrame {
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glScaled(SCALERATIO, SCALERATIO, SCALERATIO); GL11.glScaled(SCALERATIO, SCALERATIO, SCALERATIO);
super.draw(); super.draw();
MuseRenderer.drawCenteredString("Tinker", (border.left() + border.right())/2, border.top() + 2); MuseRenderer.drawCenteredString("Tinker", (border.left() + border.right()) / 2, border.top() + 2);
for (ClickableSlider slider : sliders) { for (ClickableSlider slider : sliders) {
slider.draw(); slider.draw();
} }

View file

@ -27,10 +27,10 @@ class GuiHandler extends IGuiHandler {
def getClientGuiElement(ID: Int, player: EntityPlayer, world: World, x: Int, y: Int, z: Int): AnyRef = { def getClientGuiElement(ID: Int, player: EntityPlayer, world: World, x: Int, y: Int, z: Int): AnyRef = {
Minecraft.getMinecraft.thePlayer.addStat(AchievementList.openInventory, 1) Minecraft.getMinecraft.thePlayer.addStat(AchievementList.openInventory, 1)
ID match { ID match {
case 0 => new GuiTinkerTable(player.asInstanceOf[EntityClientPlayerMP]) case 0 => new GuiTinkerTable(player)
case 1 => new KeyConfigGui(player) case 1 => new KeyConfigGui(player)
case 2 => new GuiFieldTinker(player.asInstanceOf[EntityClientPlayerMP]) case 2 => new GuiFieldTinker(player)
case 3 => new CosmeticGui(player.asInstanceOf[EntityClientPlayerMP]) case 3 => new CosmeticGui(player)
case _ => null case _ => null
} }
} }