Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //The declaration
- ArrayList<Block> blockArray = new ArrayList<Block>();
- moveBlocks(blockArray,world,1,0,0);
- //And moveBlocks
- public void moveBlocks(ArrayList blockArray,World world,int x,int y,int z){
- int i;
- Block block;
- for(i=0;i<blockArray.size();i+=1) {
- block = blockArray.get(i);
- world.getBlockAt(block.getX()+x,block.getY()+y,block.getZ()+z).setType(block.getType());
- block.setType(Material.AIR);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement