Implement IPlantable for sapling
@@ -31,11 +31,9 @@ import net.minecraft.world.IWorld;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
import net.minecraft.world.storage.loot.LootContext.Builder;
+import net.minecraftforge.common.IPlantable;
-//TODO: 1.14.4 Tile Entity is eliminated and each species has it's own sapling block state
-//TODO: 1.14.4 Implement IPlantable
-
-public class BlockDynamicSapling extends Block implements IGrowable {
+public class BlockDynamicSapling extends Block implements IGrowable, IPlantable {
protected Species species;
@@ -164,4 +162,9 @@ public class BlockDynamicSapling extends Block implements IGrowable {
return BlockRenderLayer.CUTOUT_MIPPED;
}
+ @Override
+ public BlockState getPlant(IBlockReader world, BlockPos pos) {
+ return species.getSapling().get().getDefaultState();
+ }
+
}
