forked from SteamWar/SteamWar
Fix mixup of dimensions in autochecker
This commit is contained in:
@@ -37,7 +37,10 @@ public class AutoChecker {
|
|||||||
public static final AutoChecker impl = new AutoChecker();
|
public static final AutoChecker impl = new AutoChecker();
|
||||||
|
|
||||||
public AutoCheckerResult check(Clipboard clipboard, GameModeConfig<Material, String> type) {
|
public AutoCheckerResult check(Clipboard clipboard, GameModeConfig<Material, String> type) {
|
||||||
return AutoCheckerResult.builder().type(type).height(clipboard.getDimensions().x()).width(clipboard.getDimensions().x())
|
return AutoCheckerResult.builder()
|
||||||
|
.type(type)
|
||||||
|
.height(clipboard.getDimensions().y())
|
||||||
|
.width(clipboard.getDimensions().x())
|
||||||
.depth(clipboard.getDimensions().z()).blockScanResult(scan(clipboard, type))
|
.depth(clipboard.getDimensions().z()).blockScanResult(scan(clipboard, type))
|
||||||
.entities(clipboard.getEntities().stream().map(Entity::getLocation)
|
.entities(clipboard.getEntities().stream().map(Entity::getLocation)
|
||||||
.map(blockVector3 -> new BlockPos(blockVector3.getBlockX(), blockVector3.getBlockY(), blockVector3.getBlockZ()))
|
.map(blockVector3 -> new BlockPos(blockVector3.getBlockX(), blockVector3.getBlockY(), blockVector3.getBlockZ()))
|
||||||
@@ -46,8 +49,12 @@ public class AutoChecker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public AutoCheckerResult sizeCheck(Clipboard clipboard, GameModeConfig<Material, String> type) {
|
public AutoCheckerResult sizeCheck(Clipboard clipboard, GameModeConfig<Material, String> type) {
|
||||||
return AutoCheckerResult.builder().type(type).height(clipboard.getDimensions().y()).width(clipboard.getDimensions().x())
|
return AutoCheckerResult.builder()
|
||||||
.depth(clipboard.getDimensions().z()).build();
|
.type(type)
|
||||||
|
.height(clipboard.getDimensions().y())
|
||||||
|
.width(clipboard.getDimensions().x())
|
||||||
|
.depth(clipboard.getDimensions().z())
|
||||||
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public AutoChecker.BlockScanResult scan(Clipboard clipboard, GameModeConfig<Material, String> type) {
|
public AutoChecker.BlockScanResult scan(Clipboard clipboard, GameModeConfig<Material, String> type) {
|
||||||
|
|||||||
Reference in New Issue
Block a user