Skip to content

Commit 83acc09

Browse files
committed
k cool we work now
1 parent 0b0144b commit 83acc09

22 files changed

Lines changed: 407 additions & 56 deletions

File tree

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ plugins {
1616

1717
toolkitLoomHelper {
1818
useOneConfig {
19-
version = "1.0.0-alpha.70"
20-
loaderVersion = "1.1.0-alpha.44"
19+
version = "1.0.0-alpha.148"
20+
loaderVersion = "1.1.0-alpha.49"
2121

2222
usePolyMixin = true
2323
polyMixinVersion = "0.8.4+build.2"

root.gradle.kts

Lines changed: 48 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,54 @@ preprocess {
1010
// "1.8.9-forge"(10809, "srg")
1111
// }
1212

13-
"1.20.4-forge"(12004, "srg") {
14-
"1.20.4-fabric"(12004, "yarn") {
15-
"1.19.4-fabric"(11904, "yarn") {
16-
"1.19.4-forge"(11904, "srg") {
17-
"1.18.2-forge"(11802, "srg") {
18-
"1.18.2-fabric"(11802, "yarn") {
19-
"1.17.1-fabric"(11701, "yarn") {
20-
"1.17.1-forge"(11701, "srg") {
21-
"1.16.5-forge"(11605, "srg") {
22-
"1.16.5-fabric"(11605, "yarn") {
23-
"1.12.2-fabric"(11202, "yarn") {
24-
"1.12.2-forge"(11202, "srg") {
25-
"1.8.9-forge"(10809, "srg") {
26-
"1.8.9-fabric"(10809, "yarn")
13+
"1.21.5-fabric"(1_21_05, "yarn") {
14+
"1.21.5-neoforge"(1_21_05, "srg") {
15+
"1.21.4-neoforge"(1_21_04, "srg") {
16+
"1.21.4-fabric"(1_21_04, "yarn") {
17+
"1.21.3-fabric"(1_21_04, "yarn") {
18+
"1.21.3-neoforge"(1_21_03, "srg") {
19+
"1.21.2-neoforge"(1_21_02, "srg") {
20+
"1.21.2-fabric"(1_21_02, "yarn") {
21+
"1.21.1-fabric"(1_21_01, "yarn") {
22+
"1.21.1-neoforge"(1_21_01, "srg") {
23+
"1.20.6-neoforge"(1_20_06, "srg") {
24+
"1.20.6-fabric"(1_20_06, "yarn") {
25+
"1.20.4-fabric"(1_20_04, "yarn") {
26+
"1.20.4-neoforge"(1_20_04, "srg") {
27+
"1.20.4-forge"(1_20_04, "srg") {
28+
"1.20.1-forge"(1_20_01, "srg") {
29+
"1.20.1-fabric"(1_20_01, "yarn") {
30+
"1.19.4-fabric"(1_19_04, "yarn") {
31+
"1.19.4-forge"(1_19_04, "srg") {
32+
"1.19.2-forge"(1_19_02, "srg") {
33+
"1.19.2-fabric"(1_19_02, "yarn") {
34+
"1.18.2-fabric"(1_18_02, "yarn") {
35+
"1.18.2-forge"(1_18_02, "srg") {
36+
"1.17.1-forge"(1_17_01, "srg") {
37+
"1.17.1-fabric"(1_17_01, "yarn") {
38+
"1.16.5-fabric"(1_16_05, "yarn"){
39+
"1.16.5-forge"(1_16_05, "srg") {
40+
"1.12.2-forge"(1_12_02, "srg") {
41+
"1.12.2-fabric"(1_12_02, "yarn") {
42+
"1.8.9-fabric"(1_08_09, "yarn"){
43+
"1.8.9-forge"(1_08_09, "srg")
44+
}
45+
}
46+
}
47+
}
48+
}
49+
}
50+
}
51+
}
52+
}
53+
}
54+
}
55+
}
56+
}
57+
}
58+
}
59+
}
60+
}
2761
}
2862
}
2963
}

settings.gradle.kts

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pluginManagement {
2424

2525
plugins {
2626
kotlin("jvm") version("2.0.0")
27-
id("dev.deftu.gradle.multiversion-root") version("2.35.0")
27+
id("dev.deftu.gradle.multiversion-root") version("2.51.0")
2828
}
2929
}
3030

@@ -42,18 +42,49 @@ rootProject.buildFileName = "root.gradle.kts"
4242
listOf(
4343
"1.8.9-forge",
4444
"1.8.9-fabric",
45-
"1.12.2-fabric",
45+
4646
"1.12.2-forge",
47+
"1.12.2-fabric",
48+
4749
"1.16.5-forge",
4850
"1.16.5-fabric",
51+
4952
"1.17.1-forge",
5053
"1.17.1-fabric",
54+
5155
"1.18.2-forge",
5256
"1.18.2-fabric",
57+
58+
"1.19.2-forge",
59+
"1.19.2-fabric",
60+
5361
"1.19.4-forge",
5462
"1.19.4-fabric",
63+
64+
"1.20.1-forge",
65+
"1.20.1-fabric",
66+
67+
"1.20.4-forge",
68+
"1.20.4-neoforge",
5569
"1.20.4-fabric",
56-
"1.20.4-forge"
70+
71+
"1.20.6-neoforge",
72+
"1.20.6-fabric",
73+
74+
"1.21.1-neoforge",
75+
"1.21.1-fabric",
76+
77+
"1.21.2-neoforge",
78+
"1.21.2-fabric",
79+
80+
"1.21.3-neoforge",
81+
"1.21.3-fabric",
82+
83+
"1.21.4-neoforge",
84+
"1.21.4-fabric",
85+
86+
"1.21.5-neoforge",
87+
"1.21.5-fabric"
5788
).forEach { version ->
5889
include(":$version")
5990
project(":$version").apply {

src/main/java/org/polyfrost/polyweather/mixin/Mixin_WorldChunkManager_FixLowTempsWhenSnowing.java renamed to src/main/java/org/polyfrost/polyweather/mixin/Mixin_FixLowTempsWhenSnowing.java

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,16 @@
11
package org.polyfrost.polyweather.mixin;
22

3+
import net.minecraft.world.biome.WorldChunkManager;
34
import org.polyfrost.polyweather.client.PolyWeatherClient;
45
import org.polyfrost.polyweather.client.PolyWeatherConfig;
56
import org.spongepowered.asm.mixin.Mixin;
67
import org.spongepowered.asm.mixin.injection.*;
78
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
89

9-
//#if MC >= 1.12
10-
//$$ import net.minecraft.world.biome.BiomeProvider;
11-
//#else
12-
import net.minecraft.world.biome.WorldChunkManager;
13-
//#endif
14-
15-
//#if MC >= 1.12
16-
//$$ @Mixin(BiomeProvider.class)
17-
//#else
1810
@Mixin(WorldChunkManager.class)
19-
//#endif
20-
public class Mixin_WorldChunkManager_FixLowTempsWhenSnowing {
11+
public class Mixin_FixLowTempsWhenSnowing {
2112
@Inject(method = "getTemperatureAtHeight", at = @At("HEAD"), cancellable = true)
22-
private void getTemperatureAtHeight(float p_76939_1_, int p_76939_2_, CallbackInfoReturnable<Float> cir) {
13+
private void polyweather$updateTemperatures(float p_76939_1_, int p_76939_2_, CallbackInfoReturnable<Float> cir) {
2314
if (PolyWeatherConfig.INSTANCE.enabled && PolyWeatherClient.isSnowing()) {
2415
cir.setReturnValue(0f);
2516
}

src/main/java/org/polyfrost/polyweather/mixin/Mixin_World_FixRainAndThunderStrength.java renamed to src/main/java/org/polyfrost/polyweather/mixin/Mixin_FixRainAndThunderStrength.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@
99
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
1010

1111
@Mixin(World.class)
12-
public class Mixin_World_FixRainAndThunderStrength {
13-
12+
public class Mixin_FixRainAndThunderStrength {
1413
@Inject(method = "getRainStrength", at = @At("HEAD"), cancellable = true)
1514
private void getRainStrength(float delta, CallbackInfoReturnable<Float> cir) {
16-
if (PolyWeatherConfig.INSTANCE.enabled)
15+
if (PolyWeatherConfig.INSTANCE.enabled) {
1716
cir.setReturnValue(PolyWeatherClient.isSnowing() ? PolyWeatherClient.getSnowStrength() : PolyWeatherClient.isRaining() ? PolyWeatherClient.getRainStrength() : 0f);
17+
}
1818
}
1919

2020
@Inject(method = "getThunderStrength", at = @At("HEAD"), cancellable = true)
2121
private void getThunderStrength(float delta, CallbackInfoReturnable<Float> cir) {
22-
if (PolyWeatherConfig.INSTANCE.enabled)
22+
if (PolyWeatherConfig.INSTANCE.enabled) {
2323
cir.setReturnValue(PolyWeatherClient.isThundering() ? PolyWeatherClient.getThunderStrength() : 0f);
24+
}
2425
}
2526
}

src/main/java/org/polyfrost/polyweather/mixin/Mixin_EntityRenderer_ForceRainAndSnowParticles.java renamed to src/main/java/org/polyfrost/polyweather/mixin/Mixin_ForceRainAndSnowParticles.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@
99
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
1010

1111
@Mixin(EntityRenderer.class)
12-
public class Mixin_EntityRenderer_ForceRainAndSnowParticles {
13-
12+
public class Mixin_ForceRainAndSnowParticles {
1413
@Inject(method = "addRainParticles", at = @At("HEAD"), cancellable = true)
1514
private void addRainParticles(CallbackInfo ci) {
1615
if (PolyWeatherConfig.INSTANCE.enabled && (!PolyWeatherClient.isRaining() || PolyWeatherClient.isSnowing())) {
1716
ci.cancel();
1817
}
1918
}
20-
2119
}

src/main/java/org/polyfrost/polyweather/mixin/Mixin_WorldInfo_ForceRainAndThunderChecks.java renamed to src/main/java/org/polyfrost/polyweather/mixin/Mixin_ForceRainAndThunderChecks.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
1010

1111
@Mixin(WorldInfo.class)
12-
public class Mixin_WorldInfo_ForceRainAndThunderChecks {
13-
12+
public class Mixin_ForceRainAndThunderChecks {
1413
@Inject(method = "isRaining", at = @At("HEAD"), cancellable = true)
1514
private void isRaining(CallbackInfoReturnable<Boolean> cir) {
1615
if (PolyWeatherConfig.INSTANCE.enabled) {

src/main/kotlin/org/polyfrost/polyweather/client/PolyWeatherClient.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import org.polyfrost.polyweather.client.realtime.RealWeatherHandler
77
import org.polyfrost.polyweather.util.WeatherType
88

99
object PolyWeatherClient {
10-
1110
@JvmStatic
1211
val isRaining: Boolean
1312
get() = if (PolyWeatherConfig.irlWeather) RealWeatherHandler.isRaining else PolyWeatherConfig.weatherType != WeatherType.CLEAR
@@ -43,5 +42,4 @@ object PolyWeatherClient {
4342
}
4443
})
4544
}
46-
4745
}

src/main/kotlin/org/polyfrost/polyweather/client/PolyWeatherConfig.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import org.polyfrost.oneconfig.api.config.v1.annotations.Slider
88
import org.polyfrost.polyweather.PolyWeatherConstants
99
import org.polyfrost.polyweather.util.WeatherType
1010

11-
object PolyWeatherConfig : Config("${PolyWeatherConstants.ID}.json", "/polyweather_dark.svg", PolyWeatherConstants.NAME, Category.QOL) {
11+
object PolyWeatherConfig : Config("${PolyWeatherConstants.ID}.json", "/assets/polyweather/polyweather_dark.svg", PolyWeatherConstants.NAME, Category.QOL) {
1212

1313
@Dropdown(
1414
title = "Weather",

src/main/kotlin/org/polyfrost/polyweather/client/realtime/RealWeatherHandler.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import java.time.Instant
1515
import java.util.Calendar
1616

1717
object RealWeatherHandler {
18-
1918
private val logger = LogManager.getLogger(RealWeatherHandler::class.java)
2019

2120
private val data = mutableMapOf<Instant, WMOCode>()
@@ -155,5 +154,4 @@ object RealWeatherHandler {
155154

156155
return weatherCodes
157156
}
158-
159157
}

0 commit comments

Comments
 (0)