mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 20:22:28 +00:00
Patch CropBlock to use instanceOf FarmBlock check instead of hard coding to Blocks.FARMLAND (#10044)
Signed-off-by: Joseph T. McQuigg <[email protected]>
This commit is contained in:
1 parent
2951c1dac8
commit
72f98dc4a3
1 file changed
+9
@@ -1,5 +1,14 @@
|
||||
--- a/net/minecraft/world/level/block/CropBlock.java
|
||||
+++ b/net/minecraft/world/level/block/CropBlock.java
|
||||
@@ -54,7 +_,7 @@
|
||||
|
||||
@Override
|
||||
protected boolean mayPlaceOn(BlockState p_52302_, BlockGetter p_52303_, BlockPos p_52304_) {
|
||||
- return p_52302_.is(Blocks.FARMLAND);
|
||||
+ return p_52302_.getBlock() instanceof net.minecraft.world.level.block.FarmBlock;
|
||||
}
|
||||
|
||||
protected IntegerProperty getAgeProperty() {
|
||||
@@ -88,8 +_,9 @@
|
||||
int i = this.getAge(p_221050_);
|
||||
if (i < this.getMaxAge()) {
|
||||
|
||||
Reference in new issue
Block a user