Skip to content

Commit

Permalink
Merge branch 'refs/heads/1.19.3/wip' into 1.19.4/wip
Browse files Browse the repository at this point in the history
  • Loading branch information
PepperCode1 committed May 14, 2024
2 parents f70233b + 77466a3 commit f54e4ec
Show file tree
Hide file tree
Showing 88 changed files with 1,060 additions and 779 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/wrapper-validation-action@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
check-latest: true
- name: Build artifacts
run: ./gradlew build --stacktrace
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: build/libs/
22 changes: 12 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
plugins {
id 'fabric-loom' version "${loom_version}"
id 'io.github.juuxel.loom-vineflower' version "${loom_vineflower_version}"
id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
version = project.mod_version + '+' + project.mod_minecraft_version + getExtraBuildMetadata()
group = project.maven_group

String getExtraBuildMetadata() {
base {
archivesName = project.archives_base_name
}

static String getExtraBuildMetadata() {
String buildNumber = System.getenv('GITHUB_RUN_NUMBER')
if (buildNumber != null) {
return ".build.${buildNumber}"
Expand Down Expand Up @@ -66,27 +65,30 @@ processResources {
}

tasks.withType(JavaCompile).configureEach {
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release.set(17)
it.options.release = 17
}

java {
// 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()

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

jar {
from('LICENSE') {
rename { "${it}_${project.archivesBaseName}" }
rename { "${it}_${project.base.archivesName.get()}" }
}
}

// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
create('mavenJava', MavenPublication) {
artifactId = project.archives_base_name
from components.java
}
}
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Done to increase the memory available to Gradle.
org.gradle.jvmargs = -Xmx1G
org.gradle.parallel = true

# Fabric Properties
loom_version = 1.3.8
loom_vineflower_version = 1.11.0
loom_version = 1.6.11
minecraft_version = 1.19.4
yarn_mappings = 1.19.4+build.2
loader_version = 0.14.21
loader_version = 0.15.10

# Mod Properties
mod_version = 3.0.0-beta.4
mod_version = 3.0.0-beta.5
mod_minecraft_version = 1.19.4
maven_group = me.pepperbell
archives_base_name = continuity
Expand Down
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,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
17 changes: 9 additions & 8 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -144,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -201,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package me.pepperbell.continuity.api.client;

import java.util.function.Function;

import net.minecraft.block.BlockState;
import net.minecraft.client.texture.Sprite;
import net.minecraft.client.util.SpriteIdentifier;

public interface CachingPredicates {
boolean affectsSprites();
Expand All @@ -13,4 +16,8 @@ public interface CachingPredicates {
boolean affectsBlockState(BlockState state);

boolean isValidForMultipass();

interface Factory<T extends CtmProperties> {
CachingPredicates createPredicates(T properties, Function<SpriteIdentifier, Sprite> textureGetter);
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package me.pepperbell.continuity.api.client;

public interface CtmLoader<T extends CtmProperties> {
CtmProperties.Factory<T> getPropertiesFactory();

QuadProcessor.Factory<T> getProcessorFactory();

CachingPredicates.Factory<T> getPredicatesFactory();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package me.pepperbell.continuity.api.client;

import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Nullable;

import me.pepperbell.continuity.impl.client.CtmLoaderRegistryImpl;

@ApiStatus.NonExtendable
public interface CtmLoaderRegistry {
static CtmLoaderRegistry get() {
return CtmLoaderRegistryImpl.INSTANCE;
}

void registerLoader(String method, CtmLoader<?> loader);

@Nullable
CtmLoader<?> getLoader(String method);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package me.pepperbell.continuity.api.client;

import java.util.Collection;
import java.util.Properties;

import org.jetbrains.annotations.Nullable;

import net.minecraft.client.util.SpriteIdentifier;
import net.minecraft.resource.ResourceManager;
import net.minecraft.resource.ResourcePack;
import net.minecraft.util.Identifier;

public interface CtmProperties extends Comparable<CtmProperties> {
Collection<SpriteIdentifier> getTextureDependencies();

interface Factory<T extends CtmProperties> {
@Nullable
T createProperties(Properties properties, Identifier resourceId, ResourcePack pack, int packPriority, ResourceManager resourceManager, String method);
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package me.pepperbell.continuity.api.client;

import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Supplier;

import net.fabricmc.fabric.api.renderer.v1.mesh.Mesh;
import net.fabricmc.fabric.api.renderer.v1.mesh.MutableQuadView;
import net.fabricmc.fabric.api.renderer.v1.mesh.QuadEmitter;
import net.minecraft.block.BlockState;
import net.minecraft.client.texture.Sprite;
import net.minecraft.client.util.SpriteIdentifier;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.random.Random;
import net.minecraft.world.BlockRenderView;
Expand All @@ -26,9 +28,13 @@ interface ProcessingContext extends ProcessingDataProvider {
}

enum ProcessingResult {
CONTINUE,
NEXT_PROCESSOR,
NEXT_PASS,
STOP,
ABORT_AND_RENDER_QUAD,
ABORT_AND_CANCEL_QUAD;
DISCARD;
}

interface Factory<T extends CtmProperties> {
QuadProcessor createProcessor(T properties, Function<SpriteIdentifier, Sprite> textureGetter);
}
}

This file was deleted.

Loading

0 comments on commit f54e4ec

Please sign in to comment.