Fix some more build errors

This commit is contained in:
2024-12-23 10:45:20 +01:00
parent ae15e16dae
commit ef19959eb2
10 changed files with 62 additions and 16 deletions
@@ -0,0 +1,14 @@
package de.steamwar.bausystem.region.utils;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@Getter
public enum RegionExtensionType {
NORMAL(false),
EXTENSION(true),
;
private final boolean extension;
}
@@ -1,7 +0,0 @@
package de.steamwar.bausystem.region.utils;
public enum RegionSelectionType {
LOCAL,
GLOBAL,
;
}
@@ -0,0 +1,39 @@
package de.steamwar.bausystem.region.utils;
import de.steamwar.bausystem.region.Point;
import de.steamwar.bausystem.region.Region;
import de.steamwar.bausystem.shared.EnumDisplay;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.function.BiFunction;
import java.util.function.Function;
import java.util.function.Predicate;
@AllArgsConstructor
@Getter
public enum RegionType implements EnumDisplay {
NORMAL("REGION_TYPE_NORMAL",
region -> true,
region -> null,
(region, extension) -> region.getMinPoint(),
(region, extension) -> region.getMaxPoint()),
BUILD("REGION_TYPE_BUILD",
region -> region.getBuildArea().isPresent(),
Region::getBuildArea,
(region, extension) -> region.getBuildArea().getMinPoint(extension),
(region, extension) -> region.getBuildArea().getMaxPoint(extension)),
TESTBLOCK("REGION_TYPE_ONLY_TB",
region -> region.getTestblockArea().isPresent(),
Region::getTestblockArea,
(region, extension) -> region.getTestblockArea().getMinPoint(extension),
(region, extension) -> region.getTestblockArea().getMaxPoint(extension)),
;
private String chatValue;
private Predicate<Region> hasType;
private Function<Region, Region.Inner> toInner;
private BiFunction<Region, Boolean, Point> toMinPoint;
private BiFunction<Region, Boolean, Point> toMaxPoint;
}