Guest User

Untitled

a guest
Dec 6th, 2014
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. @Override
  2. public void flip(Random random, EntityPlayer player) {
  3.  
  4.  
  5.  
  6. setCurrentShader(new ResourceLocation("minecraft:shaders/post/flip.json"), null, player);
  7.  
  8.  
  9.  
  10. }
  11. @Override
  12. public void Phosphor(Random random, EntityPlayer player) {
  13.  
  14.  
  15. setCurrentShader(new ResourceLocation("minecraft:shaders/post/phosphor.json"), null, player);
  16.  
  17.  
  18.  
  19. }
  20.  
  21. @Override
  22. public void noCurrentShader(Random random, EntityPlayer player){
  23.  
  24.  
  25. Minecraft mc = Minecraft.getMinecraft();
  26. mc.entityRenderer.theShaderGroup = null;
  27. mc.entityRenderer.theShaderGroup.createBindFramebuffers(mc.displayWidth, mc.displayHeight);
  28.  
  29.  
  30.  
  31.  
  32. }
  33.  
  34.  
  35. @Override
  36.  
  37. public void setCurrentShader(ResourceLocation resourcelocation,World world, EntityPlayer player){
  38.  
  39. Minecraft mc = Minecraft.getMinecraft();
  40. try{
  41. mc.entityRenderer.theShaderGroup = new ShaderGroup(mc.getTextureManager(), mc.getResourceManager(), mc.getFramebuffer(), resourcelocation);
  42. }catch(JsonException e){
  43. e.printStackTrace();
  44. }
  45. mc.entityRenderer.theShaderGroup.createBindFramebuffers(mc.displayWidth, mc.displayHeight);
  46.  
  47. }
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57. }
Advertisement
Add Comment
Please, Sign In to add comment