[Bug] Sign will be destroyed, if redstone is placed before sign (script)
hellow554 opened this issue ยท 1 comments
I'm playing around with the scriptengine, but I think this is a general problem, but you can't reproduce it with the "normal" worldedit.
Try to execute the following Script:
//Needed imports
importPackage(Packages.com.sk89q.worldedit.blocks);
blocks = context.remember();
loc = player.getBlockOn().add(0,1,0);
blocks.setBlock(loc, new BaseBlock(76,5));
for (i = 0; i < 4; i++) {
blocks.setBlock(loc.add(1+i,0,0), context.getBlock(55));
}
blocks.setBlock(loc.add(2+i,0,0), context.getBlock(1));
blocks.setBlock(loc.add(1+i,0,0), new SignBlock(68,4,new Array("Test","With","A","Message")));
But if you do the following:
//Needed imports
importPackage(Packages.com.sk89q.worldedit.blocks);
blocks = context.remember();
loc = player.getBlockOn().add(0,1,0);
todo = new Array();
blocks.setBlock(loc, new BaseBlock(76,5));
for (i = 0; i < 4; i++) {
todo[todo.length] = new Array(loc.add(1+i,0,0), context.getBlock(55));
}
blocks.setBlock(loc.add(2+i,0,0), context.getBlock(1));
blocks.setBlock(loc.add(1+i,0,0), new SignBlock(68,4,new Array("Test","With","A","Message")));
for (i = 0; i < todo.length; i++) {
blocks.setBlock(todo[i][0], todo[i][1]);
}
it will work.... i don't know why.
Try to find out, and fix it :)
Have fun