fix some function names
This commit is contained in:
parent
fe57a2909a
commit
3d1c68210c
21 changed files with 133 additions and 164 deletions
|
@ -4,10 +4,8 @@ import game.color.TextColor;
|
|||
import game.enchantment.Enchantment;
|
||||
import game.inventory.ContainerEnchantment;
|
||||
import game.inventory.InventoryPlayer;
|
||||
import game.item.ItemStack;
|
||||
import game.rng.Random;
|
||||
import game.tileentity.IWorldNameable;
|
||||
import game.util.ExtMath;
|
||||
import game.world.World;
|
||||
|
||||
public class GuiEnchant extends GuiContainer
|
||||
|
@ -23,14 +21,14 @@ public class GuiEnchant extends GuiContainer
|
|||
private final ContainerEnchantment container;
|
||||
private final IWorldNameable table;
|
||||
|
||||
public int field_147073_u;
|
||||
public float field_147071_v;
|
||||
public float field_147069_w;
|
||||
public float field_147082_x;
|
||||
public float field_147081_y;
|
||||
public float field_147080_z;
|
||||
public float field_147076_A;
|
||||
ItemStack field_147077_B;
|
||||
// public int field_147073_u;
|
||||
// public float field_147071_v;
|
||||
// public float field_147069_w;
|
||||
// public float field_147082_x;
|
||||
// public float field_147081_y;
|
||||
// public float field_147080_z;
|
||||
// public float field_147076_A;
|
||||
// ItemStack field_147077_B;
|
||||
|
||||
public GuiEnchant(InventoryPlayer inventory, World worldIn, IWorldNameable table)
|
||||
{
|
||||
|
@ -49,14 +47,14 @@ public class GuiEnchant extends GuiContainer
|
|||
this.drawString(this.playerInventory.getCommandName(), 8, this.ySize - 96 + 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called from the main game loop to update the screen.
|
||||
*/
|
||||
public void updateScreen()
|
||||
{
|
||||
super.updateScreen();
|
||||
this.func_147068_g();
|
||||
}
|
||||
// /**
|
||||
// * Called from the main game loop to update the screen.
|
||||
// */
|
||||
// public void updateScreen()
|
||||
// {
|
||||
// super.updateScreen();
|
||||
// this.updateAnimation();
|
||||
// }
|
||||
|
||||
/**
|
||||
* Called when the mouse is clicked. Args : mouseX, mouseY, clickedButton
|
||||
|
@ -239,52 +237,52 @@ public class GuiEnchant extends GuiContainer
|
|||
return s;
|
||||
}
|
||||
|
||||
private void func_147068_g()
|
||||
{
|
||||
ItemStack itemstack = this.inventorySlots.getSlot(0).getStack();
|
||||
|
||||
if (!ItemStack.areItemStacksEqual(itemstack, this.field_147077_B))
|
||||
{
|
||||
this.field_147077_B = itemstack;
|
||||
|
||||
while (true)
|
||||
{
|
||||
this.field_147082_x += (float)(this.random.zrange(4) - this.random.zrange(4));
|
||||
|
||||
if (this.field_147071_v > this.field_147082_x + 1.0F || this.field_147071_v < this.field_147082_x - 1.0F)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
++this.field_147073_u;
|
||||
this.field_147069_w = this.field_147071_v;
|
||||
this.field_147076_A = this.field_147080_z;
|
||||
boolean flag = false;
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
if (this.container.enchantLevels[i] != 0)
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (flag)
|
||||
{
|
||||
this.field_147080_z += 0.2F;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.field_147080_z -= 0.2F;
|
||||
}
|
||||
|
||||
this.field_147080_z = ExtMath.clampf(this.field_147080_z, 0.0F, 1.0F);
|
||||
float f1 = (this.field_147082_x - this.field_147071_v) * 0.4F;
|
||||
float f = 0.2F;
|
||||
f1 = ExtMath.clampf(f1, -f, f);
|
||||
this.field_147081_y += (f1 - this.field_147081_y) * 0.9F;
|
||||
this.field_147071_v += this.field_147081_y;
|
||||
}
|
||||
// private void updateAnimation()
|
||||
// {
|
||||
// ItemStack itemstack = this.inventorySlots.getSlot(0).getStack();
|
||||
//
|
||||
// if (!ItemStack.areItemStacksEqual(itemstack, this.field_147077_B))
|
||||
// {
|
||||
// this.field_147077_B = itemstack;
|
||||
//
|
||||
// while (true)
|
||||
// {
|
||||
// this.field_147082_x += (float)(this.random.zrange(4) - this.random.zrange(4));
|
||||
//
|
||||
// if (this.field_147071_v > this.field_147082_x + 1.0F || this.field_147071_v < this.field_147082_x - 1.0F)
|
||||
// {
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// ++this.field_147073_u;
|
||||
// this.field_147069_w = this.field_147071_v;
|
||||
// this.field_147076_A = this.field_147080_z;
|
||||
// boolean flag = false;
|
||||
//
|
||||
// for (int i = 0; i < 3; ++i)
|
||||
// {
|
||||
// if (this.container.enchantLevels[i] != 0)
|
||||
// {
|
||||
// flag = true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (flag)
|
||||
// {
|
||||
// this.field_147080_z += 0.2F;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// this.field_147080_z -= 0.2F;
|
||||
// }
|
||||
//
|
||||
// this.field_147080_z = ExtMath.clampf(this.field_147080_z, 0.0F, 1.0F);
|
||||
// float f1 = (this.field_147082_x - this.field_147071_v) * 0.4F;
|
||||
// float f = 0.2F;
|
||||
// f1 = ExtMath.clampf(f1, -f, f);
|
||||
// this.field_147081_y += (f1 - this.field_147081_y) * 0.9F;
|
||||
// this.field_147071_v += this.field_147081_y;
|
||||
// }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue