This is in 1.21.1, without any seasons mod.
-- Ticking Exception #1 - (BlockState: Peppercorn Vines) --
Details:
Message: java.lang.NoSuchMethodError: 'float com.dtteam.dynamictrees.systems.season.SeasonHelper.globalSeasonalFruitProductionFactor(com.dtteam.dynamictrees.api.worldgen.LevelContext, net.minecraft.core.BlockPos, float, boolean)'
Position: MutableBlockPos{x=-1630, y=70, z=795}
BlockState: Block{dtphc2:peppercorn_vine}[up=false,north=false,east=false,age=0,west=true,south=false]
Stacktrace:
at TRANSFORMER/dtphc2@1.4.1/maxhyper.dtphc2.blocks.FruitVineBlock.getFruitingChance(FruitVineBlock.java:202) ~[dtphc2-1.4.1.jar%23757!/:?] {re:classloading}
at TRANSFORMER/dtphc2@1.4.1/maxhyper.dtphc2.blocks.FruitVineBlock.tryGrow(FruitVineBlock.java:147) ~[dtphc2-1.4.1.jar%23757!/:?] {re:classloading}
at TRANSFORMER/dtphc2@1.4.1/maxhyper.dtphc2.blocks.FruitVineBlock.doTick(FruitVineBlock.java:141) ~[dtphc2-1.4.1.jar%23757!/:?] {re:classloading}
at TRANSFORMER/dtphc2@1.4.1/maxhyper.dtphc2.blocks.FruitVineBlock.randomTick(FruitVineBlock.java:267) ~[dtphc2-1.4.1.jar%23757!/:?] {re:classloading}
|
private float getFruitingChance(Level world, BlockPos pos) { |
|
if (seasonOffset == null) return baseFruitingChance; |
|
float fruitFactor = SeasonHelper.globalSeasonalFruitProductionFactor(LevelContext.create(world), pos, seasonOffset, true); |
|
return baseFruitingChance * Math.max((fruitFactor + 0.25f), 1); |
|
} |
While this seems similar to #19 I think (I haven't checked in dept though) the issue might be different one.
If I understand the way Java Types work correctly the property is nullable due to the @Nullable, but defaults to float 0
|
@Nullable |
|
private Float seasonOffset = 0f; |
However I don't think nullable could ever happen here, because the setter does not allow it (due to the missing @Nullable I assume?)
|
} |
|
public FruitVineBlock setSeasonOffset(Float seasonOffset){ |
|
this.seasonOffset = seasonOffset; |
|
return this; |
|
} |
|
|
|
public Float getSeasonOffset (){ |
|
return seasonOffset; |
|
} |
Thus all the checks in this class like seasonOffset == null would never be hit, potentially causing bugs (like I encountered)
Given this is the second type of "Seasons Mod not installed" type of bug, perhaps checking the other parts of the code for similar problems would be something to think about.
This is in 1.21.1, without any seasons mod.
DynamicTrees-PHC2/src/main/java/maxhyper/dtphc2/blocks/FruitVineBlock.java
Lines 200 to 204 in 0744791
While this seems similar to #19 I think (I haven't checked in dept though) the issue might be different one.
If I understand the way Java Types work correctly the property is nullable due to the
@Nullable, but defaults to float 0DynamicTrees-PHC2/src/main/java/maxhyper/dtphc2/blocks/FruitVineBlock.java
Lines 53 to 54 in 0744791
However I don't think nullable could ever happen here, because the setter does not allow it (due to the missing
@NullableI assume?)DynamicTrees-PHC2/src/main/java/maxhyper/dtphc2/blocks/FruitVineBlock.java
Lines 110 to 118 in 0744791
Thus all the checks in this class like
seasonOffset == nullwould never be hit, potentially causing bugs (like I encountered)Given this is the second type of "Seasons Mod not installed" type of bug, perhaps checking the other parts of the code for similar problems would be something to think about.