Skip to content
This repository was archived by the owner on Oct 25, 2025. It is now read-only.

Commit dd50707

Browse files
committed
first commit
0 parents  commit dd50707

33 files changed

+1581
-0
lines changed

.gitignore

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Gradle
2+
.gradle/
3+
build/
4+
out/
5+
classes/
6+
7+
# IDEA
8+
.idea/
9+
*.iml
10+
*.ipr
11+
*.iws
12+
13+
# Eclipse
14+
.settings/
15+
.metadata/
16+
.classpath
17+
.project
18+
bin/
19+
20+
# VSCode
21+
.vscode/
22+
23+
# macOS
24+
.DS_Store
25+
26+
# Run directory
27+
run/
28+
29+
# Misc
30+
*.log
31+
*.swp
32+
*.swo
33+
*~
34+
.cache/
35+
36+
# Minecraft/Forge
37+
logs/
38+
crash-reports/
39+
screenshots/
40+
saves/
41+
resourcepacks/
42+
shaderpacks/
43+
.mixin.out/
44+
options.txt
45+
servers.dat
46+
usercache.json
47+
usernamecache.json
48+
49+
# CleanroomLoader
50+
# Note: libs/celeritas-forge-mc12.2-*.jar should be committed as a dependency
51+
*.jar.cache
52+
53+
# Config files (generated at runtime)
54+
/config/*.json
55+
56+
# Debug/Crash logs
57+
debug.log
58+
crash-*.txt
59+
hs_err_*.log
60+
61+
# Gradle wrapper jar is committed
62+
!gradle/wrapper/gradle-wrapper.jar

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 kappa-maintainer
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Celeritas Leaf Culling
2+
3+
A version of yor42's CullLessLeaves Legacy that has been migrated to CleanroomModTemplate and integrated with Celeritas GUI.
4+
5+
I'm too nervous to submit a pull request, but I hope to do so someday.
6+
7+
### Description
8+
9+
Celeritas Leaf Culling is a mod that improves performance by hiding the inner faces of leaf blocks.
10+
11+
You can toggle ON/OFF and select from 4 presets (FAST, BALANCED, FANCY, CUSTOM) in the Celeritas GUI.
12+
13+
#### Presets
14+
- **FAST**: Maximum performance, slightly lower visual quality
15+
- **BALANCED**: Good balance of performance and quality (default)
16+
- **FANCY**: Best visual quality, slight performance impact
17+
- **CUSTOM**: Manually adjust depth and random rejection settings
18+
19+
### Requirements
20+
- CleanroomLoader
21+
- Celeritas
22+
23+
### License
24+
25+
LGPL-3.0 - See LICENSE.md for details
26+
27+
### Credits
28+
29+
- **isXander** - Author of the original CullLessLeaves mod
30+
- **yor42** - Author of CullLessLeaves Legacy (I'm really scared to submit a PR, it looks like plagiarism but please forgive me)
31+
- **s12kuma01** - Migration to CleanroomModTemplate and Celeritas GUI integration

build.gradle

Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
plugins {
2+
id 'java'
3+
id 'java-library'
4+
id 'maven-publish'
5+
id 'com.gradleup.shadow' version '9.0.2'
6+
id 'xyz.wagyourtail.unimined' version '1.4.1'
7+
id 'net.kyori.blossom' version '2.1.0'
8+
}
9+
10+
apply from: 'gradle/scripts/helpers.gradle'
11+
12+
// Early Assertions
13+
assertProperty 'mod_version'
14+
assertProperty 'root_package'
15+
assertProperty 'mod_id'
16+
assertProperty 'mod_name'
17+
18+
assertSubProperties 'use_access_transformer', 'access_transformer_locations'
19+
assertSubProperties 'is_coremod', 'coremod_includes_mod', 'coremod_plugin_class_name'
20+
assertSubProperties 'use_asset_mover', 'asset_mover_version'
21+
22+
setDefaultProperty 'generate_sources_jar', true, false
23+
setDefaultProperty 'generate_javadocs_jar', true, false
24+
setDefaultProperty 'minecraft_username', true, 'Developer'
25+
setDefaultProperty 'extra_jvm_args', false, ''
26+
27+
version = propertyString('mod_version')
28+
group = propertyString('root_package')
29+
30+
base {
31+
archivesName.set(propertyString('mod_id'))
32+
}
33+
34+
35+
java {
36+
toolchain {
37+
languageVersion.set(JavaLanguageVersion.of(21))
38+
}
39+
if (propertyBool('generate_sources_jar')) {
40+
withSourcesJar()
41+
}
42+
if (propertyBool('generate_javadocs_jar')) {
43+
withJavadocJar()
44+
}
45+
}
46+
47+
configurations {
48+
embed
49+
contain
50+
implementation.extendsFrom(embed)
51+
implementation.extendsFrom(contain)
52+
modCompileOnly
53+
compileOnly.extendsFrom(modCompileOnly)
54+
modRuntimeOnly
55+
runtimeOnly.extendsFrom(modRuntimeOnly)
56+
}
57+
58+
unimined.minecraft {
59+
version "1.12.2"
60+
61+
mappings {
62+
mcp("stable", "39-1.12")
63+
}
64+
65+
cleanroom {
66+
if (propertyBool('use_access_transformer')) {
67+
accessTransformer "${rootProject.projectDir}/src/main/resources/" + propertyString('access_transformer_locations')
68+
}
69+
loader "0.3.13-alpha"
70+
runs.auth.username = minecraft_username
71+
runs.all {
72+
var map = getSystemProperties()
73+
map.put("cleanroom.dev.mixin", "${mod_id}.default.mixin.json,${mod_id}.mod.mixin.json")
74+
def extraArgs = propertyString('extra_jvm_args')
75+
if (extraArgs != null && !extraArgs.trim().isEmpty()) {
76+
jvmArgs += extraArgs.split("\\s+").toList()
77+
}
78+
if (propertyBool('enable_foundation_debug')) {
79+
map.put("foundation.dump", "true")
80+
map.put("foundation.verbose", "true")
81+
}
82+
return
83+
}
84+
}
85+
86+
defaultRemapJar = false
87+
88+
if (propertyBool('enable_shadow')) {
89+
remap(tasks.shadowJar) {
90+
mixinRemap {
91+
enableBaseMixin()
92+
enableMixinExtra()
93+
disableRefmap()
94+
}
95+
}
96+
} else {
97+
remap(tasks.jar) {
98+
mixinRemap {
99+
enableBaseMixin()
100+
enableMixinExtra()
101+
disableRefmap()
102+
}
103+
}
104+
}
105+
106+
mods {
107+
remap(configurations.modCompileOnly)
108+
}
109+
}
110+
111+
dependencies {
112+
if (propertyBool('use_asset_mover')) {
113+
implementation "com.cleanroommc:assetmover:${propertyString('asset_mover_version')}"
114+
}
115+
if (propertyBool('enable_junit_testing')) {
116+
testImplementation 'org.junit.jupiter:junit-jupiter:5.7.1'
117+
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
118+
}
119+
}
120+
121+
apply from: 'gradle/scripts/dependencies.gradle'
122+
123+
processResources {
124+
125+
inputs.property 'mod_id', propertyString('mod_id')
126+
inputs.property 'mod_name', propertyString('mod_name')
127+
inputs.property 'mod_version', propertyString('mod_version')
128+
inputs.property 'mod_description', propertyString('mod_description')
129+
inputs.property 'mod_authors', "${propertyStringList('mod_authors', ',').join(', ')}"
130+
inputs.property 'mod_credits', propertyString('mod_credits')
131+
inputs.property 'mod_url', propertyString('mod_url')
132+
inputs.property 'mod_update_json', propertyString('mod_update_json')
133+
inputs.property 'mod_logo_path', propertyString('mod_logo_path')
134+
135+
def filterList = ['mcmod.info', 'pack.mcmeta']
136+
137+
filesMatching(filterList) { fcd ->
138+
fcd.expand(
139+
'mod_id': propertyString('mod_id'),
140+
'mod_name': propertyString('mod_name'),
141+
'mod_version': propertyString('mod_version'),
142+
'mod_description': propertyString('mod_description'),
143+
'mod_authors': "${propertyStringList('mod_authors', ',').join(', ')}",
144+
'mod_credits': propertyString('mod_credits'),
145+
'mod_url': propertyString('mod_url'),
146+
'mod_update_json': propertyString('mod_update_json'),
147+
'mod_logo_path': propertyString('mod_logo_path'),
148+
)
149+
}
150+
151+
rename '(.+_at.cfg)', 'META-INF/$1'
152+
}
153+
154+
sourceSets {
155+
main {
156+
blossom {
157+
javaSources {
158+
property('mod_id', propertyString('mod_id'))
159+
property('mod_name', propertyString('mod_name'))
160+
property('mod_version', propertyString('mod_version'))
161+
property('package', "${root_package}.${mod_id}")
162+
}
163+
}
164+
}
165+
}
166+
167+
if (!propertyBool('enable_shadow')) {
168+
shadowJar.enabled = false
169+
}
170+
171+
jar {
172+
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
173+
if (configurations.contain.size() > 0) {
174+
into('/') {
175+
from configurations.contain
176+
}
177+
}
178+
doFirst {
179+
manifest {
180+
def attribute_map = [:]
181+
attribute_map['ModType'] = "CRL"
182+
attribute_map['MixinConfigs'] = "${mod_id}.default.mixin.json,${mod_id}.mod.mixin.json"
183+
if (configurations.contain.size() > 0) {
184+
attribute_map['ContainedDeps'] = configurations.contain.collect { it.name }.join(' ')
185+
attribute_map['NonModDeps'] = true
186+
}
187+
if (propertyBool('is_coremod')) {
188+
attribute_map['FMLCorePlugin'] = propertyString('coremod_plugin_class_name')
189+
if (propertyBool('coremod_includes_mod')) {
190+
attribute_map['FMLCorePluginContainsFMLMod'] = true
191+
}
192+
}
193+
if (propertyBool('use_access_transformer')) {
194+
attribute_map['FMLAT'] = propertyString('access_transformer_locations')
195+
}
196+
attributes(attribute_map)
197+
}
198+
}
199+
if (propertyBool('enable_shadow')) {
200+
finalizedBy(tasks.named("remapShadowJar"))
201+
} else {
202+
finalizedBy(tasks.named("remapJar"))
203+
}
204+
}
205+
206+
207+
shadowJar {
208+
configurations = [project.configurations.shadow]
209+
archiveClassifier = "shadow"
210+
}
211+
212+
remapJar {
213+
doFirst {
214+
logging.captureStandardOutput LogLevel.INFO
215+
}
216+
doLast {
217+
logging.captureStandardOutput LogLevel.QUIET
218+
}
219+
}
220+
221+
compileTestJava {
222+
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_21
223+
}
224+
225+
test {
226+
useJUnitPlatform()
227+
javaLauncher.set(javaToolchains.launcherFor {
228+
languageVersion = JavaLanguageVersion.of(21)
229+
})
230+
if (propertyBool('show_testing_output')) {
231+
testLogging {
232+
showStandardStreams = true
233+
}
234+
}
235+
}
236+
237+
tasks.withType(JavaCompile).configureEach {
238+
options.encoding = 'UTF-8'
239+
}
240+
241+
apply from: 'gradle/scripts/publishing.gradle'
242+
apply from: 'gradle/scripts/extra.gradle'

0 commit comments

Comments
 (0)