Guest User

Untitled

a guest
Apr 24th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. /*
  2. * To change this template, choose Tools | Templates
  3. * and open the template in the editor.
  4. */
  5. package me.ags131.spouttestplugin;
  6.  
  7. import java.util.logging.Level;
  8. import org.bukkit.plugin.Plugin;
  9. import org.getspout.spoutapi.Spout;
  10. import org.getspout.spoutapi.block.design.GenericCubeBlockDesign;
  11. import org.getspout.spoutapi.block.design.Quad;
  12. import org.getspout.spoutapi.block.design.SubTexture;
  13. import org.getspout.spoutapi.block.design.Texture;
  14.  
  15. /**
  16. *
  17. * @author Adam
  18. */
  19. public class ICBlockDesignBase extends GenericCubeBlockDesign{
  20. private Texture text;
  21. public ICBlockDesignBase(Plugin plugin,Texture text)
  22. {
  23. super(plugin,text,32);
  24. this.text=text;
  25. this.setBoundingBox(0,0,0,1,0.2f,1);
  26. renderBottom();
  27. }
  28.  
  29. private void renderBottom()
  30. {
  31. SubTexture sub=text.getSubTexture(textID);
  32.  
  33. Quad q1 = new Quad(0,sub);
  34. q1.addVertex(0,1,0,0);
  35. q1.addVertex(1,0,0,0);
  36. q1.addVertex(2,0,0.2f,0);
  37. q1.addVertex(3,1,0.2f,0);
  38.  
  39. Quad q2= new Quad(1,sub);
  40. q2.addVertex(0,0,0,0);
  41. q2.addVertex(1,0,0,1);
  42. q2.addVertex(2,0,0.2f,1);
  43. q2.addVertex(3,0,0.2f,0);
  44.  
  45.  
  46. Quad q3 = new Quad(2,sub);
  47. q3.addVertex(0,0,0,1);
  48. q3.addVertex(1,1,0,1);
  49. q3.addVertex(2,1,0.2f,1);
  50. q3.addVertex(3,0,0.2f,1);
  51.  
  52. Quad q4= new Quad(3,sub);
  53. q4.addVertex(0,1,0,1);
  54. q4.addVertex(1,1,0,0);
  55. q4.addVertex(2,1,0.2f,0);
  56. q4.addVertex(3,1,0.2f,1);
  57.  
  58. Quad q5 = new Quad(4,sub);
  59. q5.addVertex(0,0,0.2f,0);
  60. q5.addVertex(1,0,0.2f,1);
  61. q5.addVertex(2,1,0.2f,1);
  62. q5.addVertex(3,1,0.2f,0);
  63.  
  64. this.setQuadNumber(5);
  65. this.setQuad(q1).setQuad(q2).setQuad(q3).setQuad(q4).setQuad(q5);
  66. }
  67. }
Add Comment
Please, Sign In to add comment