Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Block b = wo.getBlockAt(ox+i,oy+j,oz+k);
- Block nb = wo.getBlockAt(nx+i,ny+j,nz+k);
- nb.setType(b.getType());
- if (b.getType()!=Material.AIR) {
- nb.setData(b.getData());
- ///nb.getState().setData(b.getState().getData());
- BlockState bs = b.getState();
- BlockState nbs = nb.getState();
- nbs.setType(bs.getType());
- nbs.setData(bs.getData());
- MaterialData md = bs.getData();
- MaterialData nmd = nbs.getData();
- nmd.setData(md.getData());
- if (bs instanceof Sign) {
- Sign s = (Sign) bs;
- Sign ns = (Sign) nbs;
- for(int z=0;z<4;z++) {
- ns.setLine(z,s.getLine(z));
- }
- ns.setData(s.getData());
- //neither setLine nor setData successfully copy the text on the sign.
- //however, the sign's direction is properly copied
- }
- if (bs instanceof RedstoneTorch) {
- //to-do
- //the torches direction is not properly copied and thus they pop off the wall
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement