mirror of
https://github.com/JonasunderscoreJones/nicer-skies.git
synced 2025-10-22 19:29:18 +02:00
new: start port to 1.19.4
This commit is contained in:
parent
6739b37893
commit
0dfb32150b
7 changed files with 35 additions and 34 deletions
18
build.gradle
18
build.gradle
|
@ -34,17 +34,17 @@ dependencies {
|
|||
}
|
||||
|
||||
// apis
|
||||
modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}"
|
||||
// modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}"
|
||||
|
||||
// devenv mods
|
||||
modRuntimeOnly "maven.modrinth:lazydfu:${project.lazydfu_version}"
|
||||
modRuntimeOnly "maven.modrinth:starlight:${project.starlight_version}"
|
||||
//modRuntimeOnly "maven.modrinth:lithium:${project.lithium_version}"
|
||||
modRuntimeOnly "maven.modrinth:spark:${project.spark_version}"
|
||||
modRuntimeOnly include(fabricApi.module("fabric-command-api-v2", project.fabric_version))
|
||||
modRuntimeOnly include(fabricApi.module("fabric-lifecycle-events-v1", project.fabric_version))
|
||||
modRuntimeOnly("com.terraformersmc:modmenu:${project.modmenu_version}") { transitive = false }
|
||||
modRuntimeOnly(include(fabricApi.module("fabric-screen-api-v1", project.fabric_version)))
|
||||
// modRuntimeOnly "maven.modrinth:lazydfu:${project.lazydfu_version}"
|
||||
// modRuntimeOnly "maven.modrinth:starlight:${project.starlight_version}"
|
||||
// //modRuntimeOnly "maven.modrinth:lithium:${project.lithium_version}"
|
||||
// modRuntimeOnly "maven.modrinth:spark:${project.spark_version}"
|
||||
// modRuntimeOnly include(fabricApi.module("fabric-command-api-v2", project.fabric_version))
|
||||
// modRuntimeOnly include(fabricApi.module("fabric-lifecycle-events-v1", project.fabric_version))
|
||||
// modRuntimeOnly("com.terraformersmc:modmenu:${project.modmenu_version}") { transitive = false }
|
||||
// modRuntimeOnly(include(fabricApi.module("fabric-screen-api-v1", project.fabric_version)))
|
||||
|
||||
// libraries
|
||||
compileOnly 'org.projectlombok:lombok:1.18.24'
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/develop
|
||||
minecraft_version=1.19.3
|
||||
loader_version=0.14.11
|
||||
fabric_version=0.69.0+1.19.3
|
||||
minecraft_version=1.19.4-rc2
|
||||
loader_version=0.14.17
|
||||
fabric_version=0.75.3+1.19.4
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.2.0
|
||||
|
@ -13,8 +13,8 @@
|
|||
archives_base_name = nicer-skies
|
||||
|
||||
# Dependencies
|
||||
modmenu_version = 5.0.2
|
||||
lazydfu_version = 0.1.3
|
||||
starlight_version = 1.1.1+1.19
|
||||
lithium_version = mc1.19.3-0.10.4
|
||||
spark_version = 1.9.26-fabric
|
||||
# modmenu_version = 5.0.2
|
||||
# lazydfu_version = 0.1.3
|
||||
# starlight_version = 1.1.1+1.19
|
||||
# lithium_version = mc1.19.3-0.10.4
|
||||
# spark_version = 1.9.26-fabric
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package codes.ztereohype.nicerskies.gui;
|
||||
|
||||
import com.terraformersmc.modmenu.api.ConfigScreenFactory;
|
||||
import com.terraformersmc.modmenu.api.ModMenuApi;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class ModMenuSettingsApi implements ModMenuApi {
|
||||
@Override
|
||||
public ConfigScreenFactory<?> getModConfigScreenFactory() {
|
||||
return ConfigScreen::new;
|
||||
}
|
||||
}
|
||||
//import com.terraformersmc.modmenu.api.ConfigScreenFactory;
|
||||
//import com.terraformersmc.modmenu.api.ModMenuApi;
|
||||
//import net.fabricmc.api.EnvType;
|
||||
//import net.fabricmc.api.Environment;
|
||||
//
|
||||
//@Environment(EnvType.CLIENT)
|
||||
//public class ModMenuSettingsApi implements ModMenuApi {
|
||||
// @Override
|
||||
// public ConfigScreenFactory<?> getModConfigScreenFactory() {
|
||||
// return ConfigScreen::new;
|
||||
// }
|
||||
//}
|
||||
|
|
|
@ -53,7 +53,7 @@ public abstract class LevelRendererMixin {
|
|||
|
||||
@Inject(
|
||||
method = "renderSky",
|
||||
at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;disableTexture()V", ordinal = 2, shift = At.Shift.AFTER),
|
||||
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/multiplayer/ClientLevel;getStarBrightness(F)F", shift = At.Shift.BEFORE),
|
||||
locals = LocalCapture.CAPTURE_FAILHARD
|
||||
)
|
||||
private void drawSkybox(PoseStack poseStack, Matrix4f matrix4f, float f, Camera camera, boolean bl, Runnable runnable, CallbackInfo ci, FogType fogType, Vec3 vec3, float g, float h, float i, BufferBuilder bufferBuilder, ShaderInstance shaderInstance, float[] fs, float j, Matrix4f matrix4f3, float l, int s, int t, int n, float u, float p, float q, float r) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package codes.ztereohype.nicerskies.sky.nebula;
|
||||
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.level.levelgen.synth.PerlinNoise;
|
||||
import org.joml.Math;
|
||||
|
||||
public abstract class SkyboxPainter {
|
||||
protected final PerlinNoise noise;
|
||||
|
@ -13,7 +13,7 @@ public abstract class SkyboxPainter {
|
|||
abstract int getTexelColour(float x, float y, float z);
|
||||
|
||||
public float[] projectOnSphere(float x, float y, float z) {
|
||||
float invDistance = Mth.fastInvSqrt(x * x + y * y + z * z);
|
||||
float invDistance = 1 / Math.sqrt(x * x + y * y + z * z);
|
||||
|
||||
//divide by distance to get projection on sphere (shorten the vector)
|
||||
x *= invDistance;
|
||||
|
|
|
@ -3,6 +3,7 @@ package codes.ztereohype.nicerskies.sky.star;
|
|||
import com.mojang.blaze3d.vertex.BufferBuilder;
|
||||
import lombok.Getter;
|
||||
import net.minecraft.util.Mth;
|
||||
import org.joml.Math;
|
||||
|
||||
public class Star {
|
||||
private final float xCoord;
|
||||
|
@ -33,7 +34,7 @@ public class Star {
|
|||
this.g = color[1];
|
||||
this.b = color[2];
|
||||
|
||||
float invsqrtDistance = Mth.fastInvSqrt(randX * randX + randY * randY + randZ * randZ);
|
||||
float invsqrtDistance = 1 / Math.sqrt(randX * randX + randY * randY + randZ * randZ);
|
||||
this.xCoord = randX * invsqrtDistance * 100.0F;
|
||||
this.yCoord = randY * invsqrtDistance * 100.0F;
|
||||
this.zCoord = randZ * invsqrtDistance * 100.0F;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.14.6",
|
||||
"minecraft": "1.19.3",
|
||||
"minecraft": "1.19.4-rc.2",
|
||||
"java": ">=17"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue