Skip to content

Commit

Permalink
Switched to full Kotlin
Browse files Browse the repository at this point in the history
  • Loading branch information
miyucomics committed Oct 20, 2024
1 parent 8b1a6e9 commit 72388b8
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 51 deletions.
15 changes: 0 additions & 15 deletions src/main/java/miyucomics/hexical/HexicalClient.java

This file was deleted.

14 changes: 14 additions & 0 deletions src/main/java/miyucomics/hexical/HexicalClient.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package miyucomics.hexical

import miyucomics.hexical.inits.*
import net.fabricmc.api.ClientModInitializer

class HexicalClient : ClientModInitializer {
override fun onInitializeClient() {
HexicalBlocks.clientInit()
HexicalEntities.clientInit()
HexicalItems.clientInit()
HexicalKeybinds.init()
HexicalNetworking.clientInit()
}
}
33 changes: 0 additions & 33 deletions src/main/java/miyucomics/hexical/HexicalMain.java

This file was deleted.

34 changes: 34 additions & 0 deletions src/main/java/miyucomics/hexical/HexicalMain.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package miyucomics.hexical

import miyucomics.hexical.data.PrestidigitationData
import miyucomics.hexical.inits.*
import net.fabricmc.api.ModInitializer
import net.minecraft.util.Identifier
import java.util.*

class HexicalMain : ModInitializer {
override fun onInitialize() {
HexicalAdvancements.init()
HexicalBlocks.init()
HexicalData.init()
HexicalEntities.init()
HexicalEvents.init()
HexicalIota.init()
HexicalItems.init()
HexicalSounds.init()
HexicalPatterns.init()
HexicalNetworking.serverInit()
PrestidigitationData.init()
}

companion object {
const val MOD_ID: String = "hexical"
@JvmField
val RANDOM: Random = Random()
const val EVOKE_DURATION: Int = 20

fun id(string: String?): Identifier {
return Identifier(MOD_ID, string)
}
}
}
1 change: 0 additions & 1 deletion src/main/java/miyucomics/hexical/inits/HexicalEntities.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import miyucomics.hexical.entities.specklikes.MeshRenderer
import miyucomics.hexical.entities.specklikes.SpeckEntity
import miyucomics.hexical.entities.specklikes.SpeckRenderer
import net.fabricmc.fabric.api.client.rendering.v1.EntityRendererRegistry
import net.minecraft.client.render.entity.EntityRendererFactory
import net.minecraft.entity.EntityType
import net.minecraft.entity.SpawnGroup
import net.minecraft.util.registry.Registry
Expand Down
10 changes: 8 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,16 @@
"environment": "*",
"entrypoints": {
"main": [
"miyucomics.hexical.HexicalMain"
{
"adapter": "kotlin",
"value": "miyucomics.hexical.HexicalMain"
}
],
"client": [
"miyucomics.hexical.HexicalClient"
{
"adapter": "kotlin",
"value": "miyucomics.hexical.HexicalClient"
}
]
},
"mixins": [
Expand Down

0 comments on commit 72388b8

Please sign in to comment.