Skip to content

Commit e5c6480

Browse files
committed
Started 1.21 port
1 parent 91f325f commit e5c6480

File tree

76 files changed

+1087
-1146
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+1087
-1146
lines changed

.gitattributes

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
# Auto detect text files and perform LF normalization
2-
* text=auto
1+
# Disable autocrlf on generated files, they always generate with LF
2+
# Add any extra files or paths here to make git stop saying they
3+
# are changed when only line endings change.
4+
src/generated/**/.cache/cache text eol=lf
5+
src/generated/**/*.json text eol=lf

.github/workflows/build.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout repository
10+
uses: actions/checkout@v4
11+
with:
12+
fetch-depth: 0
13+
fetch-tags: true
14+
15+
- name: Setup JDK 21
16+
uses: actions/setup-java@v4
17+
with:
18+
java-version: '21'
19+
distribution: 'temurin'
20+
21+
- name: Setup Gradle
22+
uses: gradle/actions/setup-gradle@v4
23+
24+
- name: Build with Gradle
25+
run: ./gradlew build

.gitignore

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ build
2020
# other
2121
eclipse
2222
run
23-
libs
24-
/src/main/java/META-INF/MANIFEST.MF
25-
/src/main/META-INF/MANIFEST.MF
26-
/src/main/resources/META-INF/MANIFEST.MF
27-
/mcmodsrepo
23+
runs
24+
run-data
25+
26+
repo

README.md

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
1-
# Dynamic Trees + [![](http://cf.way2muchnoise.eu/versions/478155.svg) ![](http://cf.way2muchnoise.eu/full_478155_downloads.svg)](https://www.curseforge.com/minecraft/mc-mods/dynamictreesplus/)
21

3-
Official extension of [Dynamic Trees](https://github.com/ferreusveritas/DynamicTrees/); expands on the scope of DT by adding dynamic foliage that is not a tree.
2+
Installation information
3+
=======
44

5-
![Logo](./header.png)
5+
This template repository can be directly cloned to get you started with a new
6+
mod. Simply create a new repository cloned from this one, by following the
7+
instructions at [github](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template).
68

7-
This branch is for the 1.19.2 version of Minecraft.
9+
Once you have your clone, simply open the repository in the IDE of your choice. The usual recommendation for an IDE is either IntelliJ IDEA or Eclipse.
810

9-
### Links
10-
- [Downloads](https://www.curseforge.com/minecraft/mc-mods/dynamictreesplus/files)
11-
- [Discord](https://discord.gg/A4FCBS3)
11+
> **Note**: For Eclipse, use tasks in `Launch Group` instead of ones founds in `Java Application`. A preparation task must run before launching the game. NeoGradle uses launch groups to do these subsequently.
1212
13-
### Compiling
14-
* Clone the repository.
15-
* Open a command prompt/terminal to the repository directory.
16-
* Run `gradlew build` on Windows, or `./gradlew build` for MacOS or Linux.
17-
* The built jar file will be in `build/libs/`.
13+
If at any point you are missing libraries in your IDE, or you've run into problems you can
14+
run `gradlew --refresh-dependencies` to refresh the local cache. `gradlew clean` to reset everything
15+
{this does not affect your code} and then start the process again.
16+
17+
Mapping Names:
18+
============
19+
By default, the MDK is configured to use the official mapping names from Mojang for methods and fields
20+
in the Minecraft codebase. These names are covered by a specific license. All modders should be aware of this
21+
license. For the latest license text, refer to the mapping file itself, or the reference copy here:
22+
https://github.com/NeoForged/NeoForm/blob/main/Mojang.md
23+
24+
Additional Resources:
25+
==========
26+
Community Documentation: https://docs.neoforged.net/
27+
NeoForged Discord: https://discord.neoforged.net/

LICENSE renamed to TEMPLATE_LICENSE.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
MIT License
22

3-
Copyright (c) 2021 supermassimo
3+
Copyright (c) 2023 NeoForged project
4+
5+
This license applies to the template files as supplied by github.com/NeoForged/MDK
6+
47

58
Permission is hereby granted, free of charge, to any person obtaining a copy
69
of this software and associated documentation files (the "Software"), to deal

build.gradle

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
plugins {
2+
id 'java-library'
3+
id 'eclipse'
4+
id 'idea'
5+
id 'maven-publish'
6+
id 'net.neoforged.gradle.userdev' version '7.0.170'
7+
id "me.modmuss50.mod-publish-plugin" version "0.8.4"
8+
}
9+
10+
tasks.named('wrapper', Wrapper).configure {
11+
distributionType = Wrapper.DistributionType.BIN
12+
}
13+
14+
version = mod_version
15+
group = mod_group_id
16+
17+
repositories {
18+
mavenLocal()
19+
exclusiveContent {
20+
forRepository {
21+
maven {
22+
url "https://cursemaven.com"
23+
}
24+
}
25+
filter {
26+
includeGroup "curse.maven"
27+
}
28+
}
29+
maven {
30+
url 'https://harleyoconnor.com/maven'
31+
}
32+
flatDir {
33+
dir("libs")
34+
}
35+
}
36+
37+
base {
38+
archivesName = mod_id
39+
}
40+
41+
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
42+
43+
//minecraft.accessTransformers.file rootProject.file('src/main/resources/META-INF/accesstransformer.cfg')
44+
//minecraft.accessTransformers.entry public net.minecraft.client.Minecraft textureManager # textureManager
45+
46+
runs {
47+
48+
configureEach {
49+
systemProperty 'forge.logging.markers', 'REGISTRIES'
50+
51+
systemProperty 'forge.logging.console.level', 'debug'
52+
53+
modSource project.sourceSets.main
54+
}
55+
56+
client {
57+
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
58+
}
59+
60+
server {
61+
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
62+
argument '--nogui'
63+
}
64+
65+
gameTestServer {
66+
systemProperty 'forge.enabledGameTestNamespaces', project.mod_id
67+
}
68+
69+
data {
70+
arguments.addAll(
71+
'--mod', project.mod_id,
72+
'--all',
73+
'--output', file('src/generated/resources/').getAbsolutePath(),
74+
'--existing', file('src/main/resources/').getAbsolutePath(),
75+
"--existing-mod", "dynamictrees")
76+
}
77+
}
78+
79+
sourceSets.main.resources { srcDir 'src/generated/resources' }
80+
81+
configurations {
82+
runtimeClasspath.extendsFrom localRuntime
83+
}
84+
85+
dependencies {
86+
implementation "net.neoforged:neoforge:${neo_version}"
87+
88+
implementation 'curse.maven:dynamictrees-252818:6360173'
89+
90+
runtimeOnly 'curse.maven:jade-324717:6291517'
91+
}
92+
93+
tasks.withType(ProcessResources).configureEach {
94+
var replaceProperties = [
95+
minecraft_version : minecraft_version,
96+
minecraft_version_range: minecraft_version_range,
97+
neo_version : neo_version,
98+
neo_version_range : neo_version_range,
99+
loader_version_range : loader_version_range,
100+
mod_id : mod_id,
101+
mod_name : mod_name,
102+
mod_license : mod_license,
103+
mod_version : mod_version,
104+
mod_authors : mod_authors,
105+
mod_description : mod_description
106+
]
107+
inputs.properties replaceProperties
108+
109+
filesMatching(['META-INF/neoforge.mods.toml']) {
110+
expand replaceProperties
111+
}
112+
}
113+
114+
publishing {
115+
publications {
116+
register('mavenJava', MavenPublication) {
117+
from components.java
118+
}
119+
}
120+
repositories {
121+
maven {
122+
url "file://${project.projectDir}/repo"
123+
}
124+
}
125+
}
126+
127+
tasks.withType(JavaCompile).configureEach {
128+
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
129+
}
130+
131+
idea {
132+
module {
133+
downloadSources = true
134+
downloadJavadoc = true
135+
}
136+
}

0 commit comments

Comments
 (0)