Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class BufferedBlock{
- int x;
- int y;
- int z;
- int meta;
- Block block;
- NBTTagCompound nbt;
- String lootTable;
- public BufferedBlock(int x,int y,int z,Block block,int meta){
- this.x = x;
- this.y = y;
- this.z = z;
- this.meta = meta;
- this.block = block;
- this.nbt = null;
- this.lootTable = null;
- }
- public BufferedBlock(int x,int y,int z,Block block,int meta, NBTTagCompound nbt){
- this.x = x;
- this.y = y;
- this.z = z;
- this.meta = meta;
- this.block = block;
- this.nbt = nbt;
- this.lootTable = null;
- }
- public BufferedBlock(int x,int y,int z,Block block,int meta, NBTTagCompound nbt,String lootTable){
- this.x = x;
- this.y = y;
- this.z = z;
- this.meta = meta;
- this.block = block;
- this.nbt = nbt;
- this.lootTable = lootTable;
- }
- public BufferedBlock rotate(float angle){
- int i =(int)Math.abs(angle/90);
- if(i == 0){
- return this;
- }
- if(i == 1){
- return new BufferedBlock(z,y,-x,block,meta,nbt,lootTable);
- }
- if(i == 2){
- return new BufferedBlock(-x,y,-z,block,meta,nbt,lootTable);
- }
- if(i == 3){
- return new BufferedBlock(-z,y,x,block,meta,nbt,lootTable);
- }
- return this;
- }
- public BufferedBlock copy(){
- return new BufferedBlock(x,y,z,block,meta,nbt,lootTable);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement