Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @SubscribeEvent
- public void onOverlayRendered(RenderGameOverlayEvent.Pre event)
- {
- if (event.type != RenderGameOverlayEvent.ElementType.PORTAL)
- return;
- EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
- if (isMyPotionActive)
- {
- if ((Boolean) ReflectionHelper.getPrivateValue(Entity.class, player, "field_71087_bX", "inPortal") == false)
- {
- player.timeInPortal = 0.3F;
- player.prevTimeInPortal = 0.25F;
- event.setCanceled(true);
- }
- } else
- {
- if (!player.isPotionActive(Potion.confusion) && (Boolean) ReflectionHelper.getPrivateValue(Entity.class, player, "field_71087_bX", "inPortal") == false)
- {
- player.timeInPortal = 0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement