From 25291d849ffb5b8317fd1575e0cb94013dbfc96b Mon Sep 17 00:00:00 2001 From: KevDaDev <65958288+KevinDaGame@users.noreply.github.com> Date: Sat, 16 Dec 2023 11:59:14 +0100 Subject: [PATCH 1/2] Disable fabric for now --- settings.gradle.kts | 1 - 1 file changed, 1 deletion(-) diff --git a/settings.gradle.kts b/settings.gradle.kts index 20d9a56f..5378db43 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -17,4 +17,3 @@ plugins { include("VoxelSniperCore") include("VoxelSniperSpigot") include("VoxelSniperForge") -include("VoxelSniperFabric") From 1b900d8e315a2dcb0678437858cf6052d4f77641 Mon Sep 17 00:00:00 2001 From: KevDaDev <65958288+KevinDaGame@users.noreply.github.com> Date: Sat, 16 Dec 2023 12:16:34 +0100 Subject: [PATCH 2/2] Update Schematic4j to 1.1.0 --- .../util/schematic/SchematicReader.kt | 16 ++++++++-------- buildSrc/src/main/kotlin/voxel-core.gradle.kts | 7 ++----- settings.gradle.kts | 1 + 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/VoxelSniperCore/src/main/java/com/github/kevindagame/util/schematic/SchematicReader.kt b/VoxelSniperCore/src/main/java/com/github/kevindagame/util/schematic/SchematicReader.kt index 5c25b86e..403974d6 100644 --- a/VoxelSniperCore/src/main/java/com/github/kevindagame/util/schematic/SchematicReader.kt +++ b/VoxelSniperCore/src/main/java/com/github/kevindagame/util/schematic/SchematicReader.kt @@ -1,23 +1,23 @@ package com.github.kevindagame.util.schematic import com.github.kevindagame.VoxelSniper -import net.sandrohc.schematic4j.SchematicUtil -import net.sandrohc.schematic4j.schematic.types.SchematicPosInteger +import net.sandrohc.schematic4j.SchematicLoader + import java.io.File object SchematicReader { private fun readSchematic(file: File): VoxelSchematic { - val schematic = SchematicUtil.load(file) + val schematic = SchematicLoader.load(file) val voxelSchematicBuilder = VoxelSchematicBuilder() voxelSchematicBuilder.name = file.nameWithoutExtension - for (y in 0 until schematic.height) { - for (x in 0 until schematic.width) { - for (z in 0 until schematic.length) { - val pos = SchematicPosInteger(x, y, z) - val block = schematic.getBlock(pos) + for (y in 0 until schematic.height()) { + for (x in 0 until schematic.width()) { + for (z in 0 until schematic.length()) { + + val block = schematic.block(x,y,z) voxelSchematicBuilder.addBlock(x.toDouble(), y.toDouble(), z.toDouble(), block) } } diff --git a/buildSrc/src/main/kotlin/voxel-core.gradle.kts b/buildSrc/src/main/kotlin/voxel-core.gradle.kts index f656e44f..2e98268f 100644 --- a/buildSrc/src/main/kotlin/voxel-core.gradle.kts +++ b/buildSrc/src/main/kotlin/voxel-core.gradle.kts @@ -23,9 +23,6 @@ repositories { maven { url = uri("https://repo.maven.apache.org/maven2/") } - maven { - url = uri("https://jitpack.io") - } } val shadowNoRuntime by configurations.creating { @@ -42,8 +39,8 @@ dependencies { shadow("net.kyori:adventure-text-serializer-legacy:4.13.1") implementation(kotlin("stdlib-jdk8")) - implementation("com.github.SandroHc:schematic4j:0.1.0-SNAPSHOT") { - exclude("org.slf4j", "") + implementation("net.sandrohc:schematic4j:1.1.0") { + exclude("org.checkerframework", "") } shadowNoRuntime("com.google.code.gson:gson:2.10.1") shadow("org.yaml:snakeyaml:1.33") diff --git a/settings.gradle.kts b/settings.gradle.kts index 5378db43..5d65b89b 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -17,3 +17,4 @@ plugins { include("VoxelSniperCore") include("VoxelSniperSpigot") include("VoxelSniperForge") +//include("VoxelSniperFabric")