Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (entity.getActivePotionEffect(BioWarfarePotionRegistry.InvertedVision) != null) {
- Random randomGenerator = new Random();
- int randomint = randomGenerator.nextInt(20);
- if (randomint == 1) {
- if (entity.worldObj.isRemote) {
- if (GLContext.getCapabilities().OpenGL20 && OpenGlHelper.areShadersSupported()) {
- Method load = null;
- try {
- load = Shader.class.getDeclaredMethod("func_175069_a", ResourceLocation.class);
- }
- catch (NoSuchMethodException e) {
- e.printStackTrace();
- } catch (SecurityException e) {
- e.printStackTrace();
- }
- load.setAccessible(true);
- try {
- load.invoke(Minecraft.getMinecraft().entityRenderer, new ResourceLocation("shaders/post/flip.json"));
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- } catch (InvocationTargetException e) {
- e.printStackTrace();
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement