18 juin 2016, 16:53

Mais du coup la fonction dans l’item devient :

public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
{
    switch(structure)
    {
    case 1:
        StructureTotem1.generate(world, x, y+1, z);
        return true;
    case 2:
        StructureTotem2.generate(world, x, y+1, z);
        return true;
    default:
        return false;
    }
}