mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-25 14:34:36 +00:00
No longer use the raw potion array, use potio registry
This commit is contained in:
1 parent
b01e9dfed7
commit
08de553593
9 files changed
+26
-21
No files matched your search
@@ -49,6 +49,7 @@ import net.minecraft.world.EnumDifficulty;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
|
||||
import net.minecraftforge.fml.common.registry.GameData;
|
||||
import org.lwjgl.opengl.ARBShaderObjects;
|
||||
|
||||
import vazkii.botania.api.boss.IBotaniaBossWithShader;
|
||||
@@ -578,7 +579,7 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
|
||||
List<PotionEffect> remove = new ArrayList();
|
||||
Collection<PotionEffect> active = player.getActivePotionEffects();
|
||||
for(PotionEffect effect : active)
|
||||
if(effect.getDuration() < 200 && effect.getIsAmbient() && !ReflectionHelper.<Boolean, Potion>getPrivateValue(Potion.class, Potion.potionTypes[effect.getPotionID()], LibObfuscation.IS_BAD_EFFECT))
|
||||
if(effect.getDuration() < 200 && effect.getIsAmbient() && !GameData.getPotionRegistry().getObjectById(effect.getPotionID()).isBadEffect())
|
||||
remove.add(effect);
|
||||
|
||||
active.removeAll(remove);
|
||||
|
||||
Reference in new issue
Block a user