Voilà j’ai voulu le mettre en 1.7.10 tous fonction sauf quand je fait le clique droit dessus sa remais bien le block en mode sans orange mais sa me drop rien
package fr.darkvince.ultrav2.Fruit;
import java.util.Random;
import fr.darkvince.ultrav2.Main;
import net.minecraft.block.Block;
import net.minecraft.block.BlockBush;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class BlockOrange extends BlockBush
{
public BlockOrange()
{
super(Material.plants);
this.setStepSound(soundTypeGrass);
this.setTickRandomly(true);
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
}
public boolean canPlaceBlockAt(World world, int x, int y, int z)
{
return super.canPlaceBlockAt(world, x, y, z) && world.getBlock(x, y - 1, z).canSustainPlant(world, x, y - 1, x, ForgeDirection.UP, this);
}
protected boolean canPlaceBlockOn(Block ground)
{
return ground == Blocks.grass || ground == Blocks.dirt || ground == Blocks.farmland;
}
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
if (this == Main.BlockOrangeBush)
{
world.setBlock(x, y, z , Main.BlockOrange);
dropBerry(world, x, y, x);
}
return null == null;
}
protected void dropBerry(World world, int x, int y, int z)
{
if (this == Main.BlockOrange || this == Main.BlockOrangeBush)
{
dropBlockAsItem(world, x, y, z, new ItemStack(Main.Orange, 1));
}
}
protected void makeBerry(World world, int x, int y, int z)
{
if (this == Main.BlockOrange)
{
world.setBlock(x, y, z, Main.BlockOrangeBush);
}
}
public void onBlockHarvested(World world,int x, int y, int z, int p_149681_5_, EntityPlayer player)
{
if (this == Main.BlockOrangeBush)
{
dropBlockAsItem(world, x, y, z, new ItemStack(Main.BlockOrange, 1));
dropBlockAsItem(world, x, y, z, new ItemStack(Main.Orange, 1));
dropBlockAsItem(world, x, y, z, new ItemStack(Main.BlockOrangeBush, 0));
}
}
public void updateTick(World world, int x, int y, int z, Random rand)
{
super.updateTick(world, x, y, z, rand);
int i = 1;
if (i < 20)
{
if (rand.nextInt((int)(5.0F) + 1) == 0)
{
if (this == Main.BlockOrange)
{
makeBerry(world, x, y, z);
}
}
}
}
}
Désolé mais les espace s’enleve a chaque fois