Skip to content
Draft
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
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id("java-library")
id("net.neoforged.moddev")
id("me.modmuss50.mod-publish-plugin") version "0.8.4" apply false
id("xyz.jpenilla.resource-factory") version "1.3.0" apply false
}

extensions.create("runConfigCommon", RunConfigCommon.class)
Expand Down
81 changes: 68 additions & 13 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import java.util.stream.Collectors
import net.fabricmc.loom.util.gradle.SourceSetHelper
import xyz.jpenilla.resourcefactory.fabric.Environment

plugins {
id("quiet-fabric-loom")
id 'maven-publish'
id 'xyz.jpenilla.resource-factory-fabric-convention'
}

dependencies {
Expand Down Expand Up @@ -31,19 +33,6 @@ dependencies {
include fabricApiLibs.base
}

tasks.processResources {
def properties = [
"version": project.version,
"minecraft_version": minecraft_version,
"loader_version": loader_version,
"mod_version": mod_version
]
inputs.properties(properties)
filesMatching("fabric.mod.json") {
expand properties
}
}

tasks.shadowJar {
archiveClassifier = "dev-all"
destinationDirectory = layout.buildDirectory.dir("libs")
Expand All @@ -53,6 +42,72 @@ tasks.shadowJar {
relocate 'org.yaml.snakeyaml', 'ca.spottedleaf.moonrise.libs.org.yaml.snakeyaml'
}

fabricModJson {
id = "moonrise"
name = "Moonrise"
description = "Optimisation mod for the dedicated and integrated server."
author("Spottedleaf")
contact {
issues = "https://github.com/Tuinity/Moonrise/issues"
sources = "https://github.com/Tuinity/Moonrise"
extra.put("discord", "https://discord.gg/tuinity")
homepage = "https://www.curseforge.com/minecraft/mc-mods/moonrise"
}
breaks("notenoughcrashes")
breaks("starlight")
breaks("c2me")
license("GPL-3.0-only")
icon("assets/moonrise/icon.png")
environment = Environment.ANY
clientEntrypoint("ca.spottedleaf.moonrise.fabric.MoonriseFabricClient")
entrypoint("modmenu", "ca.spottedleaf.moonrise.fabric.MoonriseModMenuHook")
mixin("moonrise.mixins.json")
mixin("moonrise-fabric.mixins.json")
accessWidener = "moonrise.accesswidener"
depends("fabricloader", ">=${loader_version}")
depends("minecraft", ">1.21.4 <1.21.6")
depends("fabric-command-api-v2", "*")
custom.put(
"ferritecore:disabled_options",
simpleCustomValueList(String, ["replaceNeighborLookup", "replacePropertyMap"])
)
custom.put(
"lithium:options",
simpleCustomValueMap(
String,
Boolean,
[
"mixin.ai.poi": false,
"mixin.alloc.deep_passengers": false,
"mixin.alloc.entity_tracker": false,
"mixin.block.flatten_states": false,
"mixin.chunk.entity_class_groups": false,
"mixin.chunk.no_validation": false,
"mixin.collections.chunk_tickets": false,
"mixin.collections.entity_ticking": false,
"mixin.entity.collisions.intersection": false,
"mixin.entity.collisions.movement": false,
"mixin.entity.collisions.unpushable_cramming": false,
"mixin.entity.replace_entitytype_predicates": false,
"mixin.math.fast_blockpos": false,
"mixin.math.fast_util": false,
"mixin.minimal_nonvanilla.collisions.empty_space": false,
"mixin.minimal_nonvanilla.world.expiring_chunk_tickets": false,
"mixin.shapes.blockstate_cache": false,
"mixin.shapes.optimized_matching": false,
"mixin.shapes.specialized_shapes": false,
"mixin.util.block_tracking": false,
"mixin.util.entity_movement_tracking": false,
"mixin.world.block_entity_ticking": false,
"mixin.world.chunk_access": false,
"mixin.world.explosions.block_raycast": false,
"mixin.world.temperature_cache": false,
"mixin.world.tick_scheduler": false,
]
)
)
}

publishMods {
file = remapJar.archiveFile
modLoaders = ["fabric"]
Expand Down
76 changes: 0 additions & 76 deletions fabric/src/main/resources/fabric.mod.json

This file was deleted.

82 changes: 70 additions & 12 deletions neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import net.neoforged.moddevgradle.internal.RunGameTask
plugins {
id("net.neoforged.moddev")
id 'maven-publish'
id 'xyz.jpenilla.resource-factory-neoforge-convention'
}

repositories {
Expand Down Expand Up @@ -57,18 +58,6 @@ dependencies {
jarJar "me.shedaniel.cloth:cloth-config-neoforge:${rootProject.cloth_version}"
}

tasks.processResources {
def properties = [
"version": project.version,
"minecraft_version": minecraft_version,
"mod_version": mod_version
]
inputs.properties(properties)
filesMatching("META-INF/neoforge.mods.toml") {
expand properties
}
}

tasks.jar {
archiveClassifier = "dev"
}
Expand All @@ -94,6 +83,75 @@ tasks.assemble {
dependsOn tasks.productionJar
}

neoForgeModsToml {
license = "GPLv3"
issueTrackerUrl = "https://github.com/Tuinity/Moonrise"
showAsResourcePack = false

mods.register("moonrise") {
setConventionsFromProjectMeta(project)
displayName = "Moonrise"
displayUrl = "https://github.com/Tuinity/Moonrise"
authors = "Spottedleaf"
description = "Optimisation mod for the dedicated and integrated server."
logoFile = "assets/moonrise/icon.png"
custom.put(
"ferritecore:disabled_options",
simpleCustomValueList(String, ["replaceNeighborLookup", "replacePropertyMap"])
)

dependencies {
required("neoforge", "[21.5,)")
required("minecraft", "1.21.5")

incompatible("notenoughcrashes")
incompatible("starlight")
incompatible("c2me")
}
}

mixins(
"moonrise.mixins.json",
"moonrise-neoforge.mixins.json"
)

custom.put(
"lithium:options",
simpleCustomValueMap(
String,
Boolean,
[
"mixin.ai.poi": false,
"mixin.alloc.deep_passengers": false,
"mixin.alloc.entity_tracker": false,
"mixin.block.flatten_states": false,
"mixin.chunk.entity_class_groups": false,
"mixin.chunk.no_validation": false,
"mixin.collections.chunk_tickets": false,
"mixin.collections.entity_ticking": false,
"mixin.entity.collisions.intersection": false,
"mixin.entity.collisions.movement": false,
"mixin.entity.collisions.unpushable_cramming": false,
"mixin.entity.replace_entitytype_predicates": false,
"mixin.math.fast_blockpos": false,
"mixin.math.fast_util": false,
"mixin.minimal_nonvanilla.collisions.empty_space": false,
"mixin.minimal_nonvanilla.world.expiring_chunk_tickets": false,
"mixin.shapes.blockstate_cache": false,
"mixin.shapes.optimized_matching": false,
"mixin.shapes.specialized_shapes": false,
"mixin.util.block_tracking": false,
"mixin.util.entity_movement_tracking": false,
"mixin.world.block_entity_ticking": false,
"mixin.world.chunk_access": false,
"mixin.world.explosions.block_raycast": false,
"mixin.world.temperature_cache": false,
"mixin.world.tick_scheduler": false,
]
)
)
}

publishMods {
file = productionJar.archiveFile
modLoaders = ["neoforge"]
Expand Down
84 changes: 0 additions & 84 deletions neoforge/src/main/resources/META-INF/neoforge.mods.toml

This file was deleted.