This is my simple script:
public void cast(Player caster) {
Location loc = caster.getTargetBlock(null, 512).getLocation();
for (int c = 0; c < 2; c++) {
for (int b = 0; b < 2; b++) {
for (int a = 0; a < 1; a++) {
caster.sendMessage("" + loc);
Block ice = caster.getWorld().getBlockAt(loc.add(a, b, c));
ice.setTypeId(79);
}
}
}
}
I'm trying to make it so loc
remains static and unchanging. It has been changing throughout the for loop and I wish to prevent this.