This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Hello guys i made new plant like wheat, but i have a problem my plant can grow on dirt and grass cant fix it, can any one help me please?
here is my code
package com.verdure.mod.plants;
import java.util.Random;
import com.verdure.mod.VerdureGlobal; import com.verdure.mod.blocks.VDBlocks;
import net.minecraft.block.Block; import net.minecraft.block.BlockBush; import net.minecraft.block.BlockCrops; import net.minecraft.block.IGrowable; import net.minecraft.block.properties.IProperty; import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.BlockPos; import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly;
public class VDPlant extends BlockCrops implements IGrowable { public VDPlant (String unlocalizedName) { this.setDefaultState(this.blockState.getBaseState().withProperty(AGE, Integer.valueOf(0))); this.setTickRandomly(true); float f = 0.5F; this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.25F, 0.5F + f); this.setCreativeTab(VerdureGlobal.vdCreativeTabs); this.setHardness(0.0F); this.setStepSound(soundTypeGrass); this.disableStats(); this.setUnlocalizedName(unlocalizedName); } public boolean cantPlaceBlockOn(Block ground) { return ground == VDBlocks.BlockGrassChocolate; } }
// Sorry for bad english
Try the Mod Development section.
"We live on a placid island of ignorance in the midst of black seas of infinity, and it was not meant that we should voyage far."
Hello guys i made new plant like wheat, but i have a problem my plant can grow on dirt and grass cant fix it, can any one help me please?
here is my code
package com.verdure.mod.plants;
import java.util.Random;
import com.verdure.mod.VerdureGlobal;
import com.verdure.mod.blocks.VDBlocks;
import net.minecraft.block.Block;
import net.minecraft.block.BlockBush;
import net.minecraft.block.BlockCrops;
import net.minecraft.block.IGrowable;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.state.BlockState;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class VDPlant extends BlockCrops implements IGrowable {
public VDPlant (String unlocalizedName) {
this.setDefaultState(this.blockState.getBaseState().withProperty(AGE, Integer.valueOf(0)));
this.setTickRandomly(true);
float f = 0.5F;
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.25F, 0.5F + f);
this.setCreativeTab(VerdureGlobal.vdCreativeTabs);
this.setHardness(0.0F);
this.setStepSound(soundTypeGrass);
this.disableStats();
this.setUnlocalizedName(unlocalizedName);
}
public boolean cantPlaceBlockOn(Block ground)
{
return ground == VDBlocks.BlockGrassChocolate;
}
}
// Sorry for bad english
Try the Mod Development section.
"We live on a placid island of ignorance in the midst of black seas of infinity, and it was not meant that we should voyage far."