Started setting up the crop block as a plant

This commit is contained in:
DarkGuardsman 2013-11-07 23:11:24 -05:00
parent 0c42816a09
commit 1c1402aa99
3 changed files with 24 additions and 3 deletions

View file

@ -25,8 +25,8 @@ import cpw.mods.fml.common.registry.GameRegistry;
import dark.api.farm.CropAutomationHandler;
import dark.api.farm.DecayMatterList;
import dark.core.common.DarkMain;
import dark.core.prefab.ItemBlockHolder;
import dark.core.prefab.ModPrefab;
import dark.core.prefab.items.ItemBlockHolder;
import dark.core.registration.ModObjectRegistry;
import dark.farmtech.blocks.BlockFarmSoil;
import dark.farmtech.entities.EntityFarmEgg;

View file

@ -2,10 +2,13 @@ package dark.farmtech.blocks;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.world.World;
import net.minecraftforge.common.EnumPlantType;
import net.minecraftforge.common.IPlantable;
import dark.core.prefab.ModPrefab;
import dark.farmtech.FarmTech;
public class BlockCrops extends Block
public class BlockCrops extends Block implements IPlantable
{
public BlockCrops()
@ -14,4 +17,22 @@ public class BlockCrops extends Block
this.setUnlocalizedName("FarmCrops");
}
@Override
public EnumPlantType getPlantType(World world, int x, int y, int z)
{
return EnumPlantType.Plains;
}
@Override
public int getPlantID(World world, int x, int y, int z)
{
return this.blockID;
}
@Override
public int getPlantMetadata(World world, int x, int y, int z)
{
return -1;
}
}

View file

@ -17,7 +17,7 @@ import net.minecraftforge.oredict.OreDictionary;
import universalelectricity.core.vector.Vector3;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.core.prefab.IExtraInfo.IExtraItemInfo;
import dark.core.interfaces.IExtraInfo.IExtraItemInfo;
import dark.core.prefab.ModPrefab;
import dark.core.prefab.helpers.ItemWorldHelper;
import dark.farmtech.FarmTech;