forked from SteamWar/SteamWar
Add RegionData
Improve TestblockCommand with remembering the TB
This commit is contained in:
+5
@@ -139,4 +139,9 @@ public final class FixedGlobalRegion implements Region {
|
||||
public @NonNull RegionBackups getBackups() {
|
||||
return RegionBackups.EMPTY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull RegionData getRegionData() {
|
||||
return RegionData.EMPTY;
|
||||
}
|
||||
}
|
||||
|
||||
+8
@@ -26,6 +26,7 @@ import de.steamwar.bausystem.region.flags.Flag;
|
||||
import de.steamwar.bausystem.region.flags.TestblockMode;
|
||||
import de.steamwar.bausystem.utils.FlatteningWrapper;
|
||||
import de.steamwar.bausystem.utils.PasteBuilder;
|
||||
import de.steamwar.bausystem.worlddata.WorldData;
|
||||
import de.steamwar.core.Core;
|
||||
import de.steamwar.sql.SchematicType;
|
||||
import lombok.NonNull;
|
||||
@@ -57,6 +58,7 @@ public class FixedRegion implements Region {
|
||||
private final int floorLevel;
|
||||
private final int waterLevel;
|
||||
private final GameModeConfig gameModeConfig;
|
||||
private final RegionData regionData;
|
||||
private final RegionHistory regionHistory = new RegionHistory.Impl(20);
|
||||
|
||||
private final RegionBackups regionBackups = new RegionBackups() {
|
||||
@@ -335,6 +337,7 @@ public class FixedRegion implements Region {
|
||||
}
|
||||
}
|
||||
this.gameModeConfig = new GameModeConfig(found);
|
||||
this.regionData = new RegionData.RegionDataImpl(regionData, WorldData::write);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -381,4 +384,9 @@ public class FixedRegion implements Region {
|
||||
public @NonNull RegionBackups getBackups() {
|
||||
return regionBackups;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NonNull RegionData getRegionData() {
|
||||
return regionData;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user