This commit is contained in:
parent
23cc2c8582
commit
263c60bf2e
1 changed files with 11 additions and 4 deletions
|
@ -12,6 +12,7 @@ import net.pietru.cookie_utils.permissions.ObjectPermList;
|
|||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.util.Objects;
|
||||
|
||||
import static net.pietru.cookie_utils.utils.directory_utils.get_path_string;
|
||||
|
||||
|
@ -19,6 +20,7 @@ public class regionSetup extends Setup {
|
|||
Vector3 p1;
|
||||
Vector3 p2;
|
||||
String name="";
|
||||
String zoneId="";
|
||||
|
||||
Area area;
|
||||
|
||||
|
@ -82,10 +84,15 @@ public class regionSetup extends Setup {
|
|||
|
||||
@Override
|
||||
public boolean set_setup_block_pos(BlockPosition value) {
|
||||
if (step==0)
|
||||
if (step==0) {
|
||||
p1 = new Vector3(value.getGlobalX(), value.getGlobalY(), value.getGlobalZ());
|
||||
else if (step==1)
|
||||
zoneId = value.getZone().zoneId;
|
||||
}
|
||||
else if (step==1) {
|
||||
p2 = new Vector3(value.getGlobalX(), value.getGlobalY(), value.getGlobalZ());
|
||||
if (!Objects.equals(zoneId, value.getZone().zoneId))
|
||||
zoneId="";
|
||||
}
|
||||
return step==0 || step==1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue