Skip to content

Commit 8edcad3

Browse files
committed
fixed crash with bonsaipot with modernfix
1 parent 0f48645 commit 8edcad3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
modName=DynamicTrees
22
modId=dynamictrees
3-
modVersion=1.4.0-BETA01
3+
modVersion=1.4.0
44

55
group=com.ferreusveritas.dynamictrees
66

@@ -17,7 +17,7 @@ ssVersion=5790633
1717
gcVersion=5787839
1818
jadeVersion=4986594
1919

20-
versionType=beta
20+
versionType=release
2121

2222
# Path of update checker relative to version info file
2323
updateCheckerPath=DynamicTrees.json

src/main/java/com/ferreusveritas/dynamictrees/models/baked/BakedModelBlockBonsaiPot.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@
2525
import java.util.HashMap;
2626
import java.util.List;
2727
import java.util.Map;
28+
import java.util.concurrent.ConcurrentHashMap;
2829

2930
@OnlyIn(Dist.CLIENT)
3031
public class BakedModelBlockBonsaiPot implements IDynamicBakedModel {
3132

3233
protected BakedModel basePotModel;
33-
protected Map<Species, List<BakedQuad>> cachedSaplingQuads = new HashMap<>();
34+
protected Map<Species, List<BakedQuad>> cachedSaplingQuads = new ConcurrentHashMap<>();
3435

3536
public BakedModelBlockBonsaiPot(BakedModel basePotModel) {
3637
this.basePotModel = basePotModel;
@@ -48,7 +49,7 @@ public List<BakedQuad> getQuads(@Nullable BlockState state, @Nullable Direction
4849
final Species species = extraData.get(PottedSaplingBlockEntity.SPECIES);
4950
final BlockState potState = extraData.get(PottedSaplingBlockEntity.POT_MIMIC);
5051

51-
if (species == null || potState == null || !species.isValid() || !species.getSapling().isPresent()) {
52+
if (species == null || potState == null || !species.isValid() || species.getSapling().isEmpty()) {
5253
return quads;
5354
}
5455

0 commit comments

Comments
 (0)