Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @SubscribeEvent
- public static void onPlayerRenderPre(RenderPlayerEvent.Pre event)
- {
- EntityPlayer player = event.getEntityPlayer();
- PotionEffect growth = player.getActivePotionEffect(Main.GROWTH);
- PotionEffect shrinking = player.getActivePotionEffect(Main.SHRINKING);
- if(player.isPotionActive(Main.GROWTH))
- {
- if(growth.getAmplifier() == 0)
- {
- GlStateManager.pushMatrix();
- GlStateManager.scale(1.5F, 1.5F, 1.5F);
- }
- if(growth.getAmplifier() == 1)
- {
- GlStateManager.pushMatrix();
- GlStateManager.scale(2.0F, 2.0F, 2.0F);
- }
- }
- if(player.isPotionActive(Main.SHRINKING))
- {
- if(shrinking.getAmplifier() == 0)
- {
- GlStateManager.pushMatrix();
- GlStateManager.scale(0.5F, 0.5F, 0.5F);
- }
- if(shrinking.getAmplifier() == 1)
- {
- GlStateManager.pushMatrix();
- GlStateManager.scale(0.25F, 0.25F, 0.25F);
- }
- }
- }
- @SubscribeEvent
- public static void onPlayerRenderPost(RenderPlayerEvent.Post event)
- {
- GlStateManager.popMatrix();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement