Merge branch '1.18/dev' into 1.19/dev

# Conflicts:
#	build.gradle
#	gradle.properties
#	src/main/java/com/jozufozu/flywheel/backend/Loader.java
#	src/main/java/com/jozufozu/flywheel/core/source/ShaderSources.java
This commit is contained in:
Jozufozu 2022-07-16 21:43:00 -04:00
commit be78f92df6
95 changed files with 51 additions and 53 deletions

View file

@ -11,10 +11,10 @@ buildscript {
classpath "org.parchmentmc:librarian:${librarian_version}"
}
}
plugins {
id 'com.matthewprenger.cursegradle' version "${cursegradle_version}"
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'org.parchmentmc.librarian.forgegradle'
apply plugin: 'eclipse'
@ -24,11 +24,10 @@ apply plugin: 'org.spongepowered.mixin'
boolean dev = System.getenv('RELEASE') == null || System.getenv('RELEASE').equalsIgnoreCase('false');
ext.buildNumber = System.getenv('BUILD_NUMBER')
if (buildNumber == null) buildNumber = 'custom'
version = "${mc_update_version}-${mod_version}" + (dev ? ".${buildNumber}" : '')
group = 'com.jozufozu.flywheel'
archivesBaseName = 'flywheel-forge'
archivesBaseName = "flywheel-forge-${artifact_minecraft_version}"
version = mod_version + (dev && buildNumber != null ? "-${buildNumber}" : '')
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
@ -89,10 +88,6 @@ minecraft {
}
}
mixin {
add sourceSets.main, 'flywheel.refmap.json'
}
repositories {
maven {
url 'https://www.cursemaven.com'
@ -130,23 +125,18 @@ dependencies {
}
}
// Example for how to get properties into the manifest for reading by the runtime..
jar {
manifest {
attributes([
'Specification-Title' : 'flywheel',
//'Specification-Vendor': 'flywheel authors',
'Specification-Version' : '1', // We are version 1 of ourselves
'Implementation-Title' : project.name,
'Implementation-Version' : project.version,
//'Implementation-Vendor': 'flywheel authors',
'MixinConfigs' : 'flywheel.mixins.json',
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
mixin {
add sourceSets.main, 'flywheel.refmap.json'
}
jar.finalizedBy('reobfJar')
// Workaround for SpongePowered/MixinGradle#38
afterEvaluate {
tasks.configureReobfTaskForReobfJar.mustRunAfter(tasks.compileJava)
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
javadoc {
source = [sourceSets.main.allJava]
@ -154,29 +144,42 @@ javadoc {
options.addStringOption('Xdoclint:none', '-quiet')
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
archiveBaseName.set(project.archivesBaseName)
archiveVersion.set("${project.version}")
archiveClassifier.set('sources')
jar {
manifest {
attributes([
'Specification-Title' : 'flywheel',
//'Specification-Vendor': 'flywheel authors',
'Specification-Version' : '1', // We are version 1 of ourselves
'Implementation-Title' : project.jar.baseName,
'Implementation-Version' : project.jar.archiveVersion,
//'Implementation-Vendor': 'flywheel authors',
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
'MixinConfigs' : 'flywheel.mixins.json'
])
}
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
archiveClassifier.set('javadoc')
java {
withSourcesJar()
withJavadocJar()
}
artifacts {
archives jar, sourcesJar, javadocJar
void addLicense(jarTask) {
jarTask.from('LICENSE.md') {
rename '(.*)\\.(.*)', '$1_' + archivesBaseName + '.$2'
}
}
jar.finalizedBy('reobfJar')
addLicense(jar)
publishing {
tasks.publish.dependsOn 'build'
publications {
mavenJava(MavenPublication) {
artifact jar
artifact sourcesJar
artifact javadocJar
artifactId = archivesBaseName
from components.java
fg.component(it)
}
}

View file

@ -3,7 +3,8 @@ org.gradle.daemon = false
# mod version info
mod_version = 0.6.4
mc_update_version = 1.19
artifact_minecraft_version = 1.19
minecraft_version = 1.19
forge_version = 41.0.94

Binary file not shown.

View file

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

10
gradlew vendored
View file

@ -1,7 +1,7 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -32,10 +32,10 @@
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#

View file

@ -7,8 +7,8 @@ import org.slf4j.Logger;
import com.jozufozu.flywheel.api.FlywheelWorld;
import com.jozufozu.flywheel.backend.gl.versioned.GlCompat;
import com.jozufozu.flywheel.backend.instancing.ParallelTaskEngine;
import com.jozufozu.flywheel.config.FlwConfig;
import com.jozufozu.flywheel.config.BackendType;
import com.jozufozu.flywheel.config.FlwConfig;
import com.jozufozu.flywheel.core.shader.ProgramSpec;
import com.mojang.logging.LogUtils;

View file

@ -43,7 +43,7 @@ public class ShaderSources implements SourceFinder {
ResourceLocation name = ResourceUtil.removePrefixUnchecked(location, SHADER_DIR);
shaderSources.put(name, new SourceFile(this, name, source));
} catch (IOException e) {
} catch (IOException ignored) {
}
});

View file

@ -1,14 +1,11 @@
package com.jozufozu.flywheel.core.vertex;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import org.lwjgl.system.MemoryUtil;
import com.jozufozu.flywheel.api.vertex.ShadedVertexList;
import com.jozufozu.flywheel.api.vertex.VertexList;
import com.jozufozu.flywheel.util.RenderMath;
import com.mojang.blaze3d.platform.MemoryTracker;
public class BlockVertexListUnsafe extends AbstractVertexList {

View file

@ -1,13 +1,10 @@
package com.jozufozu.flywheel.core.vertex;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import org.lwjgl.system.MemoryUtil;
import com.jozufozu.flywheel.api.vertex.VertexList;
import com.jozufozu.flywheel.util.RenderMath;
import com.mojang.blaze3d.platform.MemoryTracker;
public class PosTexNormalVertexListUnsafe extends AbstractVertexList {

View file

@ -3,7 +3,6 @@ package com.jozufozu.flywheel.util;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.function.BiConsumer;

View file

@ -5,6 +5,7 @@ license = "MIT"
[[mods]]
modId = "flywheel"
# The Implementation-Version property in the jar's MANIFEST.MF file will be used as the mod version at runtime
version = "${file.jarVersion}"
displayName = "Flywheel"
logoFile = "logo.png"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 57 KiB