fix some function names
This commit is contained in:
parent
fe57a2909a
commit
3d1c68210c
21 changed files with 133 additions and 164 deletions
|
@ -408,7 +408,7 @@ public class EnchantmentHelper
|
|||
return p_77504_1_;
|
||||
}
|
||||
|
||||
public static List<RngEnchantment> buildEnchantmentList(Random randomIn, ItemStack itemStackIn, int p_77513_2_)
|
||||
public static List<RngEnchantment> buildEnchantmentList(Random randomIn, ItemStack itemStackIn, int level)
|
||||
{
|
||||
Item item = itemStackIn.getItem();
|
||||
int i = item.getItemEnchantability();
|
||||
|
@ -421,7 +421,7 @@ public class EnchantmentHelper
|
|||
{
|
||||
i = i / 2;
|
||||
i = randomIn.roll((i >> 1) + 1) + randomIn.zrange((i >> 1) + 1);
|
||||
int j = i + p_77513_2_;
|
||||
int j = i + level;
|
||||
float f = (randomIn.floatv() + randomIn.floatv() - 1.0F) * 0.15F;
|
||||
int k = (int)((float)j * (1.0F + f) + 0.5F);
|
||||
|
||||
|
|
|
@ -31,12 +31,12 @@ public class EnchantmentProtection extends Enchantment
|
|||
*/
|
||||
public final int protectionType;
|
||||
|
||||
public EnchantmentProtection(int p_i45765_1_, String p_i45765_2_, int p_i45765_3_, int p_i45765_4_)
|
||||
public EnchantmentProtection(int id, String name, int weight, int type)
|
||||
{
|
||||
super(p_i45765_1_, p_i45765_2_, p_i45765_3_, EnumEnchantmentType.ARMOR);
|
||||
this.protectionType = p_i45765_4_;
|
||||
super(id, name, weight, EnumEnchantmentType.ARMOR);
|
||||
this.protectionType = type;
|
||||
|
||||
if (p_i45765_4_ == 2)
|
||||
if (type == 2)
|
||||
{
|
||||
this.type = EnumEnchantmentType.ARMOR_FEET;
|
||||
}
|
||||
|
@ -106,27 +106,27 @@ public class EnchantmentProtection extends Enchantment
|
|||
/**
|
||||
* Gets the amount of ticks an entity should be set fire, adjusted for fire protection.
|
||||
*/
|
||||
public static int getFireTimeForEntity(Entity p_92093_0_, int p_92093_1_)
|
||||
public static int getFireTimeForEntity(Entity entity, int duration)
|
||||
{
|
||||
int i = EnchantmentHelper.getMaxEnchantmentLevel(Enchantment.fireProtection.effectId, p_92093_0_.getInventory());
|
||||
int i = EnchantmentHelper.getMaxEnchantmentLevel(Enchantment.fireProtection.effectId, entity.getInventory());
|
||||
|
||||
if (i > 0)
|
||||
{
|
||||
p_92093_1_ -= ExtMath.floorf((float)p_92093_1_ * (float)i * 0.15F);
|
||||
duration -= ExtMath.floorf((float)duration * (float)i * 0.15F);
|
||||
}
|
||||
|
||||
return p_92093_1_;
|
||||
return duration;
|
||||
}
|
||||
|
||||
public static double func_92092_a(Entity p_92092_0_, double p_92092_1_)
|
||||
public static double getKnockbackFactor(Entity entity, double strength)
|
||||
{
|
||||
int i = EnchantmentHelper.getMaxEnchantmentLevel(Enchantment.blastProtection.effectId, p_92092_0_.getInventory());
|
||||
int i = EnchantmentHelper.getMaxEnchantmentLevel(Enchantment.blastProtection.effectId, entity.getInventory());
|
||||
|
||||
if (i > 0)
|
||||
{
|
||||
p_92092_1_ -= (double)ExtMath.floord(p_92092_1_ * (double)((float)i * 0.15F));
|
||||
strength -= (double)ExtMath.floord(strength * (double)((float)i * 0.15F));
|
||||
}
|
||||
|
||||
return p_92092_1_;
|
||||
return strength;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue