Skip to content

Commit a43396b

Browse files
committed
prevent crops from going into the floor
1 parent fc6c862 commit a43396b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ mod_name=Productive Lib
2929
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
3030
mod_license=All Rights Reserved
3131
# The mod version. See https://semver.org/
32-
mod_version=1.21.0-0.1.24
32+
mod_version=1.21.0-0.1.26
3333
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
3434
# This should match the base package used for the mod sources.
3535
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html

src/main/java/cy/jdkdigital/productivelib/util/harvest/MinecraftHarvester.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ public static void harvestBlock(Level level, BlockPos pos) {
6666
var dropStack = cropBlock.getCloneItemStack(level, pos, cropBlockState);
6767
dropStack.setCount(j + (i == 3 ? 1 : 0));
6868
Block.popResource(level, pos, dropStack);
69-
level.playSound(null, pos, SoundEvents.SWEET_BERRY_BUSH_PICK_BERRIES, SoundSource.BLOCKS, 1.0F, 0.8F + level.random.nextFloat() * 0.4F);
69+
level.playSound(null, pos, SoundEvents.SWEET_BERRY_BUSH_PICK_BERRIES, SoundSource.BLOCKS, 0.2F, 0.8F + level.random.nextFloat() * 0.4F);
7070
level.setBlock(pos, cropBlockState.setValue(SweetBerryBushBlock.AGE, 1), 2);
7171
}
7272
} else {
7373
// right click crop harvest
7474
Player fakePlayer = FakePlayerFactory.get((ServerLevel) level, new GameProfile(HarvestCompatHandler.FARMER_UUID, "productive_farmer"));
75-
cropBlockState.useWithoutItem(level, fakePlayer, new BlockHitResult(Vec3.ZERO, Direction.DOWN, pos, true));
75+
cropBlockState.useWithoutItem(level, fakePlayer, new BlockHitResult(Vec3.ZERO, Direction.UP, pos, true));
7676

7777
// If it's not harvested, destroy instead
7878
if (isCropValid(level, pos)) {

0 commit comments

Comments
 (0)