From 74e24d3c05f90df2ea49c0fb7876a249582a2c70 Mon Sep 17 00:00:00 2001 From: maple! Date: Mon, 24 Jun 2024 15:12:05 +0200 Subject: [PATCH] trough changes and description update --- gradle.properties | 2 +- .../rounded/mixin/TroughFallCancelMixin.java | 12 +++++++++--- src/main/resources/fabric.mod.json | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/gradle.properties b/gradle.properties index 5ee2776..58538cc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,7 +10,7 @@ yarn_mappings=1.21+build.2 loader_version=0.15.11 # Mod Properties -mod_version=1.0.0 +mod_version=1.0.1 maven_group=com.lumiscosity.rounded archives_base_name=rounded diff --git a/src/main/java/com/lumiscosity/rounded/mixin/TroughFallCancelMixin.java b/src/main/java/com/lumiscosity/rounded/mixin/TroughFallCancelMixin.java index 3573ef6..900dbe5 100644 --- a/src/main/java/com/lumiscosity/rounded/mixin/TroughFallCancelMixin.java +++ b/src/main/java/com/lumiscosity/rounded/mixin/TroughFallCancelMixin.java @@ -24,9 +24,15 @@ public class TroughFallCancelMixin { ) private void troughFallCancel(Block block, World world, BlockState state, BlockPos pos, Entity entity, float fallDistance, Operation original) { BlockPos calc = new BlockPos(pos.getX(), pos.getY() + 1, pos.getZ()); - if ((world.getBlockState(calc).isOf(TROUGH)) && world.getBlockState(calc).get(LEVEL) == 7) { - world.playSound(null, calc, TROUGH_RUSTLE, SoundCategory.BLOCKS); - original.call(block, world, state, pos, entity, fallDistance * 0.2F); + if (world.getBlockState(calc).isOf(TROUGH)) { + if (world.getBlockState(calc).get(LEVEL) > 0) { + world.playSound(null, calc, TROUGH_RUSTLE, SoundCategory.BLOCKS); + } + if (world.getBlockState(calc).get(LEVEL) == 7) { + original.call(block, world, state, pos, entity, fallDistance * 0.2F); + } else { + original.call(block, world, state, pos, entity, fallDistance); + } } else { original.call(block, world, state, pos, entity, fallDistance); } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 4498307..5cc5f0f 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -3,7 +3,7 @@ "id": "rounded", "version": "${version}", "name": "Rounded", - "description": "Vanilla+ features to round out the base game", + "description": "Vanilla+ additions to round out the base game", "authors": [ "lumiscosity" ],