Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
- package me.ags131.spouttestplugin;
- import java.util.logging.Level;
- import org.bukkit.plugin.Plugin;
- import org.getspout.spoutapi.Spout;
- import org.getspout.spoutapi.block.design.GenericCubeBlockDesign;
- import org.getspout.spoutapi.block.design.Quad;
- import org.getspout.spoutapi.block.design.SubTexture;
- import org.getspout.spoutapi.block.design.Texture;
- /**
- *
- * @author Adam
- */
- public class ICBlockDesignBase extends GenericCubeBlockDesign{
- private Texture text;
- public ICBlockDesignBase(Plugin plugin,Texture text)
- {
- super(plugin,text,32);
- this.text=text;
- this.setBoundingBox(0,0,0,1,0.2f,1);
- renderBottom();
- }
- private void renderBottom()
- {
- SubTexture sub=text.getSubTexture(textID);
- Quad q1 = new Quad(0,sub);
- q1.addVertex(0,1,0,0);
- q1.addVertex(1,0,0,0);
- q1.addVertex(2,0,0.2f,0);
- q1.addVertex(3,1,0.2f,0);
- Quad q2= new Quad(1,sub);
- q2.addVertex(0,0,0,0);
- q2.addVertex(1,0,0,1);
- q2.addVertex(2,0,0.2f,1);
- q2.addVertex(3,0,0.2f,0);
- Quad q3 = new Quad(2,sub);
- q3.addVertex(0,0,0,1);
- q3.addVertex(1,1,0,1);
- q3.addVertex(2,1,0.2f,1);
- q3.addVertex(3,0,0.2f,1);
- Quad q4= new Quad(3,sub);
- q4.addVertex(0,1,0,1);
- q4.addVertex(1,1,0,0);
- q4.addVertex(2,1,0.2f,0);
- q4.addVertex(3,1,0.2f,1);
- Quad q5 = new Quad(4,sub);
- q5.addVertex(0,0,0.2f,0);
- q5.addVertex(1,0,0.2f,1);
- q5.addVertex(2,1,0.2f,1);
- q5.addVertex(3,1,0.2f,0);
- this.setQuadNumber(5);
- this.setQuad(q1).setQuad(q2).setQuad(q3).setQuad(q4).setQuad(q5);
- }
- }
Add Comment
Please, Sign In to add comment