mirror of
https://github.com/Lucaslah/WeatherChanger.git
synced 2026-01-05 21:17:51 +00:00
Version 1.3.0-beta1 (Fabric) (#17)
* [1.3.0-beta1] Update to 1.21.11 * Fix deploy workflow
This commit is contained in:
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@@ -43,8 +43,8 @@ jobs:
|
|||||||
- name: Create Release
|
- name: Create Release
|
||||||
run: |
|
run: |
|
||||||
mkdir dist
|
mkdir dist
|
||||||
mv build/fabric/build/libs/*.jar dist
|
shopt -s nullglob
|
||||||
mv build/forge/build/libs/*.jar dist
|
mv build/{fabric,forge}/build/libs/*.jar dist/
|
||||||
|
|
||||||
pushd dist
|
pushd dist
|
||||||
shasum -a 256 * > checksums.txt
|
shasum -a 256 * > checksums.txt
|
||||||
@@ -59,4 +59,8 @@ jobs:
|
|||||||
--generate-notes
|
--generate-notes
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if [[ "$channel" == "alpha" || "$channel" == "beta" ]]; then
|
||||||
|
release_args+=( --prerelease )
|
||||||
|
fi
|
||||||
|
|
||||||
gh release create "${release_args[@]}" ./dist/*
|
gh release create "${release_args[@]}" ./dist/*
|
||||||
@@ -56,9 +56,10 @@ Weather Changer versions, but are not supported.
|
|||||||
|
|
||||||
See the [GitHub releases](https://github.com/Lucaslah/WeatherChanger/releases) page for full release history.
|
See the [GitHub releases](https://github.com/Lucaslah/WeatherChanger/releases) page for full release history.
|
||||||
|
|
||||||
| Weather Changer Version | Minecraft Version | Mod loaders | Latest Release |
|
| Weather Changer Version | Minecraft Version | Mod loaders | Latest Release |
|
||||||
|-------------------------|-------------------|---------------|------------------------------------------------------------------------|
|
|-------------------------|-------------------|---------------|------------------------------------------------------------------------------------|
|
||||||
| v1.2.x | 1.21-1.21.10 | Fabric, Forge | [1.2.2](https://github.com/Lucaslah/WeatherChanger/releases/tag/1.2.2) |
|
| v1.3.x | 1.21.11 | Fabric, Forge | [1.3.0-beta1](https://github.com/Lucaslah/WeatherChanger/releases/tag/1.3.0-beta1) |
|
||||||
|
| v1.2.x | 1.21-1.21.10 | Fabric, Forge | [1.2.2](https://github.com/Lucaslah/WeatherChanger/releases/tag/1.2.2) |
|
||||||
|
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
*Licensed under the [GNU Lesser General Public License v3.0](https://www.gnu.org/licenses/lgpl-3.0.en.html) license.*
|
*Licensed under the [GNU Lesser General Public License v3.0](https://www.gnu.org/licenses/lgpl-3.0.en.html) license.*
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import net.fabricmc.loom.task.RemapSourcesJarTask
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("architectury-plugin") version "3.4.+"
|
id("architectury-plugin") version "3.4.+"
|
||||||
id("dev.architectury.loom") version "1.7.+" apply false
|
id("dev.architectury.loom") version "1.13.+" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
architectury {
|
architectury {
|
||||||
|
|||||||
@@ -10,8 +10,10 @@ public abstract class Key {
|
|||||||
public KeyBinding keybind;
|
public KeyBinding keybind;
|
||||||
public MinecraftClient mc = MinecraftClient.getInstance();
|
public MinecraftClient mc = MinecraftClient.getInstance();
|
||||||
|
|
||||||
public Key(@NotNull String name) {
|
private static final KeyBinding.Category CATEGORY = KeyBinding.Category.create(Identifier.of("weatherchanger"));
|
||||||
keybind = new KeyBinding(this.getDisplayName(), this.getKeyType(), this.getKey(), this.getCategory());
|
|
||||||
|
public Key() {
|
||||||
|
keybind = new KeyBinding(this.getDisplayName(), this.getKeyType(), this.getKey(), CATEGORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract void onPress(@NotNull MinecraftClient client);
|
public abstract void onPress(@NotNull MinecraftClient client);
|
||||||
@@ -20,6 +22,5 @@ public abstract class Key {
|
|||||||
public abstract boolean isEnabled();
|
public abstract boolean isEnabled();
|
||||||
public abstract String getDisplayName();
|
public abstract String getDisplayName();
|
||||||
public abstract InputUtil.Type getKeyType();
|
public abstract InputUtil.Type getKeyType();
|
||||||
public abstract String getCategory();
|
|
||||||
public abstract int getKey();
|
public abstract int getKey();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,10 +12,6 @@ import net.minecraft.util.Identifier;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public class ToggleClearKey extends Key {
|
public class ToggleClearKey extends Key {
|
||||||
public ToggleClearKey() {
|
|
||||||
super("ToggleClearKey");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPress(@NotNull MinecraftClient client) {
|
public void onPress(@NotNull MinecraftClient client) {
|
||||||
WeatherChanger.setMode(WcMode.CLEAR);
|
WeatherChanger.setMode(WcMode.CLEAR);
|
||||||
@@ -48,11 +44,6 @@ public class ToggleClearKey extends Key {
|
|||||||
return InputUtil.Type.KEYSYM;
|
return InputUtil.Type.KEYSYM;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getCategory() {
|
|
||||||
return "Weather Changer";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getKey() {
|
public int getKey() {
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@@ -12,10 +12,6 @@ import net.minecraft.util.Identifier;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public class ToggleOffKey extends Key {
|
public class ToggleOffKey extends Key {
|
||||||
public ToggleOffKey() {
|
|
||||||
super("ToggleOffKey");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPress(@NotNull MinecraftClient client) {
|
public void onPress(@NotNull MinecraftClient client) {
|
||||||
WeatherChanger.setMode(WcMode.OFF);
|
WeatherChanger.setMode(WcMode.OFF);
|
||||||
@@ -48,11 +44,6 @@ public class ToggleOffKey extends Key {
|
|||||||
return InputUtil.Type.KEYSYM;
|
return InputUtil.Type.KEYSYM;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getCategory() {
|
|
||||||
return "Weather Changer";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getKey() {
|
public int getKey() {
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@@ -12,10 +12,6 @@ import net.minecraft.util.Identifier;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public class ToggleRainKey extends Key {
|
public class ToggleRainKey extends Key {
|
||||||
public ToggleRainKey() {
|
|
||||||
super("ToggleRainKey");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPress(@NotNull MinecraftClient client) {
|
public void onPress(@NotNull MinecraftClient client) {
|
||||||
WeatherChanger.setMode(WcMode.RAIN);
|
WeatherChanger.setMode(WcMode.RAIN);
|
||||||
@@ -48,11 +44,6 @@ public class ToggleRainKey extends Key {
|
|||||||
return InputUtil.Type.KEYSYM;
|
return InputUtil.Type.KEYSYM;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getCategory() {
|
|
||||||
return "Weather Changer";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getKey() {
|
public int getKey() {
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@@ -12,10 +12,6 @@ import net.minecraft.util.Identifier;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public class ToggleThunderKey extends Key {
|
public class ToggleThunderKey extends Key {
|
||||||
public ToggleThunderKey() {
|
|
||||||
super("ToggleThunderKey");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPress(@NotNull MinecraftClient client) {
|
public void onPress(@NotNull MinecraftClient client) {
|
||||||
WeatherChanger.setMode(WcMode.THUNDER);
|
WeatherChanger.setMode(WcMode.THUNDER);
|
||||||
@@ -48,11 +44,6 @@ public class ToggleThunderKey extends Key {
|
|||||||
return InputUtil.Type.KEYSYM;
|
return InputUtil.Type.KEYSYM;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getCategory() {
|
|
||||||
return "Weather Changer";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getKey() {
|
public int getKey() {
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@@ -20,11 +20,11 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||||||
@Mixin(World.class)
|
@Mixin(World.class)
|
||||||
public class WorldMixin {
|
public class WorldMixin {
|
||||||
@Shadow
|
@Shadow
|
||||||
protected float rainGradientPrev;
|
protected float lastRainGradient;
|
||||||
@Shadow
|
@Shadow
|
||||||
protected float rainGradient;
|
protected float rainGradient;
|
||||||
@Shadow
|
@Shadow
|
||||||
protected float thunderGradientPrev;
|
protected float lastThunderGradient;
|
||||||
@Shadow
|
@Shadow
|
||||||
protected float thunderGradient;
|
protected float thunderGradient;
|
||||||
|
|
||||||
@@ -32,12 +32,12 @@ public class WorldMixin {
|
|||||||
|
|
||||||
@Unique
|
@Unique
|
||||||
private float weatherChanger$getRainGradientOg(float delta) {
|
private float weatherChanger$getRainGradientOg(float delta) {
|
||||||
return MathHelper.lerp(delta, this.rainGradientPrev, this.rainGradient);
|
return MathHelper.lerp(delta, this.lastRainGradient, this.rainGradient);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Unique
|
@Unique
|
||||||
private float weatherChanger$getThunderGradientOg(float delta) {
|
private float weatherChanger$getThunderGradientOg(float delta) {
|
||||||
return MathHelper.lerp(delta, this.thunderGradientPrev, this.thunderGradient) * this.weatherChanger$getRainGradientOg(delta);
|
return MathHelper.lerp(delta, this.lastThunderGradient, this.thunderGradient) * this.weatherChanger$getRainGradientOg(delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Unique
|
@Unique
|
||||||
@@ -54,7 +54,7 @@ public class WorldMixin {
|
|||||||
} else if (mode == WcMode.RAIN || mode == WcMode.THUNDER) {
|
} else if (mode == WcMode.RAIN || mode == WcMode.THUNDER) {
|
||||||
callback.setReturnValue(1F);
|
callback.setReturnValue(1F);
|
||||||
} else {
|
} else {
|
||||||
callback.setReturnValue(MathHelper.lerp(delta, this.rainGradientPrev, this.rainGradient));
|
callback.setReturnValue(MathHelper.lerp(delta, this.lastRainGradient, this.rainGradient));
|
||||||
}
|
}
|
||||||
|
|
||||||
callback.cancel();
|
callback.cancel();
|
||||||
@@ -69,7 +69,7 @@ public class WorldMixin {
|
|||||||
} else if (mode == WcMode.THUNDER) {
|
} else if (mode == WcMode.THUNDER) {
|
||||||
callback.setReturnValue(1F);
|
callback.setReturnValue(1F);
|
||||||
} else {
|
} else {
|
||||||
callback.setReturnValue(MathHelper.lerp(delta, this.thunderGradientPrev, this.thunderGradient) * MathHelper.lerp(delta, this.rainGradientPrev, this.rainGradient));
|
callback.setReturnValue(MathHelper.lerp(delta, this.lastThunderGradient, this.thunderGradient) * MathHelper.lerp(delta, this.lastRainGradient, this.rainGradient));
|
||||||
}
|
}
|
||||||
|
|
||||||
callback.cancel();
|
callback.cancel();
|
||||||
@@ -83,7 +83,6 @@ public class WorldMixin {
|
|||||||
|
|
||||||
@Inject(method = "isThundering", at = @At("HEAD"), cancellable = true)
|
@Inject(method = "isThundering", at = @At("HEAD"), cancellable = true)
|
||||||
public void isThundering(CallbackInfoReturnable<Boolean> callback) {
|
public void isThundering(CallbackInfoReturnable<Boolean> callback) {
|
||||||
|
|
||||||
if (this.weatherChanger$getDimension().hasSkyLight() && !(this.weatherChanger$getDimension().hasCeiling())) {
|
if (this.weatherChanger$getDimension().hasSkyLight() && !(this.weatherChanger$getDimension().hasCeiling())) {
|
||||||
callback.setReturnValue((double)this.weatherChanger$getThunderGradientOg(1.0F) > 0.9);
|
callback.setReturnValue((double)this.weatherChanger$getThunderGradientOg(1.0F) > 0.9);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"key.category.minecraft.weatherchanger": "Weather Changer",
|
||||||
"commands.weatherchanger.set.off": "Set client weather to: Off",
|
"commands.weatherchanger.set.off": "Set client weather to: Off",
|
||||||
"commands.weatherchanger.set.clear": "Set client weather to: Clear",
|
"commands.weatherchanger.set.clear": "Set client weather to: Clear",
|
||||||
"commands.weatherchanger.set.rain": "Set client weather to: Rain",
|
"commands.weatherchanger.set.rain": "Set client weather to: Rain",
|
||||||
|
|||||||
@@ -5,15 +5,15 @@ org.gradle.jvmargs=-Xmx2G
|
|||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
|
|
||||||
# Minecraft Properties
|
# Minecraft Properties
|
||||||
minecraft_version=1.21
|
minecraft_version=1.21.11
|
||||||
minecraft_base=1.21
|
minecraft_base=1.21
|
||||||
yarn_mappings=1.21+build.7
|
yarn_mappings=1.21.11+build.1
|
||||||
|
|
||||||
# Architectury Properties
|
# Architectury Properties
|
||||||
enabled_platforms=fabric,forge
|
enabled_platforms=fabric,forge
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.2.2
|
mod_version = 1.3.0-beta1
|
||||||
mod_id = weatherchanger
|
mod_id = weatherchanger
|
||||||
maven_group = me.lucaslah.weatherchanger
|
maven_group = me.lucaslah.weatherchanger
|
||||||
archives_base_name = weather-changer
|
archives_base_name = weather-changer
|
||||||
@@ -23,8 +23,8 @@ archives_base_name = weather-changer
|
|||||||
release_channel=release
|
release_channel=release
|
||||||
|
|
||||||
# Fabric
|
# Fabric
|
||||||
fabric.loader_version=0.15.11
|
fabric.loader_version=0.18.2
|
||||||
fabric.version=0.100.1+1.21
|
fabric.version=0.139.4+1.21.11
|
||||||
|
|
||||||
# Forge
|
# Forge
|
||||||
forge.version=1.21-51.0.21
|
forge.version=1.21-51.0.21
|
||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
2
gradlew
vendored
2
gradlew
vendored
@@ -55,7 +55,7 @@
|
|||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (3) This script is generated from the Groovy template
|
||||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
# within the Gradle project.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
|||||||
20
gradlew.bat
vendored
20
gradlew.bat
vendored
@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
|
|||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if %ERRORLEVEL% equ 0 goto execute
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation.
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
|||||||
|
|
||||||
if exist "%JAVA_EXE%" goto execute
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation.
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
|
|||||||
@@ -38,4 +38,4 @@ gradleEnterprise {
|
|||||||
|
|
||||||
include("common")
|
include("common")
|
||||||
include("fabric")
|
include("fabric")
|
||||||
include("forge")
|
//include("forge")
|
||||||
|
|||||||
Reference in New Issue
Block a user