Compare commits

..

2 Commits

Author SHA1 Message Date
Spottedleaf
292d3ca982 Set version to 0.3.0-beta.2 2025-06-09 02:25:32 -07:00
Spottedleaf
25ce72434f Fix infinite loop in RegionFile IO
If an exception is thrown during decompress then the read process
would be started again, which of course would eventually throw in
the decompress process.
2025-06-09 02:23:45 -07:00
7 changed files with 187 additions and 141 deletions

View File

@@ -4,7 +4,6 @@ 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)

View File

@@ -1,11 +1,9 @@
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 {
@@ -33,6 +31,19 @@ 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")
@@ -42,72 +53,6 @@ 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"]

View File

@@ -0,0 +1,76 @@
{
"schemaVersion": 1,
"id": "moonrise",
"version": "${version}",
"name": "Moonrise",
"description": "Optimisation mod for the dedicated and integrated server.",
"authors": [
"Spottedleaf"
],
"contact": {
"issues": "https://github.com/Tuinity/Moonrise/issues",
"sources": "https://github.com/Tuinity/Moonrise",
"discord": "https://discord.gg/tuinity",
"homepage": "https://www.curseforge.com/minecraft/mc-mods/moonrise"
},
"breaks": {
"notenoughcrashes": "*",
"starlight": "*",
"c2me": "*"
},
"license": "GPL-3.0-only",
"icon": "assets/moonrise/icon.png",
"environment": "*",
"entrypoints": {
"modmenu": [
"ca.spottedleaf.moonrise.fabric.MoonriseModMenuHook"
],
"client": [
"ca.spottedleaf.moonrise.fabric.MoonriseFabricClient"
]
},
"mixins": [
"moonrise.mixins.json",
"moonrise-fabric.mixins.json"
],
"accessWidener": "moonrise.accesswidener",
"depends": {
"fabricloader": ">=${loader_version}",
"minecraft": ">1.21.4 <1.21.6",
"fabric-command-api-v2": "*"
},
"custom": {
"lithium:options": {
"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
},
"ferritecore:disabled_options": [
"replaceNeighborLookup",
"replacePropertyMap"
]
}
}

View File

@@ -21,6 +21,6 @@ junit_version=5.11.3
fabric_lithium_version=nhc57Td2
neo_lithium_version=P5VT33Jo
# Mod Properties
mod_version=0.3.0-SNAPSHOT
mod_version=0.3.0-beta.2
maven_group=ca.spottedleaf.moonrise
archives_base_name=moonrise

View File

@@ -5,7 +5,6 @@ import net.neoforged.moddevgradle.internal.RunGameTask
plugins {
id("net.neoforged.moddev")
id 'maven-publish'
id 'xyz.jpenilla.resource-factory-neoforge-convention'
}
repositories {
@@ -58,6 +57,18 @@ 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"
}
@@ -83,75 +94,6 @@ 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"]

View File

@@ -0,0 +1,84 @@
modLoader = "javafml"
loaderVersion = "[1,)"
license = "GPLv3"
issueTrackerURL = "https://github.com/Tuinity/Moonrise"
showAsResourcePack = false
logoFile = "assets/moonrise/icon.png"
[[mods]]
modId = "moonrise"
version = "${version}"
displayName = "Moonrise"
displayURL = "https://github.com/Tuinity/Moonrise"
authors = "Spottedleaf"
description = "Optimisation mod for the dedicated and integrated server."
displayTest = "IGNORE_ALL_VERSION"
"ferritecore:disabled_options" = [
"replaceNeighborLookup",
"replacePropertyMap"
]
[[dependencies.moonrise]]
modId = "neoforge"
type = "required"
versionRange = "[21.0,)"
ordering = "NONE"
side = "BOTH"
[[dependencies.moonrise]]
modId = "minecraft"
type = "required"
versionRange = "(1.21.4,1.21.6)"
ordering = "NONE"
side = "BOTH"
[[dependencies.moonrise]]
modId = "notenoughcrashes"
type = "incompatible"
[[dependencies.moonrise]]
modId = "starlight"
type = "incompatible"
[[dependencies.moonrise]]
# unofficial lithium port
modId = "canary"
type = "incompatible"
[[dependencies.moonrise]]
modId = "c2me"
type = "incompatible"
[[mixins]]
config = "moonrise.mixins.json"
[[mixins]]
config = "moonrise-neoforge.mixins.json"
["lithium:options"]
"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

View File

@@ -1143,7 +1143,7 @@ public final class MoonriseRegionFileIO {
LOGGER.error("Failed to decompress chunk data for task: " + this.toString(), thr);
}
if (compoundTag == null) {
if (throwable == null && compoundTag == null) {
// need to re-try from the start
this.scheduleReadIO();
return;