Advertisement
Guest User

Untitled

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