Merge pull request #2146 from bonii-xx/potionidfix
Fix Potion IDs above 127
This commit is contained in:
commit
d6a6316771
2 changed files with 18 additions and 0 deletions
|
@ -61,3 +61,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -1346,7 +1358,7 @@
|
||||
|
||||
if (entity instanceof EntityLivingBase)
|
||||
{
|
||||
- PotionEffect potioneffect = new PotionEffect(p_147260_1_.func_149427_e(), p_147260_1_.func_180755_e(), p_147260_1_.func_149428_f(), false, p_147260_1_.func_179707_f());
|
||||
+ PotionEffect potioneffect = new PotionEffect(p_147260_1_.func_149427_e() & 0xff, p_147260_1_.func_180755_e(), p_147260_1_.func_149428_f(), false, p_147260_1_.func_179707_f());
|
||||
potioneffect.func_100012_b(p_147260_1_.func_149429_c());
|
||||
((EntityLivingBase)entity).func_70690_d(potioneffect);
|
||||
}
|
||||
|
|
|
@ -26,6 +26,15 @@
|
|||
}
|
||||
|
||||
public void func_76452_a(PotionEffect p_76452_1_)
|
||||
@@ -191,7 +196,7 @@
|
||||
|
||||
public static PotionEffect func_82722_b(NBTTagCompound p_82722_0_)
|
||||
{
|
||||
- byte b0 = p_82722_0_.func_74771_c("Id");
|
||||
+ int b0 = p_82722_0_.func_74771_c("Id") & 0xff;
|
||||
|
||||
if (b0 >= 0 && b0 < Potion.field_76425_a.length && Potion.field_76425_a[b0] != null)
|
||||
{
|
||||
@@ -224,4 +229,62 @@
|
||||
{
|
||||
return this.field_100013_f;
|
||||
|
|
Loading…
Reference in a new issue