diff --git a/README.md b/README.md index 9103304..cce0efc 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,10 @@ # Effective-Forge- + Effective mod written for Forge, originally developed by doctor4t for the Fabric mod loader + +This fork updates the mod to Minecraft 1.20.1 and adds support for Rubidium. + +## Disclaimer + +I only created this to be used in a private modpack for a private server. +Without permission from creators of the original Effective mod and the Effective (Forge) mod, I will not be releasing any public builds of this mod, nor will any requests be entertained. diff --git a/build.gradle b/build.gradle index 80b384f..126b5d1 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { mavenCentral() } dependencies { - classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1+', changing: true + classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '[6.0,6.2)', changing: true classpath group: 'org.spongepowered', name: 'mixingradle', version: '0.7-SNAPSHOT' } } @@ -21,6 +21,10 @@ repositories{ name = "ModMaven" url = "https://modmaven.k-4u.nl" } + maven { + name "modrinth" + url "https://api.modrinth.com/maven" + } maven { url "https://www.cursemaven.com" @@ -38,7 +42,7 @@ java.toolchain.languageVersion = JavaLanguageVersion.of(17) println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch')) minecraft { - mappings channel: "official", version: "1.19.2" + mappings channel: "official", version: "1.20.1" runs { @@ -88,8 +92,11 @@ mixin { sourceSets.main.resources { srcDir 'src/generated/resources' } dependencies { - minecraft 'net.minecraftforge:forge:1.19.2-43.1.25' + minecraft 'net.minecraftforge:forge:1.20.1-47.1.47' annotationProcessor 'org.spongepowered:mixin:0.8.5:processor' + + compileOnly fg.deobf("maven.modrinth:rubidium:0.7.1") + runtimeOnly fg.deobf("maven.modrinth:rubidium:0.7.1") //for testing } jar { @@ -120,4 +127,9 @@ publishing { url "file:///${project.projectDir}/mcmodsrepo" } } +} + +wrapper { + gradleVersion = '8.1.1' + distributionType = Wrapper.DistributionType.BIN } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..7f93135 Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..80187ac --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index c53aefa..1aa94a4 100644 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -32,10 +32,10 @@ # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: # * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». # # Important for patching: # @@ -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/. @@ -80,13 +80,11 @@ 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##*/} - -# 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"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,22 +131,29 @@ 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. + if ! command -v java >/dev/null 2>&1 + then + 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 fi # Increase the maximum file descriptors if we can. 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=SC2039,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=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# 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"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ @@ -205,6 +214,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index ac1b06f..6689b85 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/src/main/java/bottomtextdanny/effective_fg/level/WaterfallCloudGenerators.java b/src/main/java/bottomtextdanny/effective_fg/level/WaterfallCloudGenerators.java index 5f4123d..9c35343 100644 --- a/src/main/java/bottomtextdanny/effective_fg/level/WaterfallCloudGenerators.java +++ b/src/main/java/bottomtextdanny/effective_fg/level/WaterfallCloudGenerators.java @@ -1,9 +1,9 @@ package bottomtextdanny.effective_fg.level; import bottomtextdanny.effective_fg.EffectiveFg; +import bottomtextdanny.effective_fg.sound.LinearFadeSound; import bottomtextdanny.effective_fg.tables.EffectiveFgParticles; import bottomtextdanny.effective_fg.tables.EffectiveFgSounds; -import bottomtextdanny.effective_fg.sound.LinearFadeSound; import net.minecraft.client.Camera; import net.minecraft.client.Minecraft; import net.minecraft.client.multiplayer.ClientLevel; @@ -12,99 +12,123 @@ import net.minecraft.sounds.SoundSource; import net.minecraft.util.Mth; import net.minecraft.util.RandomSource; +import net.minecraft.world.level.BlockAndTintGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.FluidState; -import java.util.*; -import java.util.stream.Collectors; +import java.util.Comparator; +import java.util.HashSet; +import java.util.List; +import java.util.Set; public class WaterfallCloudGenerators { public static final Set GENERATORS = new HashSet<>(); private static boolean resolvingWaterfalls; private static Level levelO = null; + public static void onRenderFluid(BlockAndTintGetter level, BlockPos pos, FluidState fluidState) { + if (!EffectiveFg.config().cascades.get()) return; + + BlockState stateDoubleUp = level.getBlockState(pos.offset(0, 2, 0)); + BlockState stateUp = level.getBlockState(pos.offset(0, 1, 0)); + if (fluidState.isSource() + && stateUp.getBlock() == Blocks.WATER + && !stateUp.getFluidState().isSource() + && stateUp.getFluidState().getOwnHeight() >= 0.77f + && stateDoubleUp.is(Blocks.WATER) && !stateDoubleUp.getFluidState().isSource()) { + if (!WaterfallCloudGenerators.isResolvingWaterfalls()) { + addGenerator(BlockPos.containing(pos.getX() + 0.5f, pos.getY() + 0.5f, pos.getZ() + 0.5f)); + } + } + } + public static void addGenerator(BlockPos blockPos) { - GENERATORS.add(blockPos); + synchronized (GENERATORS) { + GENERATORS.add(blockPos); + } } public static void tick() { - if (!EffectiveFg.config().cascades.get()) { - GENERATORS.clear(); - return; - } + synchronized (GENERATORS) { + if (!EffectiveFg.config().cascades.get()) { + GENERATORS.clear(); + return; + } - Minecraft instance = Minecraft.getInstance(); - ClientLevel level = instance.level; - Camera camera = instance.getEntityRenderDispatcher().camera; + Minecraft instance = Minecraft.getInstance(); + ClientLevel level = instance.level; + Camera camera = instance.getEntityRenderDispatcher().camera; - if (instance.isPaused() || level == null || camera == null) return; + if (instance.isPaused() || level == null || camera == null) return; - BlockPos pos = camera.getBlockPosition(); + BlockPos pos = camera.getBlockPosition(); - if (level != levelO) GENERATORS.clear(); + if (level != levelO) GENERATORS.clear(); - levelO = level; + levelO = level; - RandomSource random = level.random; + RandomSource random = level.random; - SoundManager soundManager = instance.getSoundManager(); - float cascadeRange = EffectiveFg.config().cascadeSoundRange.get().floatValue(); - float cascadeRangeSquared = cascadeRange * cascadeRange; + SoundManager soundManager = instance.getSoundManager(); + float cascadeRange = EffectiveFg.config().cascadeSoundRange.get().floatValue(); + float cascadeRangeSquared = cascadeRange * cascadeRange; - resolvingWaterfalls = true; - int maxGeneratorDistance = Mth.square((Math.max(instance.options.renderDistance().get(), instance.options.simulationDistance().get()) + 1) * 16); - int[] soundCounter = {1}; + resolvingWaterfalls = true; + int maxGeneratorDistance = Mth.square((Math.max(instance.options.renderDistance().get(), instance.options.simulationDistance().get()) + 1) * 16); + int[] soundCounter = {1}; - GENERATORS.removeIf(blockPos -> { - int x = pos.getX() - blockPos.getX(); - int z = pos.getZ() - blockPos.getZ(); - int dist = x * x + z * z; - if (dist >= maxGeneratorDistance) return true; + GENERATORS.removeIf(blockPos -> { + int x = pos.getX() - blockPos.getX(); + int z = pos.getZ() - blockPos.getZ(); + int dist = x * x + z * z; + if (dist >= maxGeneratorDistance) return true; - BlockState stateUp = level.getBlockState(blockPos.offset(0, 1, 0)); - BlockState stateDoubleUp = level.getBlockState(blockPos.offset(0, 2, 0)); - BlockState state = level.getBlockState(blockPos); + BlockState stateUp = level.getBlockState(blockPos.offset(0, 1, 0)); + BlockState stateDoubleUp = level.getBlockState(blockPos.offset(0, 2, 0)); + BlockState state = level.getBlockState(blockPos); - return !(state.getBlock() == Blocks.WATER - && state.getBlock() == Blocks.WATER - && stateUp.getBlock() == Blocks.WATER - && !stateUp.getFluidState().isSource() - && stateUp.getFluidState().getOwnHeight() >= EffectiveFg.FLOWING_WATER_SHOULD_BEHAVE_AT_HEIGHT - && stateDoubleUp.is(Blocks.WATER) - && !stateDoubleUp.getFluidState().isSource()); - }); + return !(state.getBlock() == Blocks.WATER + && state.getBlock() == Blocks.WATER + && stateUp.getBlock() == Blocks.WATER + && !stateUp.getFluidState().isSource() + && stateUp.getFluidState().getOwnHeight() >= EffectiveFg.FLOWING_WATER_SHOULD_BEHAVE_AT_HEIGHT + && stateDoubleUp.is(Blocks.WATER) + && !stateDoubleUp.getFluidState().isSource()); + }); - List generators = GENERATORS.stream().sorted(Comparator.comparingDouble(bp -> bp.distSqr(pos))).collect(Collectors.toList()); + List generators = GENERATORS.stream().sorted(Comparator.comparingDouble(bp -> bp.distSqr(pos))).toList(); - generators.forEach(blockPos -> { - double dist = blockPos.distSqr(pos); + generators.forEach(blockPos -> { + double dist = blockPos.distSqr(pos); - double offsetX = random.nextDouble() / 5.0 + 0.2; - offsetX = random.nextBoolean() ? offsetX : -offsetX; - double offsetZ = random.nextDouble() / 5.0 + 0.2; - offsetZ = random.nextBoolean() ? offsetZ : -offsetZ; + double offsetX = random.nextDouble() / 5.0 + 0.2; + offsetX = random.nextBoolean() ? offsetX : -offsetX; + double offsetZ = random.nextDouble() / 5.0 + 0.2; + offsetZ = random.nextBoolean() ? offsetZ : -offsetZ; - if (((int)level.getGameTime()) % (soundCounter[0] * 7) == 0 && dist < cascadeRangeSquared) { - soundManager.play(new LinearFadeSound(EffectiveFgSounds.AMBIENCE_WATERFALL, SoundSource.AMBIENT, cascadeRange, 1.0F, blockPos.getX(), blockPos.getY(), blockPos.getZ())); - } + if (((int)level.getGameTime()) % (soundCounter[0] * 7) == 0 && dist < cascadeRangeSquared) { + soundManager.play(new LinearFadeSound(EffectiveFgSounds.AMBIENCE_WATERFALL, SoundSource.AMBIENT, cascadeRange, 1.0F, blockPos.getX(), blockPos.getY(), blockPos.getZ())); + } - if (random.nextFloat() < EffectiveFg.config().cascadeParticleAmountMultiplier.get()) { - EffectiveFgParticles.WATERFALL_CLOUD.create(level, - blockPos.getX() + 0.5 + offsetX, - blockPos.getY() + 1.0 + random.nextFloat(), - blockPos.getZ() + 0.5 + offsetZ, - random.nextFloat() / 5.0 * Math.signum(offsetX), - random.nextFloat() / 5.0, - random.nextFloat() / 5.0 * Math.signum(offsetZ) - ); - } + if (random.nextFloat() < EffectiveFg.config().cascadeParticleAmountMultiplier.get()) { + EffectiveFgParticles.WATERFALL_CLOUD.create(level, + blockPos.getX() + 0.5 + offsetX, + blockPos.getY() + 1.0 + random.nextFloat(), + blockPos.getZ() + 0.5 + offsetZ, + random.nextFloat() / 5.0 * Math.signum(offsetX), + random.nextFloat() / 5.0, + random.nextFloat() / 5.0 * Math.signum(offsetZ) + ); + } - soundCounter[0] += random.nextInt(2) + 1; - }); + soundCounter[0] += random.nextInt(2) + 1; + }); - resolvingWaterfalls = false; + resolvingWaterfalls = false; + } } public static boolean isResolvingWaterfalls() { diff --git a/src/main/java/bottomtextdanny/effective_fg/mixin/EntityMixin.java b/src/main/java/bottomtextdanny/effective_fg/mixin/EntityMixin.java index 4e9b343..b8cb93d 100644 --- a/src/main/java/bottomtextdanny/effective_fg/mixin/EntityMixin.java +++ b/src/main/java/bottomtextdanny/effective_fg/mixin/EntityMixin.java @@ -68,9 +68,9 @@ protected void onSwimmingStart(CallbackInfo callbackInfo) { float g = Math.min(1.0f, (float) Math.sqrt(vec3d.x * vec3d.x * (double) 0.2f + vec3d.y * vec3d.y + vec3d.z * vec3d.z * (double) 0.2f) * f); if (g > EffectiveFg.SPLASH_SPEED_WATER_THRESHOLD) { for (int i = -10; i < 10; i++) { - BlockPos pos = new BlockPos(this.getX(), Math.round(this.getY()) + i, this.getZ()); + BlockPos pos = BlockPos.containing(this.getX(), Math.round(this.getY()) + i, this.getZ()); if (level.getBlockState(pos).getFluidState().isSource() - && level.getBlockState(new BlockPos(this.getX(), Math.round(this.getY()) + i + 1, this.getZ())).isAir()) { + && level.getBlockState(BlockPos.containing(this.getX(), Math.round(this.getY()) + i + 1, this.getZ())).isAir()) { float width = EffectUtil.splashWidth(entity); float height = EffectUtil.splashHeight(width, entity); @@ -102,16 +102,16 @@ public void tick(CallbackInfo callbackInfo) { if (!(this.level instanceof ClientLevel)) return; ClientLevel level = (ClientLevel) this.level; - if (!this.onGround && !this.isInWater() && !this.isInLava() && level.getBlockState(this.blockPosition().offset(this.getDeltaMovement().x, this.getDeltaMovement().y, this.getDeltaMovement().z)).getBlock() == Blocks.LAVA) { + if (!this.onGround && !this.isInWater() && !this.isInLava() && level.getBlockState(this.blockPosition().offset((int) this.getDeltaMovement().x, (int) this.getDeltaMovement().y, (int) this.getDeltaMovement().z)).getBlock() == Blocks.LAVA) { Entity entity = !this.getPassengers().isEmpty() && this.getFirstPassenger() != null ? this.getFirstPassenger() : (Entity) (Object) this; float f = entity == (Object) this ? 0.2f : 0.9f; Vec3 vec3d = entity.getDeltaMovement(); float g = Math.min(1.0f, (float) Math.sqrt(vec3d.x * vec3d.x * (double) 0.2f + vec3d.y * vec3d.y + vec3d.z * vec3d.z * (double) 0.2f) * f); if (g > EffectiveFg.SPLASH_SPEED_LAVA_THRESHOLD) { for (int i = -10; i < 10; i++) { - if (level.getBlockState(new BlockPos(this.getX(), Math.round(this.getY()) + i, this.getZ())).getBlock() == Blocks.LAVA - && level.getBlockState(new BlockPos(this.getX(), Math.round(this.getY()) + i, this.getZ())).getFluidState().isSource() - && level.getBlockState(new BlockPos(this.getX(), Math.round(this.getY()) + i + 1, this.getZ())).isAir()) { + if (level.getBlockState(BlockPos.containing(this.getX(), Math.round(this.getY()) + i, this.getZ())).getBlock() == Blocks.LAVA + && level.getBlockState(BlockPos.containing(this.getX(), Math.round(this.getY()) + i, this.getZ())).getFluidState().isSource() + && level.getBlockState(BlockPos.containing(this.getX(), Math.round(this.getY()) + i + 1, this.getZ())).isAir()) { float width = EffectUtil.splashWidth(entity); float height = EffectUtil.splashHeight(width, entity); diff --git a/src/main/java/bottomtextdanny/effective_fg/mixin/LiquidBlockRendererMixin.java b/src/main/java/bottomtextdanny/effective_fg/mixin/LiquidBlockRendererMixin.java index 3a6ba08..c04d788 100644 --- a/src/main/java/bottomtextdanny/effective_fg/mixin/LiquidBlockRendererMixin.java +++ b/src/main/java/bottomtextdanny/effective_fg/mixin/LiquidBlockRendererMixin.java @@ -20,19 +20,6 @@ public class LiquidBlockRendererMixin { @Inject(method = "tesselate", at = @At("TAIL")) public void renderFluid(BlockAndTintGetter level, BlockPos pos, VertexConsumer buffer, BlockState state, FluidState fluidState, CallbackInfo ci) { - if (!EffectiveFg.config().cascades.get()) return; - - BlockState stateDoubleUp = level.getBlockState(pos.offset(0, 2, 0)); - BlockState stateUp = level.getBlockState(pos.offset(0, 1, 0)); - if (state.getBlock() == Blocks.WATER - && fluidState.isSource() - && stateUp.getBlock() == Blocks.WATER - && !stateUp.getFluidState().isSource() - && stateUp.getFluidState().getOwnHeight() >= 0.77f - && stateDoubleUp.is(Blocks.WATER) && !stateDoubleUp.getFluidState().isSource()) { - if (!WaterfallCloudGenerators.isResolvingWaterfalls()) { - WaterfallCloudGenerators.addGenerator(new BlockPos(pos.getX() + 0.5f, pos.getY() + 0.5f, pos.getZ() + 0.5f)); - } - } + WaterfallCloudGenerators.onRenderFluid(level, pos, fluidState); } } diff --git a/src/main/java/bottomtextdanny/effective_fg/mixin/integration/rubidium/FluidRendererMixin.java b/src/main/java/bottomtextdanny/effective_fg/mixin/integration/rubidium/FluidRendererMixin.java new file mode 100644 index 0000000..440e783 --- /dev/null +++ b/src/main/java/bottomtextdanny/effective_fg/mixin/integration/rubidium/FluidRendererMixin.java @@ -0,0 +1,23 @@ +package bottomtextdanny.effective_fg.mixin.integration.rubidium; + + +import bottomtextdanny.effective_fg.level.WaterfallCloudGenerators; +import me.jellysquid.mods.sodium.client.render.chunk.compile.ChunkBuildBuffers; +import me.jellysquid.mods.sodium.client.render.chunk.compile.pipeline.FluidRenderer; +import me.jellysquid.mods.sodium.client.world.WorldSlice; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.material.FluidState; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +@Mixin(value = FluidRenderer.class, remap = false) +public class FluidRendererMixin { + + @Inject(method = "render", at = @At("HEAD")) + public void renderFluid(WorldSlice world, FluidState fluidState, BlockPos blockPos, BlockPos offset, ChunkBuildBuffers buffers, CallbackInfo ci) + { + WaterfallCloudGenerators.onRenderFluid(world, blockPos, fluidState); + } +} \ No newline at end of file diff --git a/src/main/java/bottomtextdanny/effective_fg/particle/DropletParticle.java b/src/main/java/bottomtextdanny/effective_fg/particle/DropletParticle.java index c01b871..0c24636 100644 --- a/src/main/java/bottomtextdanny/effective_fg/particle/DropletParticle.java +++ b/src/main/java/bottomtextdanny/effective_fg/particle/DropletParticle.java @@ -2,8 +2,7 @@ import bottomtextdanny.effective_fg.tables.EffectiveFgParticles; import com.mojang.blaze3d.vertex.VertexConsumer; -import com.mojang.math.Quaternion; -import com.mojang.math.Vector3f; +import com.mojang.math.Axis; import net.minecraft.client.Camera; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.particle.*; @@ -12,6 +11,8 @@ import net.minecraft.util.Mth; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.phys.Vec3; +import org.joml.Quaternionf; +import org.joml.Vector3f; public class DropletParticle extends TextureSheetParticle { private final SpriteSet sprites; @@ -47,13 +48,13 @@ public void tick() { ClientLevel level = this.level; - if (this.onGround || (this.age > 5 && level.getBlockState(new BlockPos(this.x, this.y + this.yd, this.z)).getBlock() == Blocks.WATER)) { + if (this.onGround || (this.age > 5 && level.getBlockState(BlockPos.containing(this.x, this.y + this.yd, this.z)).getBlock() == Blocks.WATER)) { this.remove(); } - if (level.getBlockState(new BlockPos(this.x, this.y + this.yd, this.z)).getBlock() == Blocks.WATER && level.getBlockState(new BlockPos(this.x, this.y, this.z)).isAir()) { + if (level.getBlockState(BlockPos.containing(this.x, this.y + this.yd, this.z)).getBlock() == Blocks.WATER && level.getBlockState(BlockPos.containing(this.x, this.y, this.z)).isAir()) { for (int i = 0; i > -10; i--) { - if (level.getBlockState(new BlockPos(this.x, Math.round(this.y) + i, this.z)).getBlock() == Blocks.WATER && level.getBlockState(new BlockPos(this.x, Math.round(this.y) + i, this.z)).getFluidState().isSource() && level.getBlockState(new BlockPos(this.x, Math.round(this.y) + i + 1, this.z)).isAir()) { + if (level.getBlockState(BlockPos.containing(this.x, Math.round(this.y) + i, this.z)).getBlock() == Blocks.WATER && level.getBlockState(BlockPos.containing(this.x, Math.round(this.y) + i, this.z)).getFluidState().isSource() && level.getBlockState(BlockPos.containing(this.x, Math.round(this.y) + i + 1, this.z)).isAir()) { EffectiveFgParticles.RIPPLE.create(level, this.x, Math.round(this.y) + i + 0.9f, this.z, 0, 0, 0); @@ -78,17 +79,17 @@ public void render(VertexConsumer vertexConsumer, Camera camera, float tickDelta float f = (float) (Mth.lerp(tickDelta, this.xo, this.x) - vec3d.x()); float g = (float) (Mth.lerp(tickDelta, this.yo, this.y) - vec3d.y()); float h = (float) (Mth.lerp(tickDelta, this.zo, this.z) - vec3d.z()); - Quaternion quaternion2; + Quaternionf quaternion2; if (this.roll == 0.0F) { quaternion2 = camera.rotation(); } else { - quaternion2 = new Quaternion(camera.rotation()); + quaternion2 = new Quaternionf(camera.rotation()); float i = Mth.lerp(tickDelta, this.oRoll, this.roll); - quaternion2.mul(Vector3f.ZP.rotationDegrees(i)); + quaternion2.mul(Axis.ZP.rotationDegrees(i)); } Vector3f vec3f = new Vector3f(-1.0F, -1.0F, 0.0F); - vec3f.transform(quaternion2); + vec3f = quaternion2.transform(vec3f); Vector3f[] Vec3fs = new Vector3f[]{ new Vector3f(-1.0F, -1.0F, 0.0F), new Vector3f(-1.0F, 1.0F, 0.0F), @@ -98,7 +99,7 @@ public void render(VertexConsumer vertexConsumer, Camera camera, float tickDelta for (int k = 0; k < 4; ++k) { Vector3f Vec3f2 = Vec3fs[k]; - Vec3f2.transform(quaternion2); + Vec3f2 = quaternion2.transform(Vec3f2); Vec3f2.mul(j); Vec3f2.add(f, g, h); } diff --git a/src/main/java/bottomtextdanny/effective_fg/particle/RippleParticle.java b/src/main/java/bottomtextdanny/effective_fg/particle/RippleParticle.java index b786ea7..a92901b 100644 --- a/src/main/java/bottomtextdanny/effective_fg/particle/RippleParticle.java +++ b/src/main/java/bottomtextdanny/effective_fg/particle/RippleParticle.java @@ -1,14 +1,15 @@ package bottomtextdanny.effective_fg.particle; import com.mojang.blaze3d.vertex.VertexConsumer; -import com.mojang.math.Quaternion; -import com.mojang.math.Vector3f; +import com.mojang.math.Axis; import net.minecraft.client.Camera; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.particle.*; import net.minecraft.core.particles.SimpleParticleType; import net.minecraft.util.Mth; import net.minecraft.world.phys.Vec3; +import org.joml.Quaternionf; +import org.joml.Vector3f; import java.util.Random; @@ -53,23 +54,25 @@ public void render(VertexConsumer vertexConsumer, Camera camera, float tickDelta float f = (float) (Mth.lerp(tickDelta, this.xo, this.x) - vec3d.x()); float g = (float) (Mth.lerp(tickDelta, this.yo, this.y) - vec3d.y()); float h = (float) (Mth.lerp(tickDelta, this.zo, this.z) - vec3d.z()); - Quaternion quaternion2; + Quaternionf quaternion2; if (this.roll == 0.0F) { quaternion2 = camera.rotation(); } else { - quaternion2 = new Quaternion(camera.rotation()); + quaternion2 = new Quaternionf(camera.rotation()); float i = Mth.lerp(tickDelta, this.oRoll, this.roll); - quaternion2.mul(Vector3f.ZP.rotationDegrees(i)); + quaternion2.mul(Axis.ZP.rotationDegrees(i)); } Vector3f Vector3f = new Vector3f(-1.0F, -1.0F, 0.0F); - Vector3f.transform(quaternion2); + Vector3f = quaternion2.transform(Vector3f); Vector3f[] Vector3fs = new Vector3f[]{new Vector3f(-1.0F, -1.0F, 0.0F), new Vector3f(-1.0F, 1.0F, 0.0F), new Vector3f(1.0F, 1.0F, 0.0F), new Vector3f(1.0F, -1.0F, 0.0F)}; float j = this.getQuadSize(tickDelta); for (int k = 0; k < 4; ++k) { + Quaternionf quaternion = new Quaternionf(); + quaternion.rotateX(Mth.PI / 2f); Vector3f Vector3f2 = Vector3fs[k]; - Vector3f2.transform(new Quaternion(90f, 0f, 0f, true)); + Vector3f2 = quaternion.transform(Vector3f2); Vector3f2.mul(j); Vector3f2.add(f, g, h); } diff --git a/src/main/java/bottomtextdanny/effective_fg/particle/SplashParticle.java b/src/main/java/bottomtextdanny/effective_fg/particle/SplashParticle.java index 61c2389..e3aeaec 100644 --- a/src/main/java/bottomtextdanny/effective_fg/particle/SplashParticle.java +++ b/src/main/java/bottomtextdanny/effective_fg/particle/SplashParticle.java @@ -37,7 +37,7 @@ public SplashParticle(ClientLevel level, double x, double y, double z, SpriteSet this.widthMultiplier = width; this.heightMultiplier = height; - int waterColor = BiomeColors.getAverageWaterColor(level, new BlockPos(x, y, z)); + int waterColor = BiomeColors.getAverageWaterColor(level, BlockPos.containing(x, y, z)); r = (float) (waterColor >> 16 & 0xFF) / 255.0f; g = (float) (waterColor >> 8 & 0xFF) / 255.0f; diff --git a/src/main/java/bottomtextdanny/effective_fg/particle/WaterfallCloudParticle.java b/src/main/java/bottomtextdanny/effective_fg/particle/WaterfallCloudParticle.java index 0b940fa..1ab649d 100644 --- a/src/main/java/bottomtextdanny/effective_fg/particle/WaterfallCloudParticle.java +++ b/src/main/java/bottomtextdanny/effective_fg/particle/WaterfallCloudParticle.java @@ -53,7 +53,7 @@ public void tick() { this.zd *= 0.5f; } - if (this.onGround || (this.age > 10 && this.level.getBlockState(new BlockPos(this.x, this.y + this.yd, this.z)).getBlock() == Blocks.WATER)) { + if (this.onGround || (this.age > 10 && this.level.getBlockState(BlockPos.containing(this.x, this.y + this.yd, this.z)).getBlock() == Blocks.WATER)) { this.alpha -= 0.1f; this.xd *= 0.5f; this.yd *= 0.5f; @@ -64,7 +64,7 @@ public void tick() { this.remove(); } - if (this.level.getBlockState(new BlockPos(this.x, this.y + this.yd, this.z)).getBlock() == Blocks.WATER && this.level.getBlockState(new BlockPos(this.x, this.y, this.z)).isAir()) { + if (this.level.getBlockState(BlockPos.containing(this.x, this.y + this.yd, this.z)).getBlock() == Blocks.WATER && this.level.getBlockState(BlockPos.containing(this.x, this.y, this.z)).isAir()) { this.xd *= 0.9; this.yd *= 0.9; this.zd *= 0.9; diff --git a/src/main/java/bottomtextdanny/effective_fg/particle_manager/ParticleStitcher.java b/src/main/java/bottomtextdanny/effective_fg/particle_manager/ParticleStitcher.java index 77b9bd2..c253a7b 100644 --- a/src/main/java/bottomtextdanny/effective_fg/particle_manager/ParticleStitcher.java +++ b/src/main/java/bottomtextdanny/effective_fg/particle_manager/ParticleStitcher.java @@ -12,18 +12,9 @@ public class ParticleStitcher { public ParticleStitcher(IEventBus bus, List> particleManagers) { this.particleManagers = ImmutableList.copyOf(particleManagers); - bus.addListener(this::onTextureAtlasPre); bus.addListener(this::onTextureAtlasPost); } - private void onTextureAtlasPre(TextureStitchEvent.Pre event){ - if (event.getAtlas().location().equals(TextureAtlas.LOCATION_PARTICLES)) { - particleManagers.forEach(manager -> { - manager.textures.forEach(event::addSprite); - }); - } - } - private void onTextureAtlasPost(TextureStitchEvent.Post event){ if (event.getAtlas().location().equals(TextureAtlas.LOCATION_PARTICLES)) { particleManagers.forEach(manager -> { diff --git a/src/main/java/bottomtextdanny/effective_fg/tables/EffectiveFgParticles.java b/src/main/java/bottomtextdanny/effective_fg/tables/EffectiveFgParticles.java index fe3be78..ed19595 100644 --- a/src/main/java/bottomtextdanny/effective_fg/tables/EffectiveFgParticles.java +++ b/src/main/java/bottomtextdanny/effective_fg/tables/EffectiveFgParticles.java @@ -15,45 +15,45 @@ public class EffectiveFgParticles { public static final ParticleManager DROPLET = new ParticleManager<>( - NoParticleData.INST, List.of(new ResourceLocation(EffectiveFg.ID, "particle/droplet")), - (data, sprites, level, x, y, z, xDelta, yDelta, zDelta) -> { - return new DropletParticle(level, x, y, z, xDelta, yDelta, zDelta, sprites); - } + NoParticleData.INST, List.of(new ResourceLocation(EffectiveFg.ID, "droplet")), + (data, sprites, level, x, y, z, xDelta, yDelta, zDelta) -> { + return new DropletParticle(level, x, y, z, xDelta, yDelta, zDelta, sprites); + } ); public static final ParticleManager LAVA_SPLASH = new ParticleManager<>( - new SplashParticleData(1.0F, 1.0F), serial("lava_splash", 13), - (data, sprites, level, x, y, z, xDelta, yDelta, zDelta) -> { - return new LavaSplashParticle(level, x, y, z, sprites, data.width, data.height); - } + new SplashParticleData(1.0F, 1.0F), serial("lava_splash", 13), + (data, sprites, level, x, y, z, xDelta, yDelta, zDelta) -> { + return new LavaSplashParticle(level, x, y, z, sprites, data.width, data.height); + } ); public static final ParticleManager RIPPLE = new ParticleManager<>( - NoParticleData.INST, serial("ripple", 8), - (data, sprites, level, x, y, z, xDelta, yDelta, zDelta) -> { - return new RippleParticle(level, x, y, z, xDelta, yDelta, zDelta, sprites); - } + NoParticleData.INST, serial("ripple", 8), + (data, sprites, level, x, y, z, xDelta, yDelta, zDelta) -> { + return new RippleParticle(level, x, y, z, xDelta, yDelta, zDelta, sprites); + } ); public static final ParticleManager SPLASH = new ParticleManager<>( - new SplashParticleData(1.0F, 1.0F), serial("splash", 13), - (data, sprites, level, x, y, z, xDelta, yDelta, zDelta) -> { - return new SplashParticle(level, x, y, z, sprites, data.width, data.height); - } + new SplashParticleData(1.0F, 1.0F), serial("splash", 13), + (data, sprites, level, x, y, z, xDelta, yDelta, zDelta) -> { + return new SplashParticle(level, x, y, z, sprites, data.width, data.height); + } ); public static final ParticleManager WATERFALL_CLOUD = new ParticleManager<>( - NoParticleData.INST, serial("waterfall_cloud", 12), - (data, sprites, level, x, y, z, xDelta, yDelta, zDelta) -> { - return new WaterfallCloudParticle(level, x, y, z, xDelta, yDelta, zDelta, sprites); - } + NoParticleData.INST, serial("waterfall_cloud", 12), + (data, sprites, level, x, y, z, xDelta, yDelta, zDelta) -> { + return new WaterfallCloudParticle(level, x, y, z, xDelta, yDelta, zDelta, sprites); + } ); private static List serial(String name, int size) { List textures = new LinkedList<>(); for (int i = 0; i < size; i++) { - textures.add(new ResourceLocation(EffectiveFg.ID, "particle/" + name + '_' + i)); + textures.add(new ResourceLocation(EffectiveFg.ID, name + '_' + i)); } return textures; diff --git a/src/main/java/bottomtextdanny/effective_fg/util/ParticleVoxel.java b/src/main/java/bottomtextdanny/effective_fg/util/ParticleVoxel.java index afa256d..2e3f1b7 100644 --- a/src/main/java/bottomtextdanny/effective_fg/util/ParticleVoxel.java +++ b/src/main/java/bottomtextdanny/effective_fg/util/ParticleVoxel.java @@ -2,15 +2,16 @@ import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; -import com.mojang.math.Matrix3f; -import com.mojang.math.Matrix4f; -import com.mojang.math.Vector3f; -import com.mojang.math.Vector4f; +import com.mojang.math.Axis; +import org.joml.Matrix3f; +import org.joml.Matrix4f; import it.unimi.dsi.fastutil.objects.ObjectArrayList; import it.unimi.dsi.fastutil.objects.ObjectList; import net.minecraft.core.Direction; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; +import org.joml.Vector3f; +import org.joml.Vector4f; import java.util.function.BiConsumer; @@ -51,15 +52,15 @@ public void translateRotateWithParents(PoseStack matrixStackIn) { matrixStackIn.translate((double)(this.x / 16.0F), (double)(this.y / 16.0F), (double)(this.z / 16.0F)); if (this.zRot != 0.0F) { - matrixStackIn.mulPose(Vector3f.ZP.rotation(this.zRot)); + matrixStackIn.mulPose(Axis.ZP.rotation(this.zRot)); } if (this.yRot != 0.0F) { - matrixStackIn.mulPose(Vector3f.YP.rotation(this.yRot)); + matrixStackIn.mulPose(Axis.YP.rotation(this.yRot)); } if (this.xRot != 0.0F) { - matrixStackIn.mulPose(Vector3f.XP.rotation(this.xRot)); + matrixStackIn.mulPose(Axis.XP.rotation(this.xRot)); } } @@ -185,15 +186,15 @@ public void render(PoseStack matrixStackIn, VertexConsumer bufferIn, int packedL public void translateRotate(PoseStack matrixStackIn) { matrixStackIn.translate((double)(this.x / 16.0F), (double)(this.y / 16.0F), (double)(this.z / 16.0F)); if (this.zRot != 0.0F) { - matrixStackIn.mulPose(Vector3f.ZP.rotation(this.zRot)); + matrixStackIn.mulPose(Axis.ZP.rotation(this.zRot)); } if (this.yRot != 0.0F) { - matrixStackIn.mulPose(Vector3f.YP.rotation(this.yRot)); + matrixStackIn.mulPose(Axis.YP.rotation(this.yRot)); } if (this.xRot != 0.0F) { - matrixStackIn.mulPose(Vector3f.XP.rotation(this.xRot)); + matrixStackIn.mulPose(Axis.XP.rotation(this.xRot)); } } @@ -204,8 +205,8 @@ private void doRender(PoseStack.Pose matrixEntryIn, VertexConsumer bufferIn, int for (ModelBox modelrenderer$modelbox : this.cubeList) { for (TexturedQuad modelrenderer$texturedquad : modelrenderer$modelbox.quads) { - Vector3f vector3f = modelrenderer$texturedquad.normal.copy(); - vector3f.transform(matrix3f); + Vector3f vector3f = new Vector3f(modelrenderer$texturedquad.normal); + vector3f = matrix3f.transform(vector3f); float f = vector3f.x(); float f1 = vector3f.y(); float f2 = vector3f.z(); @@ -217,7 +218,7 @@ private void doRender(PoseStack.Pose matrixEntryIn, VertexConsumer bufferIn, int float f4 = positiontexturevertex.position.y() / 16.0F; float f5 = positiontexturevertex.position.z() / 16.0F; Vector4f vector4f = new Vector4f(f3, f4, f5, 1.0F); - vector4f.transform(matrix4f); + vector4f = matrix4f.transform(vector4f); float finalU = ((u1 - u0) * positiontexturevertex.textureU) + u0; float finalV = ((v1 - v0) * positiontexturevertex.textureV) + v0; @@ -240,7 +241,7 @@ private void doRender(PoseStack.Pose matrixEntryIn, VertexConsumer bufferIn, int float f4 = positiontexturevertex.position.y() / 16.0F; float f5 = positiontexturevertex.position.z() / 16.0F; Vector4f vector4f = new Vector4f(f3, f4, f5, 1.0F); - vector4f.transform(matrix4f); + vector4f = matrix4f.transform(vector4f); float finalU = ((u1 - u0) * positiontexturevertex.textureU) + u0; float finalV = ((v1 - v0) * positiontexturevertex.textureV) + v0; @@ -339,7 +340,7 @@ public ModelBox(int texOffX, int texOffY, float x, float y, float z, float width x = f3; } - + PositionTextureVertex modelrenderer$positiontexturevertex7 = new PositionTextureVertex(x, y, zPlusDepth, 0.0F, 8.0F); PositionTextureVertex modelrenderer$positiontexturevertex = new PositionTextureVertex(xPlusWidth, y, zPlusDepth, 8.0F, 0.0F); PositionTextureVertex modelrenderer$positiontexturevertex1 = new PositionTextureVertex(xPlusWidth, yPlusHeight, zPlusDepth, 0.0F, 0.0F); diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 8141dd8..eb5f9be 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -24,3 +24,9 @@ A client-side mod adding ambient and environmental interaction effects to enhanc versionRange="[1.19,)" ordering="NONE" side="CLIENT" +[[dependencies.effective_fg]] + modId="rubidium" + mandatory=false + versionRange="[0.7.0,)" + ordering="AFTER" + side="CLIENT" diff --git a/src/main/resources/assets/effective_fg/atlases/particles.json b/src/main/resources/assets/effective_fg/atlases/particles.json new file mode 100644 index 0000000..5a944d3 --- /dev/null +++ b/src/main/resources/assets/effective_fg/atlases/particles.json @@ -0,0 +1,9 @@ +{ + "sources": [ + { + "type": "directory", + "source": "particle", + "prefix": "" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/effective_fg/particles/droplet.json b/src/main/resources/assets/effective_fg/particles/droplet.json new file mode 100644 index 0000000..c25521a --- /dev/null +++ b/src/main/resources/assets/effective_fg/particles/droplet.json @@ -0,0 +1,5 @@ +{ + "textures": [ + "effective_fg:particle/droplet" + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/effective_fg/particles/foam.json b/src/main/resources/assets/effective_fg/particles/foam.json new file mode 100644 index 0000000..b4781fc --- /dev/null +++ b/src/main/resources/assets/effective_fg/particles/foam.json @@ -0,0 +1,5 @@ +{ + "textures": [ + "effective_fg:particle/foam" + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/effective_fg/particles/lava_splash.json b/src/main/resources/assets/effective_fg/particles/lava_splash.json new file mode 100644 index 0000000..3e752ef --- /dev/null +++ b/src/main/resources/assets/effective_fg/particles/lava_splash.json @@ -0,0 +1,17 @@ +{ + "textures": [ + "effective_fg:particle/lava_splash_0", + "effective_fg:particle/lava_splash_1", + "effective_fg:particle/lava_splash_2", + "effective_fg:particle/lava_splash_3", + "effective_fg:particle/lava_splash_4", + "effective_fg:particle/lava_splash_5", + "effective_fg:particle/lava_splash_6", + "effective_fg:particle/lava_splash_7", + "effective_fg:particle/lava_splash_8", + "effective_fg:particle/lava_splash_9", + "effective_fg:particle/lava_splash_10", + "effective_fg:particle/lava_splash_11", + "effective_fg:particle/lava_splash_12" + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/effective_fg/particles/ripple.json b/src/main/resources/assets/effective_fg/particles/ripple.json new file mode 100644 index 0000000..5bf5675 --- /dev/null +++ b/src/main/resources/assets/effective_fg/particles/ripple.json @@ -0,0 +1,12 @@ +{ + "textures": [ + "effective_fg:particle/ripple_0", + "effective_fg:particle/ripple_1", + "effective_fg:particle/ripple_2", + "effective_fg:particle/ripple_3", + "effective_fg:particle/ripple_4", + "effective_fg:particle/ripple_5", + "effective_fg:particle/ripple_6", + "effective_fg:particle/ripple_7" + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/effective_fg/particles/splash.json b/src/main/resources/assets/effective_fg/particles/splash.json new file mode 100644 index 0000000..c13bb20 --- /dev/null +++ b/src/main/resources/assets/effective_fg/particles/splash.json @@ -0,0 +1,17 @@ +{ + "textures": [ + "effective_fg:particle/splash_0", + "effective_fg:particle/splash_1", + "effective_fg:particle/splash_2", + "effective_fg:particle/splash_3", + "effective_fg:particle/splash_4", + "effective_fg:particle/splash_5", + "effective_fg:particle/splash_6", + "effective_fg:particle/splash_7", + "effective_fg:particle/splash_8", + "effective_fg:particle/splash_9", + "effective_fg:particle/splash_10", + "effective_fg:particle/splash_11", + "effective_fg:particle/splash_12" + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/effective_fg/particles/waterfall_cloud.json b/src/main/resources/assets/effective_fg/particles/waterfall_cloud.json new file mode 100644 index 0000000..1fad3b7 --- /dev/null +++ b/src/main/resources/assets/effective_fg/particles/waterfall_cloud.json @@ -0,0 +1,16 @@ +{ + "textures": [ + "effective_fg:particle/waterfall_cloud_0", + "effective_fg:particle/waterfall_cloud_1", + "effective_fg:particle/waterfall_cloud_2", + "effective_fg:particle/waterfall_cloud_3", + "effective_fg:particle/waterfall_cloud_4", + "effective_fg:particle/waterfall_cloud_5", + "effective_fg:particle/waterfall_cloud_6", + "effective_fg:particle/waterfall_cloud_7", + "effective_fg:particle/waterfall_cloud_8", + "effective_fg:particle/waterfall_cloud_9", + "effective_fg:particle/waterfall_cloud_10", + "effective_fg:particle/waterfall_cloud_11" + ] +} \ No newline at end of file diff --git a/src/main/resources/effective_fg.mixins.json b/src/main/resources/effective_fg.mixins.json index 6d305d9..118f866 100644 --- a/src/main/resources/effective_fg.mixins.json +++ b/src/main/resources/effective_fg.mixins.json @@ -7,7 +7,8 @@ "client": [ "EntityMixin", "LiquidBlockRendererMixin", - "WaterFluidMixin" + "WaterFluidMixin", + "integration.rubidium.FluidRendererMixin" ], "injectors": { "defaultRequire": 1 diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta index b18e3cd..d461b97 100644 --- a/src/main/resources/pack.mcmeta +++ b/src/main/resources/pack.mcmeta @@ -1,6 +1,6 @@ { "pack": { - "description": "examplemod resources", - "pack_format": 8 + "description": "effective_fg resources", + "pack_format": 15 } }