Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2015
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. if (entity.getActivePotionEffect(BioWarfarePotionRegistry.InvertedVision) != null) {
  2. Random randomGenerator = new Random();
  3. int randomint = randomGenerator.nextInt(20);
  4. if (randomint == 1) {
  5. if (entity.worldObj.isRemote) {
  6. if (GLContext.getCapabilities().OpenGL20 && OpenGlHelper.areShadersSupported()) {
  7. Method load = null;
  8. try {
  9. load = EntityRenderer.class.getDeclaredMethod("loadShader", ResourceLocation.class);
  10. } catch (NoSuchMethodException e) {
  11. e.printStackTrace();
  12. } catch (SecurityException e) {
  13. e.printStackTrace();
  14. }
  15. load.setAccessible(true);
  16. try {
  17. load.invoke(Minecraft.getMinecraft().entityRenderer, new ResourceLocation("shaders/post/flip.json"));
  18. } catch (IllegalAccessException e) {
  19. e.printStackTrace();
  20. } catch (IllegalArgumentException e) {
  21. e.printStackTrace();
  22. } catch (InvocationTargetException e) {
  23. e.printStackTrace();
  24. }
  25. }
  26.  
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement