Skip to content

Commit

Permalink
Merge branch '1.16.x/dev' into 1.16.x/stable
Browse files Browse the repository at this point in the history
  • Loading branch information
FlashyReese committed Nov 15, 2022
2 parents 5735428 + ffa0368 commit 213d8b0
Show file tree
Hide file tree
Showing 36 changed files with 2,801 additions and 684 deletions.
56 changes: 56 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Bug Report
description: File a bug report
labels: bug
body:
- type: checkboxes
id: unique
attributes:
label: Make sure you are not opening a duplicate.
options:
- label: "[I have searched the issue tracker](https://github.com/FlashyReese/sodium-extra-fabric/issues?q=) and did not find an issue describing my bug."
validations:
required: true
- type: markdown
attributes:
value: "Are you using the latest version of the mod? If not, try updating to see if it resolves your issue. You can [find the latest versions here](https://github.com/FlashyReese/sodium-extra-fabric/releases)."
- type: input
id: version-mc
attributes:
label: Minecraft version.
placeholder: ex. 1.17.1
validations:
required: true
- type: input
id: version-sodium-extra
attributes:
label: Sodium Extra version.
placeholder: ex. 0.3.2
validations:
required: true
- type: input
id: version-sodium
attributes:
label: Sodium version.
placeholder: ex. 0.2.0
validations:
required: true
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: ex. I can't disable some particles.
validations:
required: true
- type: textarea
id: log
attributes:
label: Relevant log.
description: Please upload your latest.log (From the logs folder, it's in your Minecraft root directory, like the mods folder) to any pastebin service ex. gist.github.com, hastebin.com, pastebin.ubuntu.com, paste.ee or paste.gg
validations:
required: true
- type: textarea
id: additional
attributes:
label: Additional information.
description: Provide a list of any other mods you are using, along with their respective versions. If you have any screenshots, videos, or other information that you feel is necessary to explain the issue, feel free to attach them here.
11 changes: 6 additions & 5 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@ on: [ pull_request, push ]

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Grant execute permission for gradlew
- name: Grant execute permission for Gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Upload build artifacts
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: build/libs
9 changes: 5 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ jobs:
runs-on: self-hosted
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Grant execute permission for gradlew
- name: Grant execute permission for Gradlew
run: chmod +x gradlew
- name: Upload assets to releases
run: ./gradlew build publishAllPublicationsToFlashyReeseReleasesRepository
Expand All @@ -24,7 +25,7 @@ jobs:
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
BUILD_RELEASE: ${{ github.event.prerelease == false }}
- name: Publish to Modrinth & CurseForge
uses: Kir-Antipov/mc-publish@v2.1
uses: Kir-Antipov/mc-publish@v3.2
with:
modrinth-id: PtjYWJkn
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/self-hosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@ jobs:
runs-on: self-hosted

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Grant execute permission for gradlew
- name: Grant execute permission for Gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Upload build artifacts
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: build/libs
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id 'signing'
id 'fabric-loom' version '1.0-SNAPSHOT'
id 'maven-publish'
id 'io.github.juuxel.loom-quiltflower' version '1.7.3'
id 'io.github.juuxel.loom-quiltflower' version '1.7.4'
}

sourceCompatibility = JavaVersion.VERSION_1_8
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.14.9

# Mod Properties
mod_version=0.4.11
mod_version=0.4.12
maven_group=me.flashyreese.mods
archives_base_name=sodium-extra

Expand Down
18 changes: 10 additions & 8 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,13 +80,13 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# 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"'
DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -127,14 +127,12 @@ if [ -n "$JAVA_HOME" ] ; then
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
Expand All @@ -143,12 +141,16 @@ fi
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
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
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -237,4 +239,4 @@ eval "set -- $(
tr '\n' ' '
)" '"$@"'

exec "$JAVACMD" "$@"
exec "$JAVACMD" "$@"
5 changes: 3 additions & 2 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
Expand Down Expand Up @@ -88,4 +89,4 @@ exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
:omega
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
public class SodiumExtraGameOptionPages {
public static final SodiumExtraOptionsStorage sodiumExtraOpts = new SodiumExtraOptionsStorage();

private static String parseVanillaString(String key){
private static String parseVanillaString(String key) {
return new LiteralText((new TranslatableText(key).getString()).replaceAll("§.", "")).getString();
}

Expand Down Expand Up @@ -207,42 +207,35 @@ public static OptionPage render() {
.setBinding((options, value) -> options.renderSettings.multiDimensionFogControl = value, options -> options.renderSettings.multiDimensionFogControl)
.build()
)
.add(OptionImpl.createBuilder(int.class, sodiumExtraOpts)
.setName(new TranslatableText("sodium-extra.option.fog_start").getString())
.setTooltip(new TranslatableText("sodium-extra.option.fog_start.tooltip").getString())
.setControl(option -> new SliderControlExtended(option, 0, 100, 1, ControlValueFormatter.percentage(), false))
.setBinding((options, value) -> options.renderSettings.fogStart = value, options -> options.renderSettings.fogStart)
.build()
)
.build());

if (SodiumExtraClientMod.options().renderSettings.multiDimensionFogControl) {
if (SodiumExtraClientMod.options().renderSettings.dimensionFogDistanceMap.size() < DimensionOptionsAccessor.getBaseDimensions().size()) {
groups.add(DimensionOptionsAccessor.getBaseDimensions().stream()
.map(dimensionOptionsRegistryKey -> OptionImpl.createBuilder(int.class, sodiumExtraOpts)
.setName(new TranslatableText("sodium-extra.option.fog", translatableName(dimensionOptionsRegistryKey.getValue(), "dimensions").getString()).getString())
.setTooltip(new TranslatableText("sodium-extra.option.fog.tooltip").getString())
.setControl(option -> new SliderControlExtended(option, 0, 33, 1, ControlValueFormatterExtended.fogDistance(), false))
.setBinding((opts, val) -> opts.renderSettings.dimensionFogDistanceMap.put(dimensionOptionsRegistryKey.getValue(), val),
opts -> opts.renderSettings.dimensionFogDistanceMap.getOrDefault(dimensionOptionsRegistryKey.getValue(), 0))
.build())
.collect(
OptionGroup::createBuilder,
OptionGroup.Builder::add,
(b1, b2) -> {
}
).build()
);
} else {
groups.add(SodiumExtraClientMod.options().renderSettings.dimensionFogDistanceMap.keySet().stream()
.map(identifier -> OptionImpl.createBuilder(int.class, sodiumExtraOpts)
.setName(new TranslatableText("sodium-extra.option.fog", translatableName(identifier, "dimensions").getString()).getString())
.setTooltip(new TranslatableText("sodium-extra.option.fog.tooltip").getString())
.setControl(option -> new SliderControlExtended(option, 0, 33, 1, ControlValueFormatterExtended.fogDistance(), false))
.setBinding((opts, val) -> opts.renderSettings.dimensionFogDistanceMap.put(identifier, val),
opts -> opts.renderSettings.dimensionFogDistanceMap.getOrDefault(identifier, 0))
.build()
).collect(
OptionGroup::createBuilder,
OptionGroup.Builder::add,
(b1, b2) -> {
}
).build()
);
}
DimensionOptionsAccessor.getBaseDimensions()
.stream()
.filter(dim -> !SodiumExtraClientMod.options().renderSettings.dimensionFogDistanceMap.containsKey(dim.getValue()))
.forEach(dim -> SodiumExtraClientMod.options().renderSettings.dimensionFogDistanceMap.put(dim.getValue(), 0));
groups.add(SodiumExtraClientMod.options().renderSettings.dimensionFogDistanceMap.keySet().stream()
.map(identifier -> OptionImpl.createBuilder(int.class, sodiumExtraOpts)
.setName(new TranslatableText("sodium-extra.option.fog", translatableName(identifier, "dimensions").getString()).getString())
.setTooltip(new TranslatableText("sodium-extra.option.fog.tooltip").getString())
.setControl(option -> new SliderControlExtended(option, 0, 33, 1, ControlValueFormatterExtended.fogDistance(), false))
.setBinding((opts, val) -> opts.renderSettings.dimensionFogDistanceMap.put(identifier, val),
opts -> opts.renderSettings.dimensionFogDistanceMap.getOrDefault(identifier, 0))
.build()
).collect(
OptionGroup::createBuilder,
OptionGroup.Builder::add,
(b1, b2) -> {
}
).build()
);
} else {
groups.add(OptionGroup.createBuilder()
.add(OptionImpl.createBuilder(int.class, sodiumExtraOpts)
Expand Down Expand Up @@ -402,13 +395,45 @@ public static OptionPage extra() {
.setBinding((options, value) -> options.extraSettings.cloudHeight = value, options -> options.extraSettings.cloudHeight)
.build()
)
.build());
groups.add(OptionGroup.createBuilder()
.add(OptionImpl.createBuilder(boolean.class, sodiumExtraOpts)
.setName(new TranslatableText("sodium-extra.option.toasts").getString())
.setTooltip(new TranslatableText("sodium-extra.option.toasts.tooltip").getString())
.setControl(TickBoxControl::new)
.setBinding((options, value) -> options.extraSettings.toasts = value, options -> options.extraSettings.toasts)
.build()
)
.add(OptionImpl.createBuilder(boolean.class, sodiumExtraOpts)
.setName(new TranslatableText("sodium-extra.option.advancement_toast").getString())
.setTooltip(new TranslatableText("sodium-extra.option.advancement_toast.tooltip").getString())
.setControl(TickBoxControl::new)
.setBinding((options, value) -> options.extraSettings.advancementToast = value, options -> options.extraSettings.advancementToast)
.build()
)
.add(OptionImpl.createBuilder(boolean.class, sodiumExtraOpts)
.setName(new TranslatableText("sodium-extra.option.recipe_toast").getString())
.setTooltip(new TranslatableText("sodium-extra.option.recipe_toast.tooltip").getString())
.setControl(TickBoxControl::new)
.setBinding((options, value) -> options.extraSettings.recipeToast = value, options -> options.extraSettings.recipeToast)
.build()
)
.add(OptionImpl.createBuilder(boolean.class, sodiumExtraOpts)
.setName(new TranslatableText("sodium-extra.option.system_toast").getString())
.setTooltip(new TranslatableText("sodium-extra.option.system_toast.tooltip").getString())
.setControl(TickBoxControl::new)
.setBinding((options, value) -> options.extraSettings.systemToast = value, options -> options.extraSettings.systemToast)
.build()
)
.add(OptionImpl.createBuilder(boolean.class, sodiumExtraOpts)
.setName(new TranslatableText("sodium-extra.option.tutorial_toast").getString())
.setTooltip(new TranslatableText("sodium-extra.option.tutorial_toast.tooltip").getString())
.setControl(TickBoxControl::new)
.setBinding((options, value) -> options.extraSettings.tutorialToast = value, options -> options.extraSettings.tutorialToast)
.build()
)
.build());
groups.add(OptionGroup.createBuilder()
.add(OptionImpl.createBuilder(boolean.class, sodiumExtraOpts)
.setName(new TranslatableText("sodium-extra.option.instant_sneak").getString())
.setTooltip(new TranslatableText("sodium-extra.option.instant_sneak.tooltip").getString())
Expand Down
Loading

0 comments on commit 213d8b0

Please sign in to comment.