Skip to content

Commit

Permalink
experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
U5B committed Apr 28, 2023
1 parent 1abb3d1 commit a6b2d28
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
15 changes: 4 additions & 11 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import gg.essential.gradle.util.noServerRunConfigs

plugins {
kotlin("jvm") version "1.8.20"
kotlin("plugin.serialization") version "1.8.20"
kotlin("jvm") version "1.8.21"
kotlin("plugin.serialization") version "1.8.21"
id("gg.essential.defaults.loom") version "0.1.18"
id("gg.essential.defaults") version "0.1.18"
}
Expand All @@ -29,7 +29,7 @@ repositories {

dependencies {
// kotlin dependency (may not need this if I have essential)
// modImplementation("net.fabricmc:fabric-language-kotlin:$fabric_kotlin_version")
modImplementation("net.fabricmc:fabric-language-kotlin:$fabric_kotlin_version")

// fabric api
setOf(
Expand All @@ -53,14 +53,7 @@ dependencies {

tasks {
processResources {
val expansions =
mapOf(
"mod_version" to mod_version,
"base_name" to base_name,
"fabric_loader_version" to fabric_loader_version,
"fabric_api_version" to fabric_api_version,
"minecraft_version" to minecraft_version,
)
val expansions = project.properties

// inputs.property("mod_version_expansions", expansions)
filesMatching(listOf("fabric.mod.json")) { expand(expansions) }
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ org.gradle.parallel=true
minecraft_version=1.18.2
yarn_mappings=1.18.2+build.4
fabric_loader_version=0.14.11
fabric_kotlin_version=1.9.3+kotlin.1.8.20
fabric_kotlin_base=1.9.4
fabric_kotlin_version=1.9.4+kotlin.1.8.21

# Mod Properties
mod_version=1.0.0
Expand Down
13 changes: 13 additions & 0 deletions src/main/kotlin/net/usbwire/base/BaseMod.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import java.util.UUID
import net.fabricmc.api.ClientModInitializer
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents
import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderEvents;
import net.minecraft.client.MinecraftClient
import net.minecraft.network.MessageType
import net.minecraft.text.Text
Expand Down Expand Up @@ -57,3 +58,15 @@ object BaseMod : ClientModInitializer {
if (message.style?.clickEvent != null) logger.info(message.style.clickEvent.toString())
}
}

open class BaseFeature {
fun onTick () {}

fun onWorldTick () {}

fun onRenderTick () {}

fun init () {}

fun onChat () {}
}
1 change: 0 additions & 1 deletion src/main/kotlin/net/usbwire/base/features/Compass.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import gg.essential.universal.UMouse
import gg.essential.universal.wrappers.UPlayer
import net.minecraft.util.registry.Registry


import net.usbwire.base.util.chat.Coordinates
import net.usbwire.base.BaseMod
import net.usbwire.base.util.Util
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"minecraft": "~${minecraft_version}",
"java": ">=17",
"fabric": ">=${fabric_api_version}",
"fabric-language-kotlin": ">=1.8.20"
"fabric-language-kotlin": ">=1.9.4"
},
"suggests": {}
}

0 comments on commit a6b2d28

Please sign in to comment.