<commit_before>--- ../src_base/common/net/minecraft/src/BlockFlower.java
+++ ../src_work/common/net/minecraft/src/BlockFlower.java
@@ -2,7 +2,12 @@
 
 import java.util.Random;
 
-public class BlockFlower extends Block
+import net.minecraftforge.common.EnumPlantType;
+import net.minecraftforge.common.ForgeDirection;
+import net.minecraftforge.common.IPlantable;
+import static net.minecraftforge.common.EnumPlantType.*;
+
+public class BlockFlower extends Block implements IPlantable
 {
     protected BlockFlower(int par1, int par2, Material par3Material)
     {
@@ -24,7 +29,7 @@
      */
     public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
     {
-        return super.canPlaceBlockAt(par1World, par2, par3, par4) && this.canThisPlantGrowOnThisBlockID(par1World.getBlockId(par2, par3 - 1, par4));
+        return super.canPlaceBlockAt(par1World, par2, par3, par4) && canBlockStay(par1World, par2, par3 - 1, par4);
     }
 
     /**
@@ -68,7 +73,9 @@
      */
     public boolean canBlockStay(World par1World, int par2, int par3, int par4)
     {
-        return (par1World.getFullBlockLightValue(par2, par3, par4) >= 8 || par1World.canBlockSeeTheSky(par2, par3, par4)) && this.canThisPlantGrowOnThisBlockID(par1World.getBlockId(par2, par3 - 1, par4));
+        Block soil = blocksList[par1World.getBlockId(par2, par3 - 1, par4)];
+        return (par1World.getFullBlockLightValue(par2, par3, par4) >= 8 || par1World.canBlockSeeTheSky(par2, par3, par4)) && 
+                (soil != null && soil.canSustainPlant(par1World, par2, par3 - 1, par4, ForgeDirection.UP, this));
     }
 
     /**
@@ -104,4 +111,32 @@
     {
         return 1;
     }
+
+    @Override
+    public EnumPlantType getPlantType(World world, int x, int y, int z)<commit_msg>Fix accedental doubling of shift, Fixes saplings/flowers planting a space above where they should<commit_after>--- ../src_base/common/net/minecraft/src/BlockFlower.java
+++ ../src_work/common/net/minecraft/src/BlockFlower.java
@@ -2,7 +2,12 @@
 
 import java.util.Random;
 
-public class BlockFlower extends Block
+import net.minecraftforge.common.EnumPlantType;
+import net.minecraftforge.common.ForgeDirection;
+import net.minecraftforge.common.IPlantable;
+import static net.minecraftforge.common.EnumPlantType.*;
+
+public class BlockFlower extends Block implements IPlantable
 {
     protected BlockFlower(int par1, int par2, Material par3Material)
     {
@@ -24,7 +29,7 @@
      */
     public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
     {
-        return super.canPlaceBlockAt(par1World, par2, par3, par4) && this.canThisPlantGrowOnThisBlockID(par1World.getBlockId(par2, par3 - 1, par4));
+        return super.canPlaceBlockAt(par1World, par2, par3, par4) && canBlockStay(par1World, par2, par3, par4);
     }
 
     /**
@@ -68,7 +73,9 @@
      */
     public boolean canBlockStay(World par1World, int par2, int par3, int par4)
     {
-        return (par1World.getFullBlockLightValue(par2, par3, par4) >= 8 || par1World.canBlockSeeTheSky(par2, par3, par4)) && this.canThisPlantGrowOnThisBlockID(par1World.getBlockId(par2, par3 - 1, par4));
+        Block soil = blocksList[par1World.getBlockId(par2, par3 - 1, par4)];
+        return (par1World.getFullBlockLightValue(par2, par3, par4) >= 8 || par1World.canBlockSeeTheSky(par2, par3, par4)) && 
+                (soil != null && soil.canSustainPlant(par1World, par2, par3 - 1, par4, ForgeDirection.UP, this));
     }
 
     /**
@@ -104,4 +111,32 @@
     {
         return 1;
     }
+
+    @Override
+    public EnumPlantType getPlantType(World world, int x, int y, int z)
{'fraction_non_alphanumeric': 0.1326923076923077, 'fraction_numerical': 0.04862637362637363, 'mean_word_length': 3.632315521628499, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '133168', 'n_tokens_mistral': 1353, 'n_tokens_neox': 1280, 'n_words': 267}