File tree Expand file tree Collapse file tree
src/main/java/de/srendi/advancedperipherals/common/addons/botania Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55import net .minecraft .world .level .block .entity .BlockEntity ;
66import org .jetbrains .annotations .NotNull ;
77import vazkii .botania .api .block_entity .GeneratingFlowerBlockEntity ;
8+ import vazkii .botania .common .block .BotaniaBlocks ;
89
910public class ManaFlowerIntegration extends BlockEntityIntegrationPeripheral <GeneratingFlowerBlockEntity > {
1011
@@ -35,6 +36,14 @@ public final int getMana() {
3536
3637 @ LuaFunction (mainThread = true )
3738 public final boolean isOnEnchantedSoil () {
38- return blockEntity .overgrowth ;
39+ return isOnSpecialSoil ();
40+ }
41+
42+ private boolean isOnSpecialSoil () {
43+ if (blockEntity .isFloating ()) {
44+ return false ;
45+ } else {
46+ return blockEntity .getLevel ().getBlockState (blockEntity .getBlockPos ().below ()).is (BotaniaBlocks .enchantedSoil );
47+ }
3948 }
4049}
You can’t perform that action at this time.
0 commit comments