Compare commits
8 Commits
test-2
...
v1.1.1-1.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f48759061 | ||
|
|
b32f492afc | ||
|
|
6e632fd070 | ||
|
|
8172ab95cf | ||
|
|
5a132871d8 | ||
|
|
616bb03a71 | ||
|
|
a014beab37 | ||
|
|
cc25e591de |
59
.github/workflows/build-release.yml
vendored
59
.github/workflows/build-release.yml
vendored
@@ -1,59 +0,0 @@
|
||||
name: build-release
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up JDK 16
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 17
|
||||
- name: Cache Gradle packages
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/loom-cache
|
||||
~/.gradle/wrapper
|
||||
~/.m2/repository
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
restore-keys: ${{ runner.os }}-gradle
|
||||
|
||||
- run: chmod +x gradlew
|
||||
|
||||
- name: Build Release
|
||||
run: ./gradlew build --stacktrace
|
||||
|
||||
- name: Upload artifacts to Modrinth, Curseforge and GitHub
|
||||
uses: Kir-Antipov/mc-publish@v2.0
|
||||
with:
|
||||
modrinth-id: jawg7zT1
|
||||
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
|
||||
|
||||
curseforge-id: 594750
|
||||
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
|
||||
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
files: build/libs/!(*-@(dev|sources|all)).jar
|
||||
|
||||
version-type: release
|
||||
|
||||
loaders: fabric
|
||||
|
||||
java: 17
|
||||
|
||||
dependencies: |
|
||||
fabric | depends | 0.46.0
|
||||
kirin | includes | 1.10.0-beta.2
|
||||
modmenu | recommends | *
|
||||
|
||||
version-resolver: latest # Defaults to selecting the latest compatible version of Minecraft, using the tag from the fabric.mod.json
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -31,6 +31,3 @@ bin/
|
||||
# fabric
|
||||
|
||||
run/
|
||||
|
||||
# github
|
||||
.github/secret.json
|
||||
|
||||
@@ -3,17 +3,17 @@ org.gradle.jvmargs=-Xmx1G
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/develop
|
||||
minecraft_version=1.18.1
|
||||
yarn_mappings=1.18.1+build.22
|
||||
loader_version=0.12.11
|
||||
minecraft_version=1.18.2
|
||||
yarn_mappings=1.18.2+build.1
|
||||
loader_version=0.13.3
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.1.1
|
||||
mod_version = 1.1.0
|
||||
maven_group = com.lizistired
|
||||
archives_base_name = cave_dust
|
||||
|
||||
# Dependencies
|
||||
fabric_version=0.46.4+1.18
|
||||
fabric_version=0.47.8+1.18.2
|
||||
clothconfig_version = 6.1.48
|
||||
modmenu_version = 3.0.1
|
||||
minelp_version=4.4.0-beta.2
|
||||
|
||||
@@ -164,7 +164,7 @@ public class CaveDustConfig extends JsonFile {
|
||||
|
||||
public ParticleEffect getParticle(){
|
||||
try {
|
||||
return (ParticleEffect) Registry.PARTICLE_TYPE.get(new Identifier(particleName.toLowerCase()));
|
||||
return (ParticleEffect) Registry.PARTICLE_TYPE.get(Identifier.tryParse(particleName.toLowerCase()));
|
||||
} catch (ClassCastException e) {
|
||||
LOGGER.error(e + "\nThere was an error loading the specified particle from the config, make sure a valid particle name is specified. Falling back to \"minecraft:white_ash\".");
|
||||
particleName = "minecraft:white_ash";
|
||||
|
||||
@@ -47,8 +47,8 @@ public class MathHelper {
|
||||
|| client.isPaused()
|
||||
|| client.world == null
|
||||
|| !client.world.getDimension().isBedWorking()
|
||||
|| Objects.equals(client.world.getBiomeKey(Objects.requireNonNull(client.player).getBlockPos()), Optional.of(LUSH_CAVES))
|
||||
|| Objects.requireNonNull(client.player).isSubmergedInWater())
|
||||
|| Objects.requireNonNull(client.player).isSubmergedInWater()
|
||||
|| client.world.getBiome(Objects.requireNonNull(client.player).getBlockPos()).matchesKey(LUSH_CAVES))
|
||||
{
|
||||
timer = 0;
|
||||
shouldParticlesSpawn = false;
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
package net.lizistired.cavedust.utils;
|
||||
|
||||
import net.lizistired.cavedust.CaveDustConfig;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
import static net.minecraft.world.biome.BiomeKeys.LUSH_CAVES;
|
||||
|
||||
public class ParticleSpawnUtil {
|
||||
private static float timer;
|
||||
public static boolean shouldParticlesSpawn;
|
||||
public static boolean shouldParticlesSpawn(MinecraftClient client, CaveDustConfig config) {
|
||||
|
||||
//checks if the config is enabled, if the game isn't paused, if the world is valid, if the particle is valid and if the player isn't in a lush caves biome
|
||||
if (!config.getCaveDustEnabled()
|
||||
|| client.isPaused()
|
||||
|| client.world == null
|
||||
|| !client.world.getDimension().isBedWorking()
|
||||
|| Objects.equals(client.world.getBiomeKey(Objects.requireNonNull(client.player).getBlockPos()), Optional.of(LUSH_CAVES))
|
||||
|| Objects.requireNonNull(client.player).isSubmergedInWater())
|
||||
{
|
||||
timer = 0;
|
||||
shouldParticlesSpawn = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
World world = client.world;
|
||||
int seaLevel = world.getSeaLevel();
|
||||
|
||||
if (!client.player.clientWorld.isSkyVisible(client.player.getBlockPos())) {
|
||||
if (client.player.getBlockPos().getY() < seaLevel){
|
||||
timer = timer + 1;
|
||||
if (timer > 10){
|
||||
timer = 10;
|
||||
shouldParticlesSpawn = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
shouldParticlesSpawn = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 227 KiB After Width: | Height: | Size: 126 KiB |
@@ -28,7 +28,7 @@
|
||||
"depends": {
|
||||
"fabricloader": ">=0.12.11",
|
||||
"fabric": "*",
|
||||
"minecraft": "<=1.18.1",
|
||||
"minecraft": "1.18.x",
|
||||
"java": ">=17"
|
||||
},
|
||||
"suggests": {
|
||||
@@ -37,7 +37,7 @@
|
||||
"custom": {
|
||||
"modmenu": {
|
||||
"links": {
|
||||
"modmenu.discord": "https://discord.gg/4m6kQSX6bx"
|
||||
"modmenu.discord": "https://discord.gg/AgBfPFMJgX"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user