Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: hibiii/Blahaj
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: justliliandev/Blahaj
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.19.x-forge
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 4 commits
  • 27 files changed
  • 1 contributor

Commits on Aug 10, 2022

  1. port to forge 1.19.2

    justliliandev committed Aug 10, 2022

    Verified

    This commit was signed with the committer’s verified signature.
    Steveb-p Paweł Niedzielski
    Copy the full SHA
    c621590 View commit details
  2. Update mods.toml

    justliliandev committed Aug 10, 2022
    Copy the full SHA
    e815c89 View commit details
  3. Copy the full SHA
    668f779 View commit details

Commits on Oct 28, 2022

  1. cuddling without mixins

    justliliandev committed Oct 28, 2022
    Copy the full SHA
    e2c95b9 View commit details
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Disable autocrlf on generated files, they always generate with LF
# Add any extra files or paths here to make git stop saying they
# are changed when only line endings change.
src/generated/**/.cache/cache text eol=lf
src/generated/**/*.json text eol=lf
41 changes: 18 additions & 23 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
# Gradle
.gradle/
build/
out/
classes/

# Quilt Loom
run/

# Eclipse
# eclipse
bin
*.launch
.settings
.metadata
.classpath
.project

# IntelliJ Idea
.idea/
*.iml
# idea
out
*.ipr
*.iws
*.iml
.idea

# Visual Studio Code
.settings/
.vscode/
bin/
.classpath
.project
# gradle
build
.gradle

# Eclipse JDT LS
workspace/
# other
eclipse
run

# macOS
*.DS_Store
# Files from Forge MDK
forge*changelog.txt
203 changes: 140 additions & 63 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,84 +1,161 @@
plugins {
id 'maven-publish'
alias(libs.plugins.quilt.loom)
buildscript {
repositories {
maven { url = 'https://maven.minecraftforge.net' }
maven {
url = 'https://repo.spongepowered.org/repository/maven-public/'
content { includeGroup "org.spongepowered" }
}
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
}
}
apply plugin: 'java'
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'

archivesBaseName = project.archives_base_name
version = project.version
group = project.maven_group
version = "${mod_version}"
group = 'hibi.blahaj' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "${mod_id}-forge"

repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
}
// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
java.toolchain.languageVersion = JavaLanguageVersion.of(17)

// All the dependencies are declared at gradle/libs.version.toml and referenced with "libs.<id>"
// See https://docs.gradle.org/current/userguide/platforms.html for information on how version catalogs work.
dependencies {
minecraft libs.minecraft
mappings loom.layered {
addLayer quiltMappings.mappings("org.quiltmc:quilt-mappings:${libs.versions.quilt.mappings.get()}:v2")
// officialMojangMappings() // Uncomment if you want to use Mojang mappings as your primary mappings, falling back on QM for parameters and Javadocs
}
modImplementation libs.quilt.loader
println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
minecraft {

// QSL is not a complete API; You will need Quilted Fabric API to fill in the gaps.
// Quilted Fabric API will automatically pull in the correct QSL version.
modImplementation libs.quilted.fabric.api
// modImplementation libs.bundles.quilted.fabric.api // If you wish to use Fabric API's deprecated modules, you can replace the above line with this one
}
mappings channel: 'official', version: '1.19.2'
runs {
client {
workingDirectory project.file('run')

processResources {
inputs.property "version", version
property 'forge.logging.markers', 'REGISTRIES'

filesMatching('quilt.mod.json') {
expand "version": version
}
property 'forge.logging.console.level', 'debug'

property 'forge.enabledGameTestNamespaces', 'blahaj'

mods {
blahaj {
source sourceSets.main
}
}
}

server {
workingDirectory project.file('run')

property 'forge.logging.markers', 'REGISTRIES'

property 'forge.logging.console.level', 'debug'

property 'forge.enabledGameTestNamespaces', 'blahaj'

mods {
blahaj {
source sourceSets.main
}
}
}

gameTestServer {
workingDirectory project.file('run')

property 'forge.logging.markers', 'REGISTRIES'

property 'forge.logging.console.level', 'debug'

property 'forge.enabledGameTestNamespaces', 'blahaj'

mods {
blahaj {
source sourceSets.main
}
}
}

data {
workingDirectory project.file('run')

property 'forge.logging.markers', 'REGISTRIES'

property 'forge.logging.console.level', 'debug'

// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
args '--mod', 'blahaj', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')

mods {
blahaj {
source sourceSets.main
}
}
}
}
}

tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 17
// Include resources generated by data generators.
sourceSets.main.resources { srcDir 'src/generated/resources' }

repositories {
// Put repositories for dependencies here
// ForgeGradle automatically adds the Forge maven and Maven Central for you
}

java {
// Still required by IDEs such as Eclipse and Visual Studio Code
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
dependencies {
// Specify the version of Minecraft to use. If this is any group other than 'net.minecraft', it is assumed
// that the dep is a ForgeGradle 'patcher' dependency, and its patches will be applied.
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
minecraft 'net.minecraftforge:forge:1.19.2-43.1.47'

// Real mod deobf dependency examples - these get remapped to your current mappings
// compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // Adds JEI API as a compile dependency
// runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}") // Adds the full JEI mod as a runtime dependency
// implementation fg.deobf("com.tterrag.registrate:Registrate:MC${mc_version}-${registrate_version}") // Adds registrate as a dependency

// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
// Examples using mod jars from ./libs
// implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}")

// If this mod is going to be a library, then it should also generate Javadocs in order to aid with developement.
// Uncomment this line to generate them.
// withJavadocJar()
// For more info...
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html
}

// If you plan to use a different file for the license, don't forget to change the file name here!
// Example for how to get properties into the manifest for reading at runtime.
jar {
from("LICENSE") {
rename { "${it}_${archivesBaseName}" }
}
manifest {
attributes([
"Specification-Title" : "blahaj",
"Specification-Vendor" : "hibi",
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : project.jar.archiveVersion,
"Implementation-Vendor" : "hibi",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}

// Configure the maven publication
// Example configuration to allow publishing using the maven-publish plugin
// This is the preferred method to reobfuscate your jar file
jar.finalizedBy('reobfJar')
// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing
// publish.dependsOn('reobfJar')

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
publications {
mavenJava(MavenPublication) {
artifact jar
}
}
repositories {
maven {
url "file://${project.projectDir}/mcmodsrepo"
}
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
15 changes: 7 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Gradle Properties
org.gradle.jvmargs = -Xmx1G
org.gradle.parallel = true
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

# Mod Properties
version = 0.1.0+1.19
maven_group = hibi
archives_base_name = blahaj
mod_id=blahaj
mod_version = 0.1.2

# Dependencies are managed at gradle/libs.versions.toml
minecraft_version=1.19.2
22 changes: 0 additions & 22 deletions gradle/libs.versions.toml

This file was deleted.

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 6 additions & 0 deletions gradlew
Original file line number Diff line number Diff line change
@@ -205,6 +205,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
14 changes: 8 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@@ -25,7 +25,7 @@
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal
Loading