Skip to content

Commit

Permalink
Update Schematic4j to 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinDaGame committed Dec 16, 2023
1 parent 25291d8 commit 1b900d8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -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)
}
}
Expand Down
7 changes: 2 additions & 5 deletions buildSrc/src/main/kotlin/voxel-core.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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")
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ plugins {
include("VoxelSniperCore")
include("VoxelSniperSpigot")
include("VoxelSniperForge")
//include("VoxelSniperFabric")

0 comments on commit 1b900d8

Please sign in to comment.