Skip to content

Commit

Permalink
broken code for now
Browse files Browse the repository at this point in the history
  • Loading branch information
U5B committed Apr 26, 2023
1 parent b2a39dc commit 8f4e28b
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 2 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ classes/
# vscode

.settings/
.vscode/
bin/
.classpath
.project
Expand Down
31 changes: 31 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Minecraft Client",
"request": "launch",
"cwd": "${workspaceFolder}/run",
"console": "internalConsole",
"stopOnEntry": false,
"mainClass": "net.fabricmc.devlaunchinjector.Main",
"vmArgs": "\"-Dfabric.dli.config\u003dC:\\shared\\codez\\Github\\kotlin-test-mod\\.gradle\\loom-cache\\launch.cfg\" \"-Dfabric.dli.env\u003dclient\" \"-Dfabric.dli.main\u003dnet.fabricmc.loader.impl.launch.knot.KnotClient\"",
"args": "",
"env": {},
"projectName": ""
},
{
"type": "java",
"name": "Minecraft Server",
"request": "launch",
"cwd": "${workspaceFolder}/run",
"console": "internalConsole",
"stopOnEntry": false,
"mainClass": "net.fabricmc.devlaunchinjector.Main",
"vmArgs": "\"-Dfabric.dli.config\u003dC:\\shared\\codez\\Github\\kotlin-test-mod\\.gradle\\loom-cache\\launch.cfg\" \"-Dfabric.dli.env\u003dserver\" \"-Dfabric.dli.main\u003dnet.fabricmc.loader.impl.launch.knot.KnotServer\"",
"args": "\"nogui\"",
"env": {},
"projectName": ""
}
]
}
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"java.configuration.updateBuildConfiguration": "interactive",
"java.compile.nullAnalysis.mode": "disabled",
"editor.tabCompletion": "on",
"editor.tabSize": 2,
"editor.detectIndentation": false,
"files.autoSave": "onFocusChange",
"java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx4G -Xms100m -Xlog:disable"
}
7 changes: 7 additions & 0 deletions src/main/kotlin/net/usbwire/base/BaseMod.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents
import net.minecraft.client.MinecraftClient
import net.minecraft.network.MessageType
import net.minecraft.text.Text
import net.minecraft.client.world.ClientWorld
import net.usbwire.base.access.InGameHudAccess
import net.usbwire.base.commands.BaseCommand
import net.usbwire.base.features.Poi
import net.usbwire.base.features.Compass
import org.slf4j.LoggerFactory
import gg.essential.universal.UMatrixStack

Expand All @@ -27,6 +29,11 @@ object BaseMod : ClientModInitializer {
BaseCommand.register()
Poi.changeState()
// ClientLifecycleEvents.CLIENT_STARTED.register { client -> run { initChat(client) } }
ClientTickEvents.START_WORLD_TICK.register { clientWorld -> run { worldTick(clientWorld) }}
}

fun worldTick (clientWorld: ClientWorld) {
Compass.onTick()
}

fun initChat(client: MinecraftClient) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/net/usbwire/base/util/Util.kt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ object Util {
val prefix = UTextComponent(UChat.addColor("§7[§a${BaseMod.name}§7]§r "))
message.addTextComponent(0, prefix).chat()
}

object Color {
val xaero =
mapOf(
Expand Down

0 comments on commit 8f4e28b

Please sign in to comment.