That didn't work :(
This commit is contained in:
@@ -5,9 +5,6 @@ import net.minecraft.client.renderer.GlStateManager;
|
|||||||
import net.minecraft.client.renderer.GlStateManager.DestFactor;
|
import net.minecraft.client.renderer.GlStateManager.DestFactor;
|
||||||
import net.minecraft.client.renderer.GlStateManager.SourceFactor;
|
import net.minecraft.client.renderer.GlStateManager.SourceFactor;
|
||||||
import net.minecraftforge.client.event.RenderLivingEvent;
|
import net.minecraftforge.client.event.RenderLivingEvent;
|
||||||
import net.minecraftforge.event.entity.living.PotionEvent.PotionAddedEvent;
|
|
||||||
import net.minecraftforge.event.entity.living.PotionEvent.PotionExpiryEvent;
|
|
||||||
import net.minecraftforge.event.entity.living.PotionEvent.PotionRemoveEvent;
|
|
||||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
@@ -45,27 +42,4 @@ public class RenderMirage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Using the invisible flag is a slight compromise but is very unlikely to conflict with anything
|
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public static void onPotionAddedEvent(PotionAddedEvent event){
|
|
||||||
if(event.getPotionEffect().getPotion() == WizardryPotions.mirage){
|
|
||||||
event.getEntity().setInvisible(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public static void onPotionRemoveEvent(PotionRemoveEvent event){
|
|
||||||
if(event.getPotionEffect() != null && event.getPotionEffect().getPotion() == WizardryPotions.mirage){
|
|
||||||
event.getEntity().setInvisible(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@SubscribeEvent
|
|
||||||
public static void onPotionExpiryEvent(PotionExpiryEvent event){
|
|
||||||
if(event.getPotionEffect() != null && event.getPotionEffect().getPotion() == WizardryPotions.mirage){
|
|
||||||
event.getEntity().setInvisible(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user