From d4e58b84c81401d6ca4886582ff09fa8178707b9 Mon Sep 17 00:00:00 2001 From: Glease <4586901+Glease@users.noreply.github.com> Date: Fri, 5 Nov 2021 16:00:12 +0800 Subject: [PATCH] Fix unprotected block access --- src/main/java/forestry/apiculture/flowers/FlowerRegistry.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/forestry/apiculture/flowers/FlowerRegistry.java b/src/main/java/forestry/apiculture/flowers/FlowerRegistry.java index 8de528579..0410e06aa 100644 --- a/src/main/java/forestry/apiculture/flowers/FlowerRegistry.java +++ b/src/main/java/forestry/apiculture/flowers/FlowerRegistry.java @@ -191,6 +191,9 @@ public final class FlowerRegistry implements IFlowerRegistry, IFlowerGrowthHelpe return false; } + if (!world.blockExists(x, y, z)) + return false; + Set acceptedCustom = this.registeredRules.get(flowerType); for (IFlowerAcceptableRule acceptableFlower : acceptedCustom) { if (acceptableFlower.isAcceptableFlower(flowerType, world, x, y, z)) {