Skip to content

Commit

Permalink
feat(mod): 1.21.2-pre1 fabric
Browse files Browse the repository at this point in the history
  • Loading branch information
Apehum committed Oct 9, 2024
1 parent c7d718f commit 0d44230
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ abstract class GlobalEvent<T> (
) {
private val listeners: MutableSet<T> = CopyOnWriteArraySet()

var invoker = invokerSupplier.apply(listeners)
val invoker = invokerSupplier.apply(listeners)

fun registerListener(listener: T) {
if (listeners.add(listener)) invokerSupplier.apply(listeners)
Expand Down
1 change: 1 addition & 0 deletions versions/1.21.2-fabric/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
essential.defaults.loom.minecraft=com.mojang:minecraft:1.21.2-pre1
1 change: 1 addition & 0 deletions versions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ dependencies {
12004 -> "0.95.4+1.20.4"
12006 -> "0.97.7+1.20.6"
12100 -> "0.100.4+1.21"
12102 -> "0.105.3+1.21.2"
else -> throw GradleException("Unsupported platform $platform")
}

Expand Down
4 changes: 4 additions & 0 deletions versions/root.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ group = "$group.versions-root"

preprocess {

val fabric12102 = createNode("1.21.2-fabric", 12102, "official")

val fabric12100 = createNode("1.21-fabric", 12100, "official")
val neoForge12100 = createNode("1.21-neoforge", 12100, "official")
val forge12100 = createNode("1.21-forge", 12100, "official")
Expand Down Expand Up @@ -36,6 +38,8 @@ preprocess {
val fabric11605 = createNode("1.16.5-fabric", 11605, "official")
val forge11605 = createNode("1.16.5-forge", 11605, "official")

fabric12102.link(fabric12100)

neoForge12100.link(fabric12006)
fabric12100.link(fabric12006)
forge12100.link(forge12004)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,13 @@ class ModServerWorld(

//#if MC>=12005
//$$ private fun parseGameEvent(gameEventName: String): Holder.Reference<GameEvent> =
//#if MC>=12102
//$$ BuiltInRegistries.GAME_EVENT.get(ResourceLocation.tryParse(gameEventName)!!)
//$$ .orElseThrow { IllegalArgumentException("Invalid game event") }
//#else
//$$ BuiltInRegistries.GAME_EVENT.getHolder(ResourceLocation.tryParse(gameEventName))
//$$ .orElseThrow { IllegalArgumentException("Invalid game event") }
//#endif
//#elseif MC>=11900
private fun parseGameEvent(gameEventName: String): GameEvent {
//#if MC>=11903
Expand Down

0 comments on commit 0d44230

Please sign in to comment.