diff --git a/common-files/src/main/resources/resources/default/configuration/blocks/palm_tree.yml b/common-files/src/main/resources/resources/default/configuration/blocks/palm_tree.yml index 6002d41ac..1e2e8afd7 100644 --- a/common-files/src/main/resources/resources/default/configuration/blocks/palm_tree.yml +++ b/common-files/src/main/resources/resources/default/configuration/blocks/palm_tree.yml @@ -154,6 +154,9 @@ items: fuel-time: 100 data: item-name: + lore: + - "Requires the datapack tree configuration to function." + - "If not configured, an oak tree will grow by default." model: template: default:model/generated arguments: @@ -171,7 +174,7 @@ items: - minecraft:farmland - minecraft:sand - type: sapling_block - feature: minecraft:fancy_oak + feature: minecraft:fancy_oak # use custom tree configuration here bone-meal-success-chance: 0.45 loot: template: default:loot_table/self diff --git a/core/src/main/java/net/momirealms/craftengine/core/pack/allocator/VisualBlockStateAllocator.java b/core/src/main/java/net/momirealms/craftengine/core/pack/allocator/VisualBlockStateAllocator.java index 7087b55d2..9c729bc97 100644 --- a/core/src/main/java/net/momirealms/craftengine/core/pack/allocator/VisualBlockStateAllocator.java +++ b/core/src/main/java/net/momirealms/craftengine/core/pack/allocator/VisualBlockStateAllocator.java @@ -91,6 +91,7 @@ public class VisualBlockStateAllocator { // 如果候选满足组,那么直接允许起飞 if (pair.left().test(candidate.blockState())) { pair.right().complete(candidate.blockState()); + candidate.setUsed(); } else { // 不满足候选组要求,那就等着分配新的吧 } @@ -109,13 +110,15 @@ public class VisualBlockStateAllocator { for (AutoStateGroup group : AutoStateGroup.values()) { List>> pendingAllocationFuture = this.pendingAllocationFutures[group.ordinal()]; for (Pair> pair : pendingAllocationFuture) { - BlockStateCandidate nextCandidate = group.findNextCandidate(); - if (nextCandidate != null) { - nextCandidate.setUsed(); - this.cachedBlockStates.put(pair.left(), nextCandidate.blockState()); - pair.right().complete(nextCandidate.blockState()); - } else { - pair.right().completeExceptionally(new StateExhaustedException(group)); + if (!pair.right().isDone()) { + BlockStateCandidate nextCandidate = group.findNextCandidate(); + if (nextCandidate != null) { + nextCandidate.setUsed(); + this.cachedBlockStates.put(pair.left(), nextCandidate.blockState()); + pair.right().complete(nextCandidate.blockState()); + } else { + pair.right().completeExceptionally(new StateExhaustedException(group)); + } } } }