Colorful Azaleas

Colorful Azaleas

1M Downloads

[Bug]: Game crash when bonemealing Colorful Azalea bushes

cyanzule opened this issue ยท 0 comments

commented

Bug Description

When trying to bonemeal the Colorful Azalea, the game immediately crashes with the following message:
image

How to Reproduce?

  1. Create 1.20.2 world
  2. Place and/or find a Colorful Azalea bush
  3. Right click Bone Meal on a Colorful Azalea bush

Expected Behavior

No response

Version

2.2.1

Mod Loader Version

0.91.6+1.20.2

Mod Loader

Fabric

Logs or additional context

Crash log: https://pastebin.com/brK1yCb6

Potential fix

From my own testing, seems to be that Minecraft 1.20.2 changed the signature for the method isValidBonemealTarget in the interface BonemealableBlock, and dropping the dangling boolean from it seems to fix the crash locally. As in:

diff --git a/src/main/java/com/kekie6/colorfulazaleas/blocks/ColorfulAzaleaBushBlock.java b/src/main/java/com/kekie6/colorfulazaleas/blocks/ColorfulAzaleaBushBlock.java
index e657a0f..d46181b 100644
--- a/src/main/java/com/kekie6/colorfulazaleas/blocks/ColorfulAzaleaBushBlock.java
+++ b/src/main/java/com/kekie6/colorfulazaleas/blocks/ColorfulAzaleaBushBlock.java
@@ -35,7 +35,7 @@ public class ColorfulAzaleaBushBlock extends BushBlock implements BonemealableBl
     }
 
     @Override
-    public boolean isValidBonemealTarget(LevelReader levelReader, BlockPos blockPos, BlockState blockState, boolean b) {
+    public boolean isValidBonemealTarget(LevelReader levelReader, BlockPos blockPos, BlockState blockState) {
         return levelReader.getFluidState(blockPos.above()).isEmpty();
     }
 

Didn't test any further higher 1.20 versions, but confirmed that the crash didn't happen on 1.20.1. So, currently, with this bug the mod is only truly compatible with 1.20.1 unlike how it's shown in Modrinth, whoops... But hey, if not for that, I wouldn't have found it!

Code of Conduct

  • I have searched the issue tracker and confirmed that the issue has not been reported
  • I have checked the FAQ (if one is present) and my issue is not listed
  • I have verified that I am using the latest version of the mod
  • I have verified that I have installed all the required dependencies for the mod
  • I have verified that I do not have Optifine installed. We will close issues if we detect Optifine is in your pack. We cannot fix Optifine issues. Please do not report issues with Optifine present.