Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 13 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

Minecraft mod written in Java using the Minecraft Forge API.

> [!WARNING]
> **Disclaimer:** This NeoForge 1.21.1 port was developed and debugged with the assistance of an AI agent. While critical crashes have been fixed and basic functionality verified, it has **not** been thoroughly tested across all edge cases. Proceed with caution on production servers.

## ⚠️ Requirements for 1.21.1 Port
This branch has been specifically updated, refactored, and stabilized for **NeoForge 1.21.1**.
*(Note: This port will **NOT** work on `1.21.2+` or `1.21.4` due to major core API and Data Component changes introduced by Mojang in newer versions)*

To run this version of Cyclic, you **MUST** install the corresponding updated version of the `flib` library.
* **NeoForge Version:** `21.1.115` or newer
* **Required Library:** [`flib` (zevatov/FLib)](https://github.com/zevatov/FLib/tree/trunk/1.21) - Ensure you are using the 1.21.1 compatible build (e.g., `v0.0.12` or newer).

For detailed technical information on the bug fixes, networking `StreamCodec` updates, fluid rendering fixes, and registry refactoring implemented in this NeoForge 1.21.1 port, please see [porting_summary.md](../porting_summary.md).

[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
[![Twitter Badge](https://img.shields.io/badge/contact-twitter-blue.svg)](https://twitter.com/lothrazar)
[![Support](https://img.shields.io/badge/Patreon-Support-orange.svg?logo=Patreon)](https://www.patreon.com/Lothrazar)
Expand Down
93 changes: 93 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"request": "launch",
"name": "Client",
"presentation": {
"group": "Mod Development - Cyclic_Port_Test",
"order": 0
},
"projectName": "Cyclic_Port_Test",
"mainClass": "net.neoforged.devlaunch.Main",
"args": [
"@/Users/stanislav/Desktop/майн/Cyclic_Port_Test/build/moddev/clientRunProgramArgs.txt"
],
"vmArgs": [
"@/Users/stanislav/Desktop/майн/Cyclic_Port_Test/build/moddev/clientRunVmArgs.txt",
"-Dfml.modFolders\u003dcyclic%%/Users/stanislav/Desktop/майн/Cyclic_Port_Test/bin/main"
],
"cwd": "${workspaceFolder}/run",
"env": {},
"console": "internalConsole",
"shortenCommandLine": "none"
},
{
"type": "java",
"request": "launch",
"name": "Data",
"presentation": {
"group": "Mod Development - Cyclic_Port_Test",
"order": 1
},
"projectName": "Cyclic_Port_Test",
"mainClass": "net.neoforged.devlaunch.Main",
"args": [
"@/Users/stanislav/Desktop/майн/Cyclic_Port_Test/build/moddev/dataRunProgramArgs.txt"
],
"vmArgs": [
"@/Users/stanislav/Desktop/майн/Cyclic_Port_Test/build/moddev/dataRunVmArgs.txt",
"-Dfml.modFolders\u003dcyclic%%/Users/stanislav/Desktop/майн/Cyclic_Port_Test/bin/main"
],
"cwd": "${workspaceFolder}/run",
"env": {},
"console": "internalConsole",
"shortenCommandLine": "none"
},
{
"type": "java",
"request": "launch",
"name": "GameTestServer",
"presentation": {
"group": "Mod Development - Cyclic_Port_Test",
"order": 2
},
"projectName": "Cyclic_Port_Test",
"mainClass": "net.neoforged.devlaunch.Main",
"args": [
"@/Users/stanislav/Desktop/майн/Cyclic_Port_Test/build/moddev/gameTestServerRunProgramArgs.txt"
],
"vmArgs": [
"@/Users/stanislav/Desktop/майн/Cyclic_Port_Test/build/moddev/gameTestServerRunVmArgs.txt",
"-Dfml.modFolders\u003dcyclic%%/Users/stanislav/Desktop/майн/Cyclic_Port_Test/bin/main"
],
"cwd": "${workspaceFolder}/run",
"env": {},
"console": "internalConsole",
"shortenCommandLine": "none"
},
{
"type": "java",
"request": "launch",
"name": "Server",
"presentation": {
"group": "Mod Development - Cyclic_Port_Test",
"order": 3
},
"projectName": "Cyclic_Port_Test",
"mainClass": "net.neoforged.devlaunch.Main",
"args": [
"@/Users/stanislav/Desktop/майн/Cyclic_Port_Test/build/moddev/serverRunProgramArgs.txt"
],
"vmArgs": [
"@/Users/stanislav/Desktop/майн/Cyclic_Port_Test/build/moddev/serverRunVmArgs.txt",
"-Dfml.modFolders\u003dcyclic%%/Users/stanislav/Desktop/майн/Cyclic_Port_Test/bin/main"
],
"cwd": "${workspaceFolder}/run",
"env": {},
"console": "internalConsole",
"shortenCommandLine": "none"
}
]
}
224 changes: 224 additions & 0 deletions build 2.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
plugins {
id 'java-library'
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'net.neoforged.moddev' version '2.0.76'
}

version = "${mc_version}-${mod_version}"
group = mod_group_id
base {
archivesName = mod_id
}



// Mojang ships Java 21 to end users starting in 1.20.5, so mods should target Java 21.
java.toolchain.languageVersion = JavaLanguageVersion.of(21)

//minecraft.accessTransformers.file rootProject.file('src/main/resources/META-INF/accesstransformer.cfg')
neoForge {
// Specify the version of NeoForge to use.
version = project.neo_version



runs {
client {
client()

// Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
}

server {
server()
programArgument '--nogui'
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
}

// This run config launches GameTestServer and runs all registered gametests, then exits.
// By default, the server will crash when no gametests are provided.
// The gametest system is also enabled by default for other run configs under the /test command.
gameTestServer {
type = "gameTestServer"
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
}

data {
data()

// example of overriding the workingDirectory set in configureEach above, uncomment if you want to use it
// gameDirectory = project.file('run-data')

// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
}

// applies to all the run configs above
configureEach {
// Recommended logging data for a userdev environment
// The markers can be added/remove as needed separated by commas.
// "SCAN": For mods scan.
// "REGISTRIES": For firing of registry events.
// "REGISTRYDUMP": For getting the contents of all registries.
systemProperty 'forge.logging.markers', 'REGISTRIES'

// Recommended logging level for the console
// You can set various levels here.
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
logLevel = org.slf4j.event.Level.DEBUG
}
}

mods {
// define mod <-> source bindings
// these are used to tell the game which sources are for which mod
// mostly optional in a single mod project
// but multi mod projects should define one per mod
"${mod_id}" {
sourceSet(sourceSets.main)
}
}

}
// Include resources generated by data generators.
sourceSets.main.resources { srcDir 'src/generated/resources' }

// Sets up a dependency configuration called 'localRuntime'.
// This configuration should be used instead of 'runtimeOnly' to declare
// a dependency that will be present for runtime testing but that is
// "optional", meaning it will not be pulled by dependents of this mod.
configurations {
runtimeClasspath.extendsFrom localRuntime
}

repositories {
mavenLocal()

flatDir { dir 'libs' }

maven { url = 'https://maven.blamejared.com' }
maven { url = 'https://modmaven.dev' }

// maven {
// name = "OctoStudios - curios continuation"
// url = uri("https://maven.octo-studios.com/#/releases")
// }
maven { url = 'https://dvs1.progwml6.com/files/maven/' }
maven { url = 'https://www.cursemaven.com' }
}


dependencies {


implementation "com.lothrazar.flib:flib_Port_Test:0.0.12"

// implementation fg.deobf("curse.maven:flib-661261:${flib_file}")


// implementation "net.neoforged:neoforge:${neo_version}"
// Example optional mod dependency with JEI
// The JEI API is declared for compile time use, while the full JEI artifact is used at runtime
compileOnly "mezz.jei:jei-${mc_version}-common-api:${jei_version}"
compileOnly "mezz.jei:jei-${mc_version}-neoforge-api:${jei_version}"
localRuntime "mezz.jei:jei-${mc_version}-neoforge:${jei_version}"


implementation "com.blamejared.crafttweaker:CraftTweaker-neoforge-${mc_version}:${crafttweaker_version}"

// We add the full version to localRuntime, not runtimeOnly, so that we do not publish a dependency on it
// localRuntime "mezz.jei:jei-${mc_version}-neoforge:${jei_version}"

// compileOnly "top.theillusivec4.curios:curios-neoforge:${curios_version}"
// localRuntime "top.theillusivec4.curios:curios-neoforge:${curios_version}"

compileOnly "vazkii.patchouli:Patchouli:${patchouli_version}"
localRuntime "vazkii.patchouli:Patchouli:${patchouli_version}"
// Example mod dependency using a mod jar from ./libs with a flat dir repository
// This maps to ./libs/coolmod-${mc_version}-${coolmod_version}.jar
// The group id is ignored when searching -- in this case, it is "blank"
// implementation "blank:coolmod-${mc_version}:${coolmod_version}"

// Example mod dependency using a file as dependency
// implementation files("libs/coolmod-${mc_version}-${coolmod_version}.jar")

// Example project dependency using a sister or child project:
// implementation project(":myproject")

// For more info:
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html
}
tasks.named('jar', Jar).configure {
manifest {
attributes([
'Specification-Title' : mod_id,
'Specification-Vendor' : "Lothrazar",
'Specification-Version' : '1', // We are version 1 of ourselves
'Implementation-Title' : project.name,
'Implementation-Version' : project.jar.archiveVersion,
'Implementation-Vendor' : "Lothrazar",
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
// This block of code expands all declared replace properties in the specified resource targets.
// A missing property will result in an error. Properties are expanded using ${} Groovy notation.
// When "copyIdeResources" is enabled, this will also run before the game launches in IDE environments.
// See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html
tasks.withType(ProcessResources).configureEach {
var replaceProperties = [
minecraft_version : mc_version,
neo_version : neo_version,
mod_id : mod_id,
mod_name : mod_name,
mod_version : mod_version
]
inputs.properties replaceProperties

filesMatching(['META-INF/neoforge.mods.toml']) {
expand replaceProperties
}
}

// Example configuration to allow publishing using the maven-publish plugin
publishing {
publications {
register('mavenJava', MavenPublication) {
from components.java
}
}
repositories {
maven {
url "file://${project.projectDir}/repo"
}
}
}
//
//task signJar(type: net.neoforged.gradle.common.tasks.PotentiallySignJar, dependsOn: jar) {
// keyStore = project.findProperty('keyStore')
// alias = project.findProperty('keyStoreAlias')
// storePass = project.findProperty('keyStorePass')
// keyPass = project.findProperty('keyStoreKeyPass')
// input = jar.archivePath
// output = jar.archivePath
//}

task cleanJar {
delete 'build/libs'
}

tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}

// IDEA no longer automatically downloads sources/javadoc jars for dependencies, so we need to explicitly enable the behavior.
idea {
module {
downloadSources = true
downloadJavadoc = true
}
}
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ repositories {
maven { url = 'https://maven.blamejared.com' }
maven { url = 'https://modmaven.dev' }

// maven {
// name = "OctoStudios - curios continuation"
// url = uri("https://maven.octo-studios.com/#/releases")
// }
maven {
name = "OctoStudios - curios continuation"
url = uri("https://maven.octo-studios.com/releases")
}
maven { url = 'https://dvs1.progwml6.com/files/maven/' }
maven { url = 'https://www.cursemaven.com' }
}
Expand All @@ -114,7 +114,7 @@ repositories {
dependencies {


implementation "blank:flib-1.21.1:${flib_version}"
implementation "com.lothrazar.flib:flib_Port_Test:0.0.12"

// implementation fg.deobf("curse.maven:flib-661261:${flib_file}")

Expand All @@ -132,8 +132,8 @@ dependencies {
// We add the full version to localRuntime, not runtimeOnly, so that we do not publish a dependency on it
// localRuntime "mezz.jei:jei-${mc_version}-neoforge:${jei_version}"

// compileOnly "top.theillusivec4.curios:curios-neoforge:${curios_version}"
// localRuntime "top.theillusivec4.curios:curios-neoforge:${curios_version}"
compileOnly "top.theillusivec4.curios:curios-neoforge:${curios_version}"
localRuntime "top.theillusivec4.curios:curios-neoforge:${curios_version}"

compileOnly "vazkii.patchouli:Patchouli:${patchouli_version}"
localRuntime "vazkii.patchouli:Patchouli:${patchouli_version}"
Expand Down
Loading
Loading