Skip to content
Open

1.21 #64

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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2.3.1
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: temurin
- uses: actions/cache@v2
with:
Expand Down
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
# Cull Less Leaves
Cull Less Leaves is an improved version of [Cull Leaves](https://www.curseforge.com/minecraft/mc-mods/cull-leaves).

This mod gives you a **9 percent performance improvement**
Cull Less Leaves skips rendering of inner leaf layers, improving performance.

## Performance

In a worst-case scenario, overlooking a mangrove swamp, this mod can
have up to a _**30% performance increase**_ (measured on low-end hardware).

Instead of leaving just the outer layer of leaves, Cull Less Leaves also renders a certain amount
of layers defined in the config.

**[Works best with Sodium](https://modrinth.com/mod/sodium)**

## Why not just use [Cull Leaves](https://www.curseforge.com/minecraft/mc-mods/cull-leaves)?

Cull Leaves only renders the outermost layer of leaves, which can look
quite ugly (see fast culling in image below), but **Cull Leaves improves
performance more than Cull Less Leaves**.

## Comparison

![comparison](https://i.imgur.com/yMUQxMX.png)

[![](https://www.bisecthosting.com/partners/custom-banners/08bbd3ff-5c0d-4480-8738-de0f070a04dd.png)](https://bisecthosting.com/xander)
Expand Down
53 changes: 28 additions & 25 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
plugins {
java

id("fabric-loom") version "1.0.+"
id("io.github.juuxel.loom-quiltflower") version "1.7.+"
id("fabric-loom") version "1.6.+"
//id("io.github.juuxel.loom-vineflower") version "1.11.+"

id("com.modrinth.minotaur") version "2.+"
id("com.modrinth.minotaur") version "2.7.+"
id("com.matthewprenger.cursegradle") version "1.+"
id("com.github.breadmoirai.github-release") version "2.4.+"
`maven-publish`

id("io.github.p03w.machete") version "1.+"
id("io.github.p03w.machete") version "2.+"
}

group = "dev.isxander"
version = "1.0.6"
version = "1.5.0"

repositories {
mavenCentral()
maven("https://api.modrinth.com/maven") {
content {
includeGroup("maven.modrinth")
}
}
maven("https://jitpack.io")
maven("https://maven.isxander.dev/releases")
maven("https://maven.shedaniel.me")
maven("https://maven.terraformersmc.com")
maven("https://maven.flashyreese.me/snapshots")
maven("https://oss.sonatype.org/content/repositories/snapshots")
}

val minecraftVersion: String by project
Expand All @@ -34,24 +39,18 @@ dependencies {

modImplementation("net.fabricmc:fabric-loader:$fabricLoaderVersion")

modImplementation("dev.isxander:yet-another-config-lib:1.5.0")
modImplementation("com.terraformersmc:modmenu:4.0.6")
modImplementation("dev.isxander:yet-another-config-lib:3.5.0+1.21-fabric")
modImplementation("com.terraformersmc:modmenu:11.0.1")

"com.github.llamalad7:mixinextras:0.0.12".let {
"io.github.llamalad7:mixinextras-fabric:0.4.0".let {
implementation(it)
annotationProcessor(it)
include(it)
}

// sodium compat
modImplementation("me.jellysquid.mods:sodium-fabric:0.4.4+build.+")

// more culling compat
modImplementation("com.github.fxmorin.MoreCulling:moreculling:v0.10.0")
"com.github.Fallen-Breath:conditional-mixin:v0.3.0".let {
modImplementation(it)
include(it)
}
modImplementation("maven.modrinth:sodium:mc1.21-0.5.11")
modRuntimeOnly("net.fabricmc.fabric-api:fabric-api:0.100.6+1.21")
}

java {
Expand Down Expand Up @@ -105,15 +104,17 @@ if (modrinthId.isNotEmpty()) {
versionNumber.set("${project.version}")
versionType.set("release")
uploadFile.set(tasks["remapJar"])
gameVersions.set(listOf("1.19", "1.19.1", "1.19.2"))
gameVersions.set(listOf("1.20.6"))
loaders.set(listOf("fabric", "quilt"))
changelog.set(changelogText)
syncBodyFrom.set(file("README.md").readText())
dependencies {
required.project("cloth-config")
required.project("yacl")
optional.project("modmenu")
}
}

tasks.getByName("modrinth").dependsOn("optimizeOutputsOfRemapJar")
}

val curseforgeId: String by project
Expand All @@ -127,15 +128,13 @@ if (hasProperty("curseforge.token") && curseforgeId.isNotEmpty()) {

id = curseforgeId
releaseType = "release"
addGameVersion("1.19")
addGameVersion("1.19.1")
addGameVersion("1.19.2")
addGameVersion("1.21")
addGameVersion("Fabric")
addGameVersion("Quilt")
addGameVersion("Java 17")
addGameVersion("Java 21")

relations(closureOf<com.matthewprenger.cursegradle.CurseRelation> {
requiredDependency("cloth-config")
requiredDependency("yacl")
optionalDependency("modmenu")
})

Expand All @@ -157,11 +156,13 @@ githubRelease {
owner(split[0])
repo(split[1])
tagName("${project.version}")
targetCommitish("1.19")
targetCommitish("1.21")
body(changelogText)
releaseAssets(tasks["remapJar"].outputs.files)
}

tasks.getByName("githubRelease").dependsOn("optimizeOutputsOfRemapJar")

publishing {
publications {
create<MavenPublication>("mod") {
Expand All @@ -170,6 +171,8 @@ publishing {

from(components["java"])
}

tasks.getByName("generateMetadataFileForModPublication").dependsOn("optimizeOutputsOfRemapJar")
}

repositories {
Expand Down
3 changes: 3 additions & 0 deletions changelogs/1.3.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Support Sodium 0.5
- Add face rejection to increase performance
- Add mangrove roots culling
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
org.gradle.jvmargs=-Xmx2G

minecraftVersion=1.19.2
fabricLoaderVersion=0.14.+
minecraftVersion=1.21
fabricLoaderVersion=0.15.11

modId=cull-less-leaves
modName=Cull Less Leaves
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
41 changes: 28 additions & 13 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 19 additions & 16 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading