9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-31 04:46:37 +00:00

就这样吧

This commit is contained in:
XiaoMoMi
2025-05-02 18:24:32 +08:00
parent ec627ffc79
commit 6bdd3dccde
27 changed files with 105 additions and 98 deletions

View File

@@ -148,10 +148,10 @@ public class CropBlockBehavior extends BushBlockBehavior {
int z = FastNMS.INSTANCE.field$Vec3i$z(pos);
net.momirealms.craftengine.core.world.World wrappedWorld = new BukkitWorld(world);
int i = this.getAge(immutableBlockState) + this.boneMealBonus.getInt(new LootContext(wrappedWorld, ContextHolder.builder()
int i = this.getAge(immutableBlockState) + this.boneMealBonus.getInt(new LootContext(wrappedWorld, 1, ThreadLocalRandom.current(), ContextHolder.builder()
.withParameter(LootParameters.WORLD, wrappedWorld)
.withParameter(LootParameters.LOCATION, Vec3d.atCenterOf(new Vec3i(x, y, z)))
.build(), ThreadLocalRandom.current(), 1));
.build()));
int maxAge = this.ageProperty.max;
if (i > maxAge) {
i = maxAge;