mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 19:39:22 +00:00
Fix PitcherCropBlock not calling canSustainPlant, not allowing it to be placed on custom farmland. Close #9611
This commit is contained in:
1 file changed
+15
@@ -0,0 +1,15 @@
|
||||
--- a/net/minecraft/world/level/block/PitcherCropBlock.java
|
||||
+++ b/net/minecraft/world/level/block/PitcherCropBlock.java
|
||||
@@ -69,7 +_,11 @@
|
||||
if (!m_278754_(p_277671_)) {
|
||||
return super.m_7898_(p_277671_, p_277477_, p_278085_);
|
||||
} else {
|
||||
- return this.m_6266_(p_277477_.m_8055_(p_278085_.m_7495_()), p_277477_, p_278085_.m_7495_()) && m_290004_(p_277477_, p_278085_) && (p_277671_.m_61143_(f_276478_) < 3 || m_290001_(p_277477_.m_8055_(p_278085_.m_7494_())));
|
||||
+ BlockPos below = p_278085_.m_7495_();
|
||||
+ boolean isSoil = this.m_6266_(p_277477_.m_8055_(below), p_277477_, below);
|
||||
+ if (p_277671_.m_60734_() == this) //Forge: This function is called during world gen and placement, before this block is set, so if we are not 'here' then assume it's the pre-check.
|
||||
+ isSoil = p_277477_.m_8055_(below).canSustainPlant(p_277477_, below, Direction.UP, this);
|
||||
+ return isSoil && m_290004_(p_277477_, p_278085_) && (p_277671_.m_61143_(f_276478_) < 3 || m_290001_(p_277477_.m_8055_(p_278085_.m_7494_())));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user