fix some function names
This commit is contained in:
parent
fe57a2909a
commit
3d1c68210c
21 changed files with 133 additions and 164 deletions
|
@ -689,22 +689,22 @@ public abstract class Container
|
|||
/**
|
||||
* Extracts the drag mode. Args : eventButton. Return (0 : evenly split, 1 : one item by slot, 2 : not used ?)
|
||||
*/
|
||||
public static int extractDragMode(int p_94529_0_)
|
||||
public static int extractDragMode(int dragCode)
|
||||
{
|
||||
return p_94529_0_ >> 2 & 3;
|
||||
return dragCode >> 2 & 3;
|
||||
}
|
||||
|
||||
/**
|
||||
* Args : clickedButton, Returns (0 : start drag, 1 : add slot, 2 : end drag)
|
||||
*/
|
||||
public static int getDragEvent(int p_94532_0_)
|
||||
public static int getDragEvent(int dragCode)
|
||||
{
|
||||
return p_94532_0_ & 3;
|
||||
return dragCode & 3;
|
||||
}
|
||||
|
||||
public static int func_94534_d(int p_94534_0_, int p_94534_1_)
|
||||
public static int getDragCode(int dragEvent, int dragMode)
|
||||
{
|
||||
return p_94534_0_ & 3 | (p_94534_1_ & 3) << 2;
|
||||
return dragEvent & 3 | (dragMode & 3) << 2;
|
||||
}
|
||||
|
||||
public static boolean isValidDragMode(int dragModeIn, EntityNPC player)
|
||||
|
|
|
@ -211,7 +211,7 @@ public class ContainerEnchantment extends Container
|
|||
{
|
||||
if (this.enchantLevels[j1] > 0)
|
||||
{
|
||||
List<RngEnchantment> list = this.func_178148_a(itemstack, j1, this.enchantLevels[j1]);
|
||||
List<RngEnchantment> list = this.getRandomEnchantments(itemstack, j1, this.enchantLevels[j1]);
|
||||
|
||||
if (list != null && !list.isEmpty())
|
||||
{
|
||||
|
@ -253,7 +253,7 @@ public class ContainerEnchantment extends Container
|
|||
{
|
||||
if (!this.worldPointer.client)
|
||||
{
|
||||
List<RngEnchantment> list = this.func_178148_a(itemstack, id, this.enchantLevels[id]);
|
||||
List<RngEnchantment> list = this.getRandomEnchantments(itemstack, id, this.enchantLevels[id]);
|
||||
boolean flag = itemstack.getItem() == Items.book;
|
||||
|
||||
if (list != null)
|
||||
|
@ -304,10 +304,10 @@ public class ContainerEnchantment extends Container
|
|||
}
|
||||
}
|
||||
|
||||
private List<RngEnchantment> func_178148_a(ItemStack stack, int p_178148_2_, int p_178148_3_)
|
||||
private List<RngEnchantment> getRandomEnchantments(ItemStack stack, int id, int level)
|
||||
{
|
||||
this.rand.setSeed((long)(this.xpSeed + p_178148_2_));
|
||||
List<RngEnchantment> list = EnchantmentHelper.buildEnchantmentList(this.rand, stack, p_178148_3_);
|
||||
this.rand.setSeed((long)(this.xpSeed + id));
|
||||
List<RngEnchantment> list = EnchantmentHelper.buildEnchantmentList(this.rand, stack, level);
|
||||
|
||||
if (stack.getItem() == Items.book && list != null && list.size() > 1)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue