Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@ jobs:

- name: Setup Gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
with:
gradle-version: '8.8'

- name: Build with Gradle 8.8
- name: Build with Gradle 8.12
run: gradle -Pversion=${{steps.version.outputs.version}} build

- name: Upload a Build Artifact
Expand Down
1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/modules/CuTAPI.test.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions .idea/modules/Users.mastriel.IdeaProjects.CuTAPI.main.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions .idea/modules/mastriel.IdeaProjects.CuTAPI.test.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/modules/xyz.mastriel.CuTAPI.main.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/Build_CuTAPI.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ plugins {
kotlin("jvm") version "2.0.20"
java

id("com.github.johnrengelman.shadow") version "8.1.1"
id("com.gradleup.shadow") version "9.2.0"
id("org.jetbrains.kotlin.plugin.serialization") version "1.5.31"
id("xyz.jpenilla.run-paper") version "2.3.1"

`maven-publish`

id("io.papermc.paperweight.userdev") version "2.0.0-beta.13"

id("io.papermc.paperweight.userdev") version "2.0.0-beta.19"
}

repositories {
Expand All @@ -38,6 +37,7 @@ repositories {
val kotlinVersion: String by properties
group = "xyz.mastriel"
version = properties["version"]!!
val minecraftVersion: String by properties



Expand Down Expand Up @@ -65,8 +65,8 @@ dependencies {

shadow("net.lingala.zip4j:zip4j:2.11.5")
shadow("com.jhlabs:filters:2.0.235-1")

paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
paperweight.paperDevBundle("${minecraftVersion}-R0.1-SNAPSHOT")
}


Expand All @@ -75,7 +75,7 @@ tasks {
runServer {
pluginJars("../CuTAPI/build/libs/CuTAPI-0.1.0a-reobf.jar")

minecraftVersion("1.21.4")
minecraftVersion(minecraftVersion)
}
}

Expand Down Expand Up @@ -116,7 +116,7 @@ tasks.reobfJar {
}

tasks.assemble {
dependsOn(tasks.reobfJar)
dependsOn(tasks.shadowJar)
}

publishing {
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
kotlin.code.style=official
kotlinVersion=2.0.20
version=0.1.1
version=0.1.1
minecraftVersion=1.21.11
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
103 changes: 0 additions & 103 deletions schemas/cutmeta-schema.json

This file was deleted.

11 changes: 9 additions & 2 deletions src/main/kotlin/xyz/mastriel/cutapi/CuTAPI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import kotlinx.serialization.cbor.*
import kotlinx.serialization.json.*
import net.peanuuutz.tomlkt.*
import org.bukkit.plugin.Plugin
import xyz.mastriel.cutapi.CuTAPI.registerPlugin
import xyz.mastriel.cutapi.block.*
import xyz.mastriel.cutapi.block.breaklogic.*
import xyz.mastriel.cutapi.nms.*
Expand All @@ -13,7 +14,6 @@ import xyz.mastriel.cutapi.registry.*
import xyz.mastriel.cutapi.resources.*
import xyz.mastriel.cutapi.resources.minecraft.*
import xyz.mastriel.cutapi.utils.*
import kotlin.collections.set


/**
Expand Down Expand Up @@ -45,6 +45,13 @@ public object CuTAPI {
public val packetEventManager: PacketEventManager = PacketEventManager()
internal val blockBreakManager = BlockBreakManager()

public val experimentalBlockSupport: Boolean by cutConfigValue("experimental_block_support", false)

/**
* Most registries should probably be initialized here.
*/
public val serverReady: EventHandlerList<Unit> = EventHandlerList()

/**
* Register a plugin with CuTAPI. This is used to namespace any items registered with the API, and
* is used to hold some other additional information about the plugin.
Expand Down Expand Up @@ -145,7 +152,7 @@ public object CuTAPI {
}


private val namespaceRegex = "[a-zA-Z0-9/_+]+".toRegex()
private val namespaceRegex = "[a-z0-9/_+.]+".toRegex()

/**
* Validate a namespace string, to ensure that it won't cause problems. See [registerPlugin]
Expand Down
Loading
Loading